ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* optional hyphenation patterns in ancient Greek
@ 2019-03-24 16:38 Pablo Rodriguez
  2019-03-25 14:09 ` Arthur Reutenauer
  0 siblings, 1 reply; 9+ messages in thread
From: Pablo Rodriguez @ 2019-03-24 16:38 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear list (especially Thomas and Arthur),

I opened a request for optional hyphenation patterns at GitHub
(https://github.com/hyphenation/tex-hyphen/issues/34).

I’m not advocating changing the default, but only providing hyphenation
patterns that allow hyphenating consonant pairs that cannot be at the
word beginning.

I think it may make sense to discuss the issue there (@ GitHub).

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: optional hyphenation patterns in ancient Greek
  2019-03-24 16:38 optional hyphenation patterns in ancient Greek Pablo Rodriguez
@ 2019-03-25 14:09 ` Arthur Reutenauer
  2019-03-25 19:57   ` Pablo Rodriguez
  0 siblings, 1 reply; 9+ messages in thread
From: Arthur Reutenauer @ 2019-03-25 14:09 UTC (permalink / raw)
  To: Mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 2488 bytes --]

	Dear Pablo,

  Five months ago I sent you a private email with detailed explanations
of how you can achieve that in ConTeXt.  I suggest you go through that
first before we start talking about a new pattern set.  Here is the
email, with a few updates (the paragraph quoted at the top is by
myself).

----
Date: Thu, 25 Oct 2018 15:05:17 +0200
From: Arthur Reutenauer <arthur.reutenauer@normalesup.org>

>   In LuaTeX it’s now possible to inject patterns on the fly, at
> typesetting time. I admit to not knowing if ConTeXt has a special way to
> take advantage of that; it’s a simple command in pure LuaTeX.  It would
> also be necessary to change a few patterns in the current set, because
> they would interact badly with 2γ1μ.  More on that tomorrow.

  OK, so here goes.

  It is not possible to just use \patterns in the middle of a Mark IV
run, because Hans deactivates it (in lang-ini.mkiv) -- clearly a remnant
from Mark II, as in pdfTeX and XeTeX it would have resulted in an error;
in ConTeXt it just becomes a no-op, which thus shadows LuaTeX’s
behaviour that could actually have been useful.

  The situation in Mark IV is documented in languages-mkiv.pdf which is
part of the distribution: Hans rewrote the whole hyphenation routine in
Lua in 2014, and users can switch to it with

	\setuphyphenation[method=traditional]

  The idea behind the name is apparently that the Lua code mimics the
“traditional” way implemented in the TeX engine, and Hans envisages that
other methods can be written in the future (but this hasn’t happened
yet).  The non-Lua method is on by default and can be chosen explicitly
with \setuphyphenation[method=default] but it is not possible to inject
new patterns that way because of the above.

  With the Lua method activated, it becomes possible to add patterns on
the fly with

	\registerhyphenationpattern[agr][2γ1μ]

  Some care should be taken when adding patterns to an existing set, since
they can -- and in this case do -- interact with other patterns in the set.
Here, I’ve found that this row of patterns (l. 516 of the master file,
https://github.com/hyphenation/tex-hyphen/blob/82e5651/hyph-utf8/tex/generic/hyph-utf8/patterns/tex/hyph-grc.tex#L516):

	4γμ' 4γμ’ 4γμʼ 4γμ᾽ 4γμ᾿

needs to be overridden with patterns such as

	γ2μ' γ2μ’ γ2μʼ γ2μ᾽ γ2μ᾿

otherwise the new pattern would allow breaks before the mu.

  The attached file puts everything together.
----

	Best,

		Arthur

[-- Attachment #2: add-patterns-on-the-fly.tex --]
[-- Type: text/x-tex, Size: 377 bytes --]

\mainlanguage[agr]
\definefont[linuxlibertine][name:linlibertineo]
\starttext

\hsize=1pt

\linuxlibertine
πρᾶγμα πράγματος

\setuphyphenation[method=traditional]
\registerhyphenationpattern[agr][2γ1μ γ2μ’]

πρᾶγμα πράγματος

πραγμ’ ἄτος % Without the second pattern above, we get the incorrect break πραγ-μ’

\stoptext

[-- Attachment #3: add-patterns-on-the-fly.pdf --]
[-- Type: application/pdf, Size: 7885 bytes --]

[-- Attachment #4: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: optional hyphenation patterns in ancient Greek
  2019-03-25 14:09 ` Arthur Reutenauer
