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.

migrated from stackoverflow.com Mar 3 '14 at 15:24

This question came from our site for professional and enthusiast programmers.

  • 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 Mar 7 '14 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 Mar 10 '14 at 9:22
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

  • Thanks for the answer. Switching to LuaTeX is now not an option for me. – Freude Mar 4 '14 at 8:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.