3

I've got a problem with the combination of (German) quotation marks and exclamation marks in LaTeX. Consider this code:

\documentclass[12pt,twoside,a4paper]{book}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\begin{document}
\glq Nochmal!\grq
\end{document}

Result: 'Nochmal¡

Instead of: 'Nochmal!'

Basically the exclamation mark is upside down and the second quotation mark disappears. Another thing to mention: In some cases it works just fine, while in other cases I get the upside down exclamation mark.

How can I solve this problem?

  • 2
    If you add a pair of braces after the exclamation mark, the problem disappears. – Bernard Jun 30 '19 at 11:58
5

Another reason why I prefer to use csquotes. This here works fine:

\documentclass[12pt,twoside,a4paper]{book}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage[autostyle]{csquotes}
\begin{document}
\enquote*{Nochmal!}
\end{document}

Edit: I opened an issue https://github.com/latex3/babel/issues/19

| improve this answer | |
4

It seems that the exclamation mark and \grq form a ligature, because \grq expands to \textquoteleft, which forms this ligature. Same as inputting

!`

Putting anything in between the two, or around one of the two, that suppresses a ligature works, e.g., a \relax in between, an empty group in between, a \hbox around one of the two, etc.

| improve this answer | |

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.