@ 2019-03-25 19:57   ` Pablo Rodriguez
  2019-03-26  8:42     ` Arthur Reutenauer
  0 siblings, 1 reply; 9+ messages in thread
From: Pablo Rodriguez @ 2019-03-25 19:57 UTC (permalink / raw)
  To: ntg-context

On 3/25/19 3:09 PM, Arthur Reutenauer wrote:
> 	Dear Pablo,
>
>   Five months ago I sent you a private email with detailed explanations
> of how you can achieve that in ConTeXt.  I suggest you go through that
> first before we start talking about a new pattern set.  Here is the
> email, with a few updates (the paragraph quoted at the top is by
> myself).

Dear Arthur,

many thanks for your reply.

I read your original message when you sent it, but the issue with that
kind of hyphenation exceptions is that they are document-based (I had
used them before, for Spanish [and German, I think]).

This is why I asked for the discussion of a new pattern set.

But I didn’t know that ConTeXt doesn’t allow them. So, this has to be
solved before a different pattern set could make sense in ConTeXt.

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: optional hyphenation patterns in ancient Greek
  2019-03-25 19:57   ` Pablo Rodriguez
@ 2019-03-26  8:42     ` Arthur Reutenauer
  2019-03-30 14:40       ` Pablo Rodriguez
  0 siblings, 1 reply; 9+ messages in thread
From: Arthur Reutenauer @ 2019-03-26  8:42 UTC (permalink / raw)
  To: Mailing list for ConTeXt users

On Mon, Mar 25, 2019 at 08:57:40PM +0100, Pablo Rodriguez wrote:
> I read your original message when you sent it, but the issue with that
> kind of hyphenation exceptions is that they are document-based

  No.  Why would they be restricted to a single document?

> This is why I asked for the discussion of a new pattern set.

  Well, my contribution was sent five months ago, you didn’t reply to it
until now, and since you talk about hyphenation exceptions above I
suspect you haven’t really understood it.  It doesn’t use exceptions at
all, and takes instead advantage of LuaTeX’s ability to manipulate the
pattern set on the fly.  As such, it can actually be a step towards an
entirely new pattern set, but it is of course not complete.  I am
however not prepared to put even more effort into this unless you
contribute something too yourself.

> But I didn’t know that ConTeXt doesn’t allow them. So, this has to be
> solved before a different pattern set could make sense in ConTeXt.

  This paragraph is either nonsensical or counterfactual.  I don’t
understand what you’re trying to say.

	Best,

		Arthur
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: optional hyphenation patterns in ancient Greek
  2019-03-26  8:42     ` Arthur Reutenauer
@ 2019-03-30 14:40       ` Pablo Rodriguez
  2019-03-31 20:18         ` Wolfgang Schuster
  0 siblings, 1 reply; 9+ messages in thread
From: Pablo Rodriguez @ 2019-03-30 14:40 UTC (permalink / raw)
  To: ntg-context

On 3/26/19 9:42 AM, Arthur Reutenauer wrote:
> On Mon, Mar 25, 2019 at 08:57:40PM +0100, Pablo Rodriguez wrote:
>> I read your original message when you sent it, but the issue with that
>> kind of hyphenation exceptions is that they are document-based
>
>   No.  Why would they be restricted to a single document?

Where should I add it to have it in all my documents?

I guess that even in that case it would be restricted to the
distribution I’m using. (I mean, I had to add them again if I use
another computer.)

For me, adding the command to the document (or the distribution) would
be easier. But this isn’t about my documents or myself.

>> This is why I asked for the discussion of a new pattern set.
>
>   Well, my contribution was sent five months ago, you didn’t reply to it
> until now, and since you talk about hyphenation exceptions above I
> suspect you haven’t really understood it.

Sorry for my delayed reply, but I don’t have much time to devote it to
these issues (they are pure hobby for me).

I also had to check the reference for the alternate hyphenation (I
didn’t had the book myself and I wasn’t near to a library where I could
lend it).

In my documents, I have been using \registerhyphenationpattern for more
than three years (to enable a hyphenation with a line starting with "no"
at the beginning of the line).

