5

I'm using the word "Zwei-Drittel-Abstimmungsmehrheit" a bunch of times in my document. Often it won't fit into the current line, extending into the right margin.

I figured out that the following package helps :

\usepackage[shortcuts]{extdash} 

Then I can write

Zwei\-/-Drittel\-/Abstimmungs\-mehrheit

and the hyphenation is done correctly.

Is there a way that I can set this hyphenation globally for this word? Like i can do it with the command

\hyphenation{...}

Sadly this command doesn't work for words containing dashes.

2
  • 1
    Why not simply \def\Zwei{Zwei\-/-Drittel\-/Abs\-tim\-mungs\-mehr\-heit} in the preamble and \Zwei in text?. On the other hand, the microtype package is a must using worm-like words.
    – Fran
    Commented Mar 7, 2014 at 19:43
  • That is what I'm currently using but if there are many words it could be difficult to remember all the commands and it is bad because I'm not the only Person who writes the document
    – Freude
    Commented Mar 10, 2014 at 9:22

1 Answer 1

4

In the question Adequate hyphenation of words already containing a hyphen, I was looking for a fully automatic solution (i.e., without special shorthands in the document body and without using \hyphenation or similar commands) to disregard break points less than four characters before and after existing hyphens. From Stephan Henning's answer I learned that at least a solution with \hyphenation is available if you're willing to switch to Lua(La)TeX. Compile the following example with LuaLaTeX:

\documentclass{article}

\usepackage[ngerman]{babel}

\hyphenation{Zwei=Drittel=Abstimmungs-mehr-heit}

\textwidth=120pt% just for the example

\begin{document}

Zwei-Drittel-Abstimmungsmehrheit

\end{document}

enter image description here

1
  • Thanks for the answer. Switching to LuaTeX is now not an option for me.
    – Freude
    Commented Mar 4, 2014 at 8:53

You must log in to answer this question.

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