Interesting package for XeTeX
Hi all, on ctt, I just saw an annoucement for a xe(la)tex package which I found quite interesting. Here's the description: Location on CTAN: /macros/xetex/latex/ucharclasses This package addresses one of the few features where TeX still has to play catch-up to word processing programs: automatic font switching for different languages. In fact, it goes one better than word processing programs and comes with macros for inserting arbitrary code between text from different unicode blocks, by making use of XeTeX's little known "intercharclass" behaviour. I was wondering: is something similar possible in mkiv yet? I know that with the font fallback mechanism, it's trivial to change fonts for unicode ranges, but is it possible to change hyphenation patterns (or even insert "arbitrary code") according to unicode blocks? Would be quite helpful for those of us working with different scripts. All best Thomas
On 21-12-2010 6:37, Thomas Schmitz wrote:
I was wondering: is something similar possible in mkiv yet? I know that with the font fallback mechanism, it's trivial to change fonts for unicode ranges, but is it possible to change hyphenation patterns (or even insert "arbitrary code") according to unicode blocks? Would be quite helpful for those of us working with different scripts.
For latin an unicode block does not relate to a language so it would be broken by design to add such an automatism, however, for a while already it is possible in mkiv to load multiple patterns. See mixed-001.tex in the test suits \setuplanguage[ru][patterns={ru,us}] \setuplanguage[en][patterns={us,ru}] \setuplanguage[de][patterns={de,ru}] I suppose that greek can also be happily mixed in as well (I suppose that's what you want). Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Wed, 22 Dec 2010 11:02:03 +0100
Ulrike Fischer
Do you know where (roughly) the code for the fallback is? I would like to know how it work.
--
You mean where it is actually defined in the core files? A quick grep for "fontfallback" shows that it's in font-ini.mkiv and font-ctx.lua. Thomas
participants (3)
-
Hans Hagen
-
Thomas Schmitz
-
Ulrike Fischer