[XeTeX] hyphenation

Jonathan Kew jonathan_kew at sil.org
Tue Jun 22 19:16:18 CEST 2004

On 22 Jun 2004, at 11:26 am, Somadevah at aol.com wrote:

> Dear listmembers,
>  I would appreciate any pointers from anyone who has managed to 
> compile their own hyphenation patterns for XeTeX. For instance, 
> previous versions of Devanagari used to use a preprocessor to add 
> discretionary hyphens all over the place. I can replicate this with a 
> Perl text filter but the input file becomes rather unreadable.

I'm attaching an example file illustrating how hyphenation patterns for 
Devanagari could be loaded.

To try this out, you can build a new format "hplain.xfmt" that includes 
these "hindi" patterns:

     % xeinitex -jobname=hplain \*plain \\input hindi-hyph-demo.tex 

This creates hplain.xfmt in the current directory.

Then, to try it out and prove that the patterns work as expected, 
assuming you have the Hindi.tex sample from the XeTeX sample files 

     % xetex \&hplain \\hsize=2in \\language=\\hindi \\input Hindi

(This sets the text in a narrow column, so as to force hyphenation to 
occur. You can, of course, adjust all the usual TeX parameters to get 
different effects.)

Note that this sample file just implements some simple rules based on 
consonant/vowel clusters; I'm not claiming any real linguistic validity 
for the hyphenation that results! I'll leave that up those of you who 
actually know how Hindi (or whatever language you're using) should be 

Hope this helps,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: hindi-hyph-demo.tex
Type: application/x-tex
Size: 1698 bytes
Desc: not available
Url : http://tug.org/pipermail/xetex/attachments/20040622/af81c659/hindi-hyph-demo.tex
-------------- next part --------------

More information about the XeTeX mailing list