[XeTeX] Hyphenation exceptions for German -- how?

Thomas Fehige thomas at fehige.de
Thu Jul 14 13:01:02 CEST 2011


  Thanks Ulrike, that's logical /and/ works :) I had thought that you 
can only have one \hyphenation{...} per document.

Cheers -- Thomas

Am 14.07.2011 12:00, schrieb Ulrike Fischer:
> Am Thu, 14 Jul 2011 09:00:35 +0200 schrieb Thomas Fehige:
>
>> While we're at it: Is there a ready way to define different hyphenation
>> exceptions for each language used in one document?
> Activate the languages before using \hyphenation:
>
>
> \documentclass[12pt]{article}
> \usepackage{fontspec}
> \usepackage{xltxtra}
> \usepackage{polyglossia}
> \setdefaultlanguage{german}
> \setotherlanguage{english}
> \selectlanguage{german}
> \hyphenation{
> 	einer
> 	Me-ta-ethik}
>
> \selectlanguage{english}
> \hyphenation{met-ae-th-ik}
>
>
>
> \begin{document}
> 	\showhyphens{Metaethik, einer}
>
> \selectlanguage{english}
>   	\showhyphens{Metaethik, einer}
>
> \end{document}
>
>
> (With babel the \selectlanguage is not necessary for the main
> language as babel loads its patterns directly. Polyglossia loads
> everything only at begin document.)
>



More information about the XeTeX mailing list