[XeTeX] Can't activate hyphenation for Unicode polytonic Greek

Bruno Voisin bvoisin at mac.com
Wed Jul 12 00:41:42 CEST 2006


Le 11 juil. 06 à 23:38, Jonathan Kew a écrit :

> \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. Perhaps a LaTeX expert here
> could tell us the proper way to select a different hyphenation
> language *without* loading the Babel package?
>
> (I think an unofficial way would be to insert:
>
>    \language=\csname l at greek\endcsname
>
> before the text, but there ought to be a normal user-level command
> that accomplishes this.)

I've never tried myself, but something that could be tried is putting  
in the preamble:

\usepackage[greek,english]{babel}

so that babel-specific settings for both English and Greek are  
loaded, with English the default, and then write just after \begin 
{document}:

\begin{hyphenrules}{greek}

and immediately before \end{document}:

\end{hyphenrules}

Untested (having one environment spanning the whole document might  
exhaust TeX memory), but who knows?

Actually this is quite consistent with your solution, given the  
definition in hyphen.cfg and switch.def:

\def\hyphenrules#1{%
   \expandafter\ifx\csname l@#1\endcsname\@undefined
     \@nolanerr{#1}%
   \else
     \language=\csname l@#1\endcsname\relax
     \languageshorthands{none}%
   \fi
   }
\def\endhyphenrules{}

Bruno


More information about the XeTeX mailing list