[tex-hyphen] luatex-hyphen & TL

Manuel Pégourié-Gonnard mpg at elzevir.fr
Sat May 22 18:17:31 CEST 2010


Le 22/05/2010 15:17, Mojca Miklavec a écrit :
> On Fri, May 21, 2010 at 01:11, Manuel Pégourié-Gonnard wrote:
>>
>> % hyphen-french.tlpsrc
>> category TLCore
>> execute AddHyphen name=french synonyms=patois,francais \
>>  lefthyphenmin=2 righthyphenmin=3 file=loadhyph-fr.tex \
>>  txtpatt=hyph-fr.pat.txt txthyph=hyph-fr.hyp.txt
>>
>> % hyphen-ancientgreek.tlpsrc
>> category TLCore
>> execute AddHyphen name=ancientgreek lefthyphenmin=1 righthyphenmin=1 \
>>  file=loadhyph-grc.tex txtpatt=hyph-grc.pat.txt txthyph=hyph-grc.pat.txt
> 
>> execute AddHyphen name=ibycus lefthyphenmin=2 righthyphenmin=2 \
>>  file=ibyhyph.tex luaspecial="disabled:only usable in 8bit engines"
>> runpattern f texmf/tex/generic/hyphen/ibyhyph.tex
>> runpattern f texmf/tex/generic/hyphen/grahyph5.tex
> 
> This is really ugly to me.
> 
What exactly is ugly, and why? Is hyphen-french's line ugly, or only the lines
for special languages?

> First of all: if you decide to generate the database with help of TL
> tools, you may simply leave ibycus and others out completely - you
> don't need to worry that "maybe language.dat contains some other
> patterns that you need to handle".
> 
The lua db has to contain information about ibycus or it will be included in the
format. Currently the rule is:
- include in the format if there is no entry in language.dat.lua
- otherwise, do nothing at format-generation time, and at runtime:
  - load language is normal
  - issue an error if disabled

> Second: Karl has already objected to that in past, but in case that
> you do generate luatex-specific language.dat.lua, instead of
> luaspecial="disabled:only usable in 8bit engines", I would much prefer
> to have something like
>     enable8bit=true,enableutf=false
> and for indic scripts
>     enable8bit=false,enableutf=true
> then you could just as well generate two language.dat files: one for
> 8bit engines and one for XeTeX. And even if not: the syntax would be
> much more clean.
> 
I disagree. There may be patterns usable with Xetex but not with Luatex, so utf
is not a good category.

Btw, it is easy to implement something specific to xetex using the "databases"
key I added.

> Third: what's your plan with updates for german dated patterns then?
> (One would need to update their package to include the plain text
> patterns.)
> 
This is unrelated IMO, since the current system allows to implement anything
they (german-x team) may want, but for information, we (TL team) will do what
they will tell us to do. They're probably going to generate plain text patterns,
and in the meanwhile we'll probably disable them.

> Something else. Since you are extending the syntax: would it be
> possible to add some comment. For example:
>     comment="something that we would like to see in comments in language.dat"
> which would generate
>     % something that we would like to see in comments in language.dat
> and
>     -- something that we would like to see in comments in language.dat
> in language.dat and language.dat.lua before the language entry.
> 
No problem.

>> % hyphen-farsi.tlpsrc
>> Category TLCore
>> execute AddHyphen name=farsi synonyms=persian lefthyphenmin= righthyphenmin= \
>>  file=zerohyph.tex luaspecial="null"
>>
>> Hope it's ok. Basically, you just add txtpatt and txthyph if the corresponding
>> files exist, or luaspecial = "null" or "disabled: <reason>" otherwise.
> 
> Can we please move the <reason> to a special field?
> 
I don't want to add too many fields. Would the comment fiel be OK for this use?

> I'll be most probably back on Monday.
> 
Ok.

Manuel.


More information about the tex-hyphen mailing list