# Hyphenation exception syntax for LuaLaTeX

by JayStrictor   Last Updated July 12, 2019 10:23 AM - source

I want to hyphenate some German words. As an example, for the word Erb-b2-Familie, I want

• the first hyphen sign to be non-breakable
• the second hyphen sign to be breakable
• the rest of the word (Familie) to be hyphenated as ususal.
% !TeX program = lualatex
\documentclass{scrbook}
\usepackage{polyglossia}
\setmainlanguage[babelshorthands=true]{german}
\usepackage{fontspec}
\setmainfont{Linux Libertine O}

\begin{document}

\parbox{0pt}{
Tyrosin"-kinase, Erb"~b2-Familie
}\\[2em]

\hyphenation{Tyrosin-kinase}    % <- this works
\hyphenation{Erb=b2=Fa-mi-lie}  % <- this does not?
\parbox{0pt}{
Tyrosinkinase, Erb-b2-Familie
}

\end{document}


I cannot find a good reference for how to use the \hyphenation{} command, in particular what the syntax of the exception word lists is. In a different question I found the option to use a = character to denote a breakable hyphen sign, but even that does not seem to work in my example.

Tags :