[XeTeX] XeTeX for Linux (first experiencies)

Jonathan Kew jonathan_kew at sil.org
Mon Jun 5 13:09:01 CEST 2006

On 4 Jun 2006, at 11:23 pm, Pablo Rodríguez wrote:
> After some playing with my own dissertation, I have discovered the
> following issues:
> XeTeX does not work with babel and polutonikogreek. Check the  
> following
> file:
> \documentclass[12pt,a4paper]{article}
> \usepackage{fontspec}
> \setromanfont{Gentium}
> \usepackage[polutonikogreek,english]{babel}
> \begin{document}
> Hi, it's me.
> \foreignlanguage{polutonikogreek}{χαλεπὰ τὰ καλά}
> \end{document}

This is to be expected, as Babel-based packages such as  
polutonikogreek are designed to work with legacy 8-bit encoded text  
and fonts, and do not interact well with xetex's Unicode support. The  
Greek package probably goes to  some lengths to control "font  
encodings" and remap character codes, and thus interferes with the  
simple pure-Unicode path that is natural in xetex.

It should work to use polytonic Greek *without* the help of Babel,  
except that you won't get hyphenation support. What is needed is a  
Babel-like mechanism to switch hyphenation patterns, and load new  
"fixed texts" for labels like Figure, Chapter, etc., but without  
forcing particular legacy font encodings. Someone with a good  
understanding of Babel could perhaps separate out the functionality  
we still need, to produce a xetex-compatible "Babel Lite" package,  
but I haven't looked into this seriously.

You'll find some discussion of the issues in the list archives, I  
think, in relation to languages like Russian.

> hyperref is not able to pass non ISO-8859 characters to the bookmarks
> and info files.

Yes, I'm aware that this is a problem area.

> With the original dvipdfmx I was able to do it using the
> CJKbookmarks option and adding "\AtBeginDvi{\special{pdf: tounicode
> UTF8-UCS2}}" to the file. UTF8-UCS2 can be located at
> http://project.ktug.or.kr/dvipdfmx/sample/omega/lambda-example2.zip.

As xdvipdfmx is directly based on dvipdfmx, it may be possible to do  
something similar. But note that the whole TeX font (re-)encoding  
machinery isn't really relevant any more once we're rendering Unicode  
text with Unicode fonts, so if the "pdf: tounicode" stuff relies on  
the encoding vector from the font map file, then it'll need some  
modification to work directly with Unicode fonts instead. I haven't  
looked into this yet.

Thanks for the comments.


More information about the XeTeX mailing list