0

I need to define hyphenation for words that contain colons. Using hyphanat package returns error Not a letter. \hyphenation{Konsument:. Any suggestions?

\documentclass{article}
\usepackage{hyphenat}
\hyphenation{Konsument:innen-zusammen-schlüsse}

\setlength\textwidth{1mm} % just for this example
\begin{document}
    Konsument:innenzusammenschlüsse
\end{document}
3
  • I assume you want to allow a line break after the : character as well as hyphenation within the "Konsument" substring. Is this correct? Please advise.
    – Mico
    Jul 19 at 8:42
  • Honestly, I don't think so (but OP would have to answer that). "Konsument:innen" is an "inclusive" (aka politically correct) shorthand to use instead of "Konsumenten und Konsumentinnen", i.e. both male and female forms in German. It doesn't lend itself to a line break easily, I think.
    – Ingmar
    Jul 19 at 9:00
  • 1
    @Ingmar your answer is correct.
    – kilsen
    Jul 20 at 8:43

1 Answer 1

2

"letter" here means has a lower-case code. Also, tex will not hyphenate the first word (unless using luatex) so I added x

enter image description here

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{hyphenat}
\lccode`\:=`\:
\hyphenation{Konsument:innen-zusammen-schlüsse}

\setlength\textwidth{1mm} % just for this example
\begin{document}
x    Konsument:innenzusammenschlüsse
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .