[XeTeX] "new-babel", was: Ancient Greek hyphenation

François Charette firmicus at ankabut.net
Mon Apr 23 12:50:43 CEST 2007


Apostolos Syropoulos wrote:
>
> I am sure we can come up with a name, maybe polyglotta...
Nice! But I would opt for *polyglossia*. Or perhaps (for the latinists): 
multiloquus or linguosus (meaning prolix, loquacious)? ... OK, I'm not 
serious here :-) Let's keep that discussion aside until "we" (whatever 
that means) come up with a real "post-babel" package.

---

Thanks Axel for your useful posting. I essentially agree with your 
suggestions.
> What is the purpose of the package?
>
> 1. Select hyphenation patterns for the selected language.
> 2. Select a font for this language.
> 3. Setup typing direction (LTR, RTL, TTB) (interface to bidi?)
Note that bidi only supports LTR and RTL, as it makes use of the 
primitives provided by e-TeX (beginR endR beginL endL). TTB can be 
achieved for CJK scripts by means of font features (e.g. 
RawFeature={vertical;script=kana} -- see threads in this mailing-list 
with "vertical" in the subject).
> 4. Enable OTF support for the selected language. (using fontspec?)
> 5. Enable language specific ligatures (and variants?) (again fontspec).
> 6. Selecting a color for the language, make that: Offer an interface to 
> issue arbitrary commands when selecting a language.
>
> 3 to 5 could be 2.1 to 2.3, see example below.
>
> How will this look like?
> \DefineLanguage[%
> hyphenation=german,		% Use traditional patterns
> %font=romanfont,		% romanfont is the default
> % Should the font properties be part of the language or is
> % it better to define a font for every language we use. The
> % later will be more portable to non-XeTeX systems.
> %direction=RTL,			% RTL is the default
> fontlanguage=DE,		% use OTF features for german
> commonligatures=on,		% use fi, fl ligatures
> %rareligature=off,		% don't use st, ck ligatures (default)
> startcommand={\color{red}} % Examples using the 20th century spelling
> 						% will be shown in red.
> ]{german20c}
>
> What will this package not support:
>
> - Non-Unicode font encodings.
> - Translated strings for various latex names. (For this we need the 
> doclang package which provides a \documentlanguage command.)
"doclang" is hypothetical, right? It should perhaps also support the 
additional strings defined in commonly-used classes other than the 
standard ones (memoir, koma-script family, etc).
> - Language specific date formats. (Use isodate, which already supports 
> different formats)
> - Language specific quotation marks, csquotes already offers these.
Our "new-babel" should handle all three packages I think (as options), 
making use of "doclang", isodate and csquotes when necessary. Note that 
in the case of dates, a lot more must be done for languages that make 
potential use of other calendar systems (Hebrew, Islamic, Iranian, 
Baha'i, Coptic, Ethiopic, Chinese, etc.) For Hebrew the code is 
available: it is already part of Babel. But for the rest I am sure 
nobody will volunteer to implement the algorithms of Reingold and 
Dershowitz as TeX macros!! In any case not me! ;-} This will probably 
become much easier with LuaTeX.


Cheers,
François





More information about the XeTeX mailing list