# hyphenation for language ngerman doesn't work in TeXnicCenter/MiKTeX

Hello everyone!

I have a problem writing my master's thesis and I hope someone can help. I am using TeXnicCenter 2.02 in combination with MiKTeX 2.9.4248. The Header of my document looks like this:

\documentclass[12pt,a4paper]{report}

\usepackage{amsmath}

\usepackage{amsthm}

\usepackage{fancyhdr}

\usepackage{titlesec}

\usepackage[utf8]{inputenc}

\usepackage{hyphsubst}

\usepackage[ngerman]{babel}

\begin{document}

Text of my document...

\end{document}


Unfortunately the hyphenation is incorrect. For example the German word "Optimierungsproblem" at the end of one line is separated to "Optimierungsprob- lem" instead of the correct way "Optimierungspro- blem"

and there is one Warning with the message:

"pdflatex > Package babel Warning: No hyphenation patterns were preloaded for the language ngerman into the Format. Please, configure your TeX System to add them and rebuild the Format. Now I will use the Patterns preloaded for \language=0 instead of Input line 42"

The Input lines 41, 42 and 43 (of the ngerman.ldf file) look like this:

41 \ifx\l@ngerman\@undefined

42 \@nopatterns{ngerman}



The german hyphenation package is installed in MiKTeX. I've tried to find an answer in other questions and someone suggested to add the line "ngerman loadhyph-de-1996.tex" to the language.dat file. So I checked the language.dat file but the following lines are all included:

54 ngerman loadhyph-de-1996.tex

55 ngerman-x-2014-05-21 dehyphn-x-2014-05-21.tex

56 =ngerman-x-latest


Can anyone help me regarding this problem? If I need to add a log file or other information, please let me know.

Best regards, Dom

• Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. – karlkoeller Mar 31 '15 at 9:29
• As an aside, you also need the T1 font encoding for the hyphenating to work properly on words with diacritics (umlauts, etc.), that is to say you should put \usepackage[T1]{fontenc} in your preamble as well. – Franck Pastor Mar 31 '15 at 9:32
• In miktex settings check the status of the ngerman language(s). In case that you have the portable miktex: be aware that there is a bug so don't change anything, ask back first. – Ulrike Fischer Mar 31 '15 at 9:34
• Thank you for your responses! I will have a look at the starter guide. I also included \usepackage[T1]{fontenc} in the Header now. And yes, I am using the portable miktex. How can I fix this bug? Best regards – user75340 Mar 31 '15 at 10:52
• You can't fix the bug. See sourceforge.net/p/miktex/bugs/2342 and tex.stackexchange.com/questions/217523/…. If you destroyed your language.ini you need a new one. Try if you find one here im miktex-misc: mirrors.ctan.org/systems/win32/miktex/tm/packages/… – Ulrike Fischer Mar 31 '15 at 13:05

Some German words just cannot be hyphenated properly by the package. Especially those that consists actually of two or more words. For these words use:

\hyphenation{Ele-men-tar-ob-jek-te Op-ti-mie-rungs-pro-blem}


Seperate the words with a space character, like in the example.

Edit 1:

A full example:

\documentclass[12pt,a4paper]{report}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{fancyhdr}
\usepackage{titlesec}
\usepackage[utf8]{inputenc}
\usepackage{hyphsubst}
\usepackage[ngerman]{babel}

\hyphenation{Ele-men-tar-ob-jek-te Op-ti-mie-rungs-pro-blem}

\begin{document}

Text of my document...

\end{document}


Edit 2:

See here. Sorry, it's German, but it's meant to help the author.

• Though this answers the question, it doesn't answer the question. There is (was) a very specific bug in MikTeX, fixing that is the solution to the problem (no hyphenation patterns loaded). – Johannes_B Aug 31 '15 at 12:54
• Yes, but the original question was how to hyphenate the word "Optimierungsproblem". According to the link I gave, hyphenation doesn't work with compounded words and this word is a compound. – Mackie Aug 31 '15 at 12:58
• Sorry, the question is not how to hyphenate the word Optimierungsproblem. The question is how to get ngerman hyphenation patterns in MikTeX, because there was a bug at the time. – Johannes_B Aug 31 '15 at 13:45
• Ok, I guess you're right. So I just gave a helpful alternative if the bug cannot be fixed. But I doesn't matter as this question is from march (which I didn't see at first). – Mackie Sep 1 '15 at 6:01