I have included the ngerman package and I write


into the preamble of my document. However, latex complains with

!Improper \hyphenation will be flushed.
\grmn@OTumplayt ->\protect
l.3 \hyphenation{An-fangs-n"a

How can I fix this? By the way: I'm using the document class scrartcl.

EDIT: The following minimal not-working example leads to this error message:

Es soll das Wort names Anfangsn"aherung richtig getrennt werden. 
  • 1
    Welcome to TeX.SX! Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – Mensch Jun 17 '13 at 10:33
  • I will do that. – Ralph Tandetzky Jun 17 '13 at 10:41
  • As far as I know, there is no solution. Have a look for example here: forkosh.com/latex/ltx-244.html – bene Jun 17 '13 at 10:57
  • @bene hyphenation should just work, see the answers posted. – David Carlisle Jun 17 '13 at 11:46
  • 2
    Instead of the obsolete ngerman package it's better to load \usepackage[ngerman]{babel} – egreg Jun 17 '13 at 12:23

You need to enable an encoding that has the accented letters, then that word appears to be hyphenated as you wish already using the default hyphenation patterns.

enter image description here




\parbox{2pt}{\hspace*{1pt}Anfangsn"aherung richtig}
  • What does \usepackage[T1]{fontenc} exactly do? In my viewer the text look just slightly different now. But that might just be a rendering thing. – Ralph Tandetzky Jun 17 '13 at 11:23
  • @RalphTandetzky It tells LaTeX to use an 8-bit "T1" encoded font family (these are in fact different fonts) in the classic Computer Modern fonts by Knuth there were only base letters and all accents are constructed using the \accent primitive you can not use such constructs in hyphenation patterns. there are several implementations now of "larger" computer modern fonts, you could add \usepackage{lmodern} for example to try the lmodern set. – David Carlisle Jun 17 '13 at 11:44

With the following MWE it should work. On my current MikTeX 2.9 it compiles without an error.

I used package babel with option ngerman and added the font encoding and input encoding. As you can see can you now write umlauts in the LaTeX document without shortcuts like \"a or "a.

Es soll das Wort namens Anfangsnäherung richtig getrennt werden. 

Because package ngerman is rather old (1998, see documentation on CTAN) you should better use the maintained package babel with option ngerman (latest document version 2012).

Please have a look on english l2tabu.pdf or german l2tabu.pdf (the german version is newer) for outdated and obsolete packages you should not use longer (but you will still find them in older LaTeX documents ...).

  • Oh you just beat me to it:-) In fact \hyphenation appears not to be needed in this case, the default hyphenation pattern gives the same hyphenation points. – David Carlisle Jun 17 '13 at 11:07

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.