1

I read in another question that it is possible to use the shorthand of typing two commas, which should then compile into opening German quotation marks. Here is a minimal working example:

\documentclass[a4paper,ngerman]{scrartcl}

\usepackage[ngerman]{babel}

\begin{document}
Dies ist ein ,,Test``.

Dies ist ein anderer \glqq Test\grqq{}.
\end{document}

I noticed that when compiling with PDFLaTeX, the output looks as follows (note that only the double acutes are compiled correctly, probably because they are the shorthand for both German closing and English opening quotation marks):

enter image description here

Compiling with XeLaTeX or LuaLaTeX, both shorthands are detected properly:

enter image description here

It seems like PDFLaTeX does not contain the shorthand definition for quotation marks other than the English ones. Is there a way of using the shorthands for other languages with PDFLaTeX, e.g. by installing an additional package?

0

1 Answer 1

2

For languages where diacritics are used it's recommended to add

\usepackage[T1]{fontenc}

when using pdflatex, so the letters with the diacritics will be precomposed and will work properly in hyphenation.

The default font encoding is OT1, where no ligature for ,, is usually defined, for the simple reason that (most of) the OT1-encoded fonts don't have low German quotes to begin with.

To the contrary, T1-encoded fonts have (or should have) a ligature for ,, and suitable kerning pairs.

\documentclass[a4paper,ngerman]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}

\begin{document}
Dies ist ein ,,Test``.

Dies ist ein anderer \glqq Test\grqq{}.
\end{document}

enter image description here

2
  • So do LuaLaTeX and XeLaTeX already use T1 encoding by default? Edit: Nevermind, cf. here: tex.stackexchange.com/a/659475/205359
    – TiMauzi
    Commented Oct 6, 2022 at 14:23
  • 1
    @TiMauzi No, they use an altogether different encoding and T1 should not be loaded with them.
    – egreg
    Commented Oct 6, 2022 at 14:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .