6

How can I disable hyphenation for an entire paragraph without changing the hyphenation of its words throughout the rest of the text? And of course, maintaining the paragraph alignment!

Thanks, in advice.

7

You can set \hyphenpenalty=10000 and \exhyphenpenalty=10000, so TeX sees hyphens as “infinitely bad” and avoids them. Add \sloppy if you want to make TeX obey margins at all costs, adding extra inter word spaces to preserve the margins justification.

You can have an environment to do that for you:

\documentclass[12pt,a5paper]{article}

\usepackage{lipsum}

\newenvironment{nohyphens}{%
  \par
  \hyphenpenalty=10000
  \exhyphenpenalty=10000
  \sloppy % Makes TeX obey margins by stretching inter word spaces
}{\par}

\begin{document}

\lipsum[2]

\begin{nohyphens}
\lipsum[2]
\end{nohyphens}

\end{document}

enter image description here

2

You can use the nil language from babel:

\documentclass[]{article}
\usepackage[nil,ngerman]{babel}

\textwidth=3cm
\begin{document}
deutscher Textabschnitt mit Trennungen

{\selectlanguage{nil}%
deutscher Textabschnitt mit Trennungen\par
}


\end{document}

enter image description here

  • 2
    \begin{hyphenrules}{nohyphenation}...\end{hyphenrules}. – egreg Apr 15 at 22:06

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.