When I define custom hyphenation with \hyphenation
in XeTeX, it seems to only work for the main body of the text, but not for the bits inside \text<language>
(as in \textgerman
) environments.
I know I can use \-
but I would rather have a global solution.
A minimal example:
\documentclass[draft]{article}
\usepackage{xltxtra}
\usepackage{polyglossia}
\setmainlanguage[variant=british]{english}
\setotherlanguage{german}
\begin{document}
\hyphenation{bb-bbb}
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbb
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \textgerman{bbbbb}
\end{document}
yields this: