ShareLaTeX guides

LaTeX Basics


Figures and tables

References and Citations


Document structure





Field specific

Class files

L a T e X supports many worldwide languages by means of some special packages. In this article is explained how to import and use those packages to create documents in German .



German language has some special characters. For this reason the preamble of your file must be modified accordingly to support these characters and some other features.

%German-specific commands
%Hyphenation rules
\hyphenation{Mathe-matik wieder-gewinnen}
\vspace{2cm} %Add a 2cm space
Dies ist eine kurze Zusammenfassung der Inhalte des Dokuments 
in deutscher Sprache verfasst.
\section{einleitende Kapitel}
Dies ist der erste Abschnitt können wir einige zusätzliche 
Elemente hinzufügen und alles wird korrekt geschrieben werden. 
Außerdem, wenn ein Wort ist viel zu lang und muss gekürzt werden 
kann, wird babel versuchen je nach Sprache richtig zu kürzen.
\section{Einloggen mit mathematischer Notation}
Dieser Abschnitt ist zu sehen, was mit Textbefehlen, die 
definieren, geschieht
\[ \lim x =  \theta + 152383.52 \]

There are three packages in this document related to the encoding and the special characters. These packages will be explained in the next sections.

If your are looking for instructions on how to use more than one language in a sinlge document, for instance English and German, see the International language support article.

Open an example of the babel package in ShareLaTeX

Input encoding

Modern computer systems allow you to input letters of national alphabets directly from the keyboard. In order to handle a variety of input encodings used for different groups of languages and/or on different computer platforms L a T e X employs the inputenc package to set up input encoding. In this case the package properly displays characters in the German alphabet. To use this package add the next line to the preamble of your document:


The recommended input encoding is utf-8 . You can use other encodings depending on your operating system.

Open an example of the babel package in ShareLaTeX

Font encoding

To proper L a T e X document generation you must also choose a font encoding which has to support specific characters for German language, this is accomplished by the fontenc package:


Even though the default encoding works well in German, using this specific encoding will avoid glitches with some specific characters. The default L a T e X encoding is OT1 .

Open an example of the babel package in ShareLaTeX

Language-specific packages and commands

To extended the default L a T e X capabilities, for proper hyphenation and translating the names of the document elements, import the babel package for the German language.


As you may see in the example at the introduction , instead of "abstract" and "Contents" the German words "Zusammenfassung" and "Inhaltsverzeichnis" are used.

The new ortographic rules approved in 1998 are supported by babel using ngerman instead of the german parameter.

Open an example of the babel package in ShareLaTeX


Sometimes for formatting reasons some words have to be broken up in syllables separated by a - ( hyphen ) to continue the word in a new line. For example, Mathematik could become Mathe-matik . The package babel , whose usage was described in the previous section, usually does a good job breaking up the words correctly, but if this is not the case you can use a couple of commands in your preamble.

\hyphenation{Mathe-matik wieder-gewinnen}

The first command will import the package hyphenat and the second line is a list of space-separated words with defined hyphenation rules. On the other side, if you want a word not to be broken automatically, use the {\nobreak word} command within your document.

Open an example of the babel package in ShareLaTeX

Reference guide

Commands enabled for the German language

Command Description
"a to produce the character ä, can be used with upper-case and lower-case vowels.
"s and "z to produce the German character ß. Works on upper-case and lower-case.
"ck for ck to be hyphenated as k-k .
"ff for ff to be hyphenated as ff-f , this is also implemented for l, m, n, p, r and t.
"| disable ligature at this point.
"- An explicit hyphen sign that allows hyphenation in the rest of the word.
"` Left double quotes, „
"' Right double quotes, “
"< French left double quotes «
"> French right double quotes »

Further reading

For more information see