Skip to main content
To write German in LaTeX with pdfLaTeX, load \usepackage[T1]{fontenc} and \usepackage[ngerman]{babel}. For OpenType system fonts or capital sharp s (ẞ), compile with XeLaTeX or LuaLaTeX using fontspec and polyglossia (\setdefaultlanguage[spelling=new]{german}). Both setups activate current German hyphenation rules, localized headings such as Inhaltsverzeichnis, and German date formatting.

Minimal pdfLaTeX setup

Pass ngerman for post-1996 spelling (Neue Rechtschreibung), whereas german selects pre-1996 rules.
pdflatex-german.tex
Ready to use this syntax? Continue in the browser editor when you want to adapt the example in a real project.Open LaTeX Cloud Studio
For regional variants under babel, replace ngerman with naustrian (Austrian German, e.g. Jänner instead of Januar) or nswissgerman (Swiss German). If your document mixes German and English, list your primary language last: \usepackage[english,ngerman]{babel}.

XeLaTeX and LuaLaTeX setup

Use XeLaTeX or LuaLaTeX when you want system fonts, native Unicode handling, or characters like the capital Eszett (ẞ). The example below configures polyglossia with german and spelling=new; add variant=austrian or variant=swiss for Austrian or Swiss German.
xelatex-german.tex
Do not load fontenc or inputenc when compiling with XeLaTeX or LuaLaTeX. If a template requires babel instead of polyglossia, \usepackage[ngerman]{babel} also works with XeLaTeX and LuaLaTeX alongside fontspec.

Umlauts, quotation marks, and compound hyphenation

Type ä, ö, ü, Ä, Ö, Ü, and ß directly in UTF-8. If you ever need ASCII fallbacks, use \"a, \"o, \"u, and \ss{}. Standard German typography uses bottom-opening and top-closing quotes („…“), not English …” or straight `"…"`. The cleanest approach across all engines is `csquotes`: load `\usepackage[autostyle=true,german=quotes]{csquotes}` and write `\enquote{...}`. If you prefer chevrons (`»…«`), pass `german=guillemets` instead. Under `babel` with `ngerman`, you can also use the shorthand ”`…”’ “. German compound nouns often cause overfull lines because LaTeX refuses to hyphenate a word that already contains an explicit hyphen (-). babel with ngerman provides shorthands that keep hyphenation active:
german-quotes-hyphenation.tex

Common mistakes

  • Loading [german]{babel} instead of [ngerman]{babel}: german uses pre-1996 hyphenation rules (such as breaking ck into k-k). Use ngerman for modern German.
  • Skipping \usepackage[T1]{fontenc} under pdfLaTeX: Without T1, words containing ä, ö, ü, or ß fail to hyphenate cleanly and copy-paste poorly from the generated PDF.
  • Active " shorthands breaking TikZ or tables: Because babel’s ngerman makes " active, code that expects a literal " (such as TikZ arrow labels) can fail. Load \usetikzlibrary{babel} for TikZ, or disable shorthands locally with \shorthandoff{"} and \shorthandon{"}.

In LaTeX Cloud Studio

LaTeX Cloud Studio runs TeX Live 2026 and sets LaTeX Engine to Auto (Recommended) by default. With Auto selected, LaTeX Cloud Studio starts the examples above with pdfLaTeX or XeLaTeX, as labeled. Preinstalled fonts for German include Liberation Serif, DejaVu Serif, CMU Serif, TeX Gyre Termes, and TeX Gyre Heros. If your university template requires a custom font not installed in the compile image, upload its .ttf or .otf files to the project and load them through fontspec. Ready to start a German paper in the browser? Start from the Basic Article template in LaTeX Cloud Studio and replace main.tex with whichever complete example above fits your setup.