> It doesn’t use exceptions at all, and takes instead advantage of
> LuaTeX’s ability to manipulate the pattern set on the fly.  As such,
> it can actually be a step towards an entirely new pattern set, but it
> is of course not complete.

Sorry for my inaccuracy, I know that \registerhyphenationexception is a
different command from \registerhyphenationpattern.

> I am however not prepared to put even more effort into this unless
> you contribute something too yourself.

I only wanted to discuss the issue before providing the patch with the
patterns (at least) at GitHub.

To avoid misunderstandings, I have just edited the title of the issue at
GitHub (https://github.com/hyphenation/tex-hyphen/issues/34).

>> But I didn’t know that ConTeXt doesn’t allow them. So, this has to be
>> solved before a different pattern set could make sense in ConTeXt.
>
>   This paragraph is either nonsensical or counterfactual.  I don’t
> understand what you’re trying to say.

With “pattern set” I meant an optional pattern set that allows the
hyphenation of all pair of consonants that don’t start a word (γ-μ, but
not γ-ν) which are blocked in the main hyphenation pattern set.

I don‘t know how, but this optional set has to be loaded with the main
hyphenation patterns.

I don’t know how to add those patterns as alternate ones. But I’m going
to provide the patch with the needed hyphenations.

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: optional hyphenation patterns in ancient Greek
  2019-03-30 14:40       ` Pablo Rodriguez
@ 2019-03-31 20:18         ` Wolfgang Schuster
  2019-03-31 20:55           ` Pablo Rodriguez
  0 siblings, 1 reply; 9+ messages in thread
From: Wolfgang Schuster @ 2019-03-31 20:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Pablo Rodriguez

Pablo Rodriguez schrieb am 30.03.19 um 15:40:
> On 3/26/19 9:42 AM, Arthur Reutenauer wrote:
>> On Mon, Mar 25, 2019 at 08:57:40PM +0100, Pablo Rodriguez wrote:
>>> I read your original message when you sent it, but the issue with that
>>> kind of hyphenation exceptions is that they are document-based
>>    No.  Why would they be restricted to a single document?
> Where should I add it to have it in all my documents?
>
> I guess that even in that case it would be restricted to the
> distribution I’m using. (I mean, I had to add them again if I use
> another computer.)
>
> For me, adding the command to the document (or the distribution) would
> be easier. But this isn’t about my documents or myself.

You can put your extensions in a module and put it on the garden
or ctan when it should be part of tex live.

When you make a new installation you can download the module together
with the base files and afterwards load the module in your document.

Wolfgang

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: optional hyphenation patterns in ancient Greek
  2019-03-31 20:18         ` Wolfgang Schuster
@ 2019-03-31 20:55           ` Pablo Rodriguez
  2019-04-03 14:14             ` Arthur Reutenauer
  0 siblings, 1 reply; 9+ messages in thread
From: Pablo Rodriguez @ 2019-03-31 20:55 UTC (permalink / raw)
  To: ntg-context

On 3/31/19 10:18 PM, Wolfgang Schuster wrote:
> Pablo Rodriguez schrieb am 30.03.19 um 15:40:
>> [...]
>> For me, adding the command to the document (or the distribution) would
>> be easier. But this isn’t about my documents or myself.
>
> You can put your extensions in a module and put it on the garden
> or ctan when it should be part of tex live.
>
> When you make a new installation you can download the module together
> with the base files and afterwards load the module in your document.
Many thanks for the reply, Wolfgang.

Since this isn’t about myself or my documents, I guess it is worth to
provide the optional hyphenation set to all TeX users, not only the ones
who use ConTeXt.

Many thanks again for your help,

Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: optional hyphenation patterns in ancient Greek
  2019-03-31 20:55           ` Pablo Rodriguez
@ 2019-04-03 14:14             ` Arthur Reutenauer
  2019-04-22  8:29               ` Pablo Rodriguez
  0 siblings, 1 reply; 9+ messages in thread
From: Arthur Reutenauer @ 2019-04-03 14:14 UTC (permalink / raw)
  To: Mailing list for ConTeXt users

	Pablo,

On Sun, Mar 31, 2019 at 10:55:18PM +0200, Pablo Rodriguez wrote:
> Since this isn’t about myself or my documents, I guess it is worth to
> provide the optional hyphenation set to all TeX users, not only the ones
> who use ConTeXt.

  You’re making it impossible to help you.  Whatever anyone says, you
dismiss it with various excuses: you already knew that, you read the
email but needed half a year to tell it wasn’t useful, you want to have
the discussion in another forum.  Right now it’s imaginary users that
prop your demand for a different solution because it “isn’t about
yourself or your documents” -- even though it clearly is.  No one else
here has expressed interest in what you’re asking for.

  There’s worse, though.  Your original request revealed that some
consonant pairs could be treated differently when hyphenating Ancient
Greek.  Which are they?  Determining that was clearly on you, and would
have brought at least a modicum of substance to the discussion.  Having
however more or less lost hope that you ever will, I did that job myself
and now think that

	βμ βν γμ θμ πμ τν φμ χμ

are the only consonant pairs that require a different treatment.  Would
you please confirm?

	Best,

		Arthur
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: optional hyphenation patterns in ancient Greek
  2019-04-03 14:14             ` Arthur Reutenauer
@ 2019-04-22  8:29               ` Pablo Rodriguez
  0 siblings, 0 replies; 9+ messages in thread
From: Pablo Rodriguez @ 2019-04-22  8:29 UTC (permalink / raw)
  To: ntg-context

On 4/3/19 4:14 PM, Arthur Reutenauer wrote:
> [...] 
> 	βμ βν γμ θμ πμ τν φμ χμ
> 
> are the only consonant pairs that require a different treatment.  Would
> you please confirm?

Arthur,

the pairs are (to the best of my knowledge):

    βμ βν γμ δλ θμ πμ τν φμ χμ

The patterns would be:

    %% βμ
    2β1μ
    2β1μ'
    2β1μ’
    2β1μʼ
    2β1μ᾽
    2β1μ᾿
    2ϐ1μ
    2ϐ1μ'
    2ϐ1μ’
    2ϐ1μʼ
    2ϐ1μ᾽
    2ϐ1μ᾿

    %% βν
    2β1ν
    2β1ν'
    2β1ν’
    2β1νʼ
    2β1ν᾽
    2β1ν᾿
    2ϐ1ν
    2ϐ1ν'
    2ϐ1ν’
    2ϐ1νʼ
    2ϐ1ν᾽
    2ϐ1ν᾿

    %% γμ
    2γ1μ
    2γ1μ'
    2γ1μ’
    2γ1μʼ
    2γ1μ᾽
    2γ1μ᾿

    %% δλ
    2δ1λ
    2δ1λ'
    2δ1λ’
    2δ1λʼ
    2δ1λ᾽
    2δ1λ᾿

    %% θμ
    2θ1μ
    2θ1μ'
    2θ1μ’
    2θ1μʼ
    2θ1μ᾽
    2θ1μ᾿
    2ϑ1μ
    2ϑ1μ'
    2ϑ1μ’
    2ϑ1μʼ
    2ϑ1μ᾽
    2ϑ1μ᾿

    %% πμ
    2π1μ
    2π1μ'
    2π1μ’
    2π1μʼ
    2π1μ᾽
    2π1μ᾿
    2ϖ1μ
    2ϖ1μ'
    2ϖ1μ’
    2ϖ1μʼ
    2ϖ1μ᾽
    2ϖ1μ᾿

    %% τν
    2τ1ν
    2τ1ν'
    2τ1ν’
    2τ1νʼ
    2τ1ν᾽
    2τ1ν᾿

    %% φμ
    2φ1μ
    2φ1μ'
    2φ1μ’
    2φ1μʼ
    2φ1μ᾽
    2φ1μ᾿

    %% χμ
    2χ1μ
    2χ1μ'
    2χ1μ’
    2χ1μʼ
    2χ1μ᾽
    2χ1μ᾿

I hope they may be useful,

Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-04-22  8:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-24 16:38 optional hyphenation patterns in ancient Greek Pablo Rodriguez
2019-03-25 14:09 ` Arthur Reutenauer
2019-03-25 19:57   ` Pablo Rodriguez
2019-03-26  8:42     ` Arthur Reutenauer
2019-03-30 14:40       ` Pablo Rodriguez
2019-03-31 20:18         ` Wolfgang Schuster
2019-03-31 20:55           ` Pablo Rodriguez
2019-04-03 14:14             ` Arthur Reutenauer
2019-04-22  8:29               ` Pablo Rodriguez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).