[XeTeX] Hyphenation exceptions for German -- how?

Ulrike Fischer news3 at nililand.de
Thu Jul 14 12:00:09 CEST 2011


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.)

-- 
Ulrike Fischer 



More information about the XeTeX mailing list