[XeTeX] Can't activate hyphenation for Unicode polytonic Greek
Ralf Stubner
ralf.stubner at physik.uni-erlangen.de
Wed Jul 12 09:55:12 CEST 2006
Jonathan Kew <jonathan_kew at sil.org> writes:
> \usepackage[greek]{babel} ought to be one way to do this, but I
> suspect Babel may interfere with Unicode Greek text, as it is closely
> tied to legacy input and font encodings.
I think the main problem with babel's greek option is that the command
\greektext, which is executed at every language switch, changes to LGR
encoding. with XeTeX one does not want to change encoding, but one might
want to chage font. Hence the following code might work, once the right
hyphenation files are in place:
\documentclass[a4paper]{article}
\usepackage{fontspec}
\setromanfont{FPL Neu}
\newfontinstance\greek[Script=Greek]{GFS Didot}
\newfontinstance\latin[Script=Latin]{FPL Neu}
\usepackage[greek,english]{babel}
\renewcommand{\greektext}{\greek}
\renewcommand{\latintext}{\latin}
\begin{document}
Hello world
\selectlanguage{greek}
χαλεπὰ τὰ καλά
\selectlanguage{english}
back again
\end{document}
Other language switching commands should work, too, but almost no
testing has been done ...
cheerio
ralf
More information about the XeTeX
mailing list