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.
‑in the text where you want to not break and the normal symbol-where a break would be ok (tested with LuaTeX). The symbol=seems to not have any effect, as you also said. – Guest Dec 24 '22 at 14:50