3

I'm experiencing a glyph issue when using \grq from the german package under xelatex.

\documentclass{article}

\usepackage{libertine}
\usepackage{german}

\begin{document}
\glq test\grq
\end{document}

xelatex outputs the wrong ending quote throwing a font warning:

enter image description here

LaTeX Font Warning: Font shape 'OT1/LinLibertine(0)/m/n' undefined (Font) using 'OT1/cmr/m/n' instead (Font) for symbol 'grq' on input line 7.

However, it should rather look like this, and pdflatex does it right:

enter image description here

Any idea what is going wrong?

4

You shouldn't be using the german package that's obsolete and present only for compatibility with older documents.

However, the problem is present also with babel. I'll add the code for working around the issue.

\documentclass{article}

\usepackage[ngerman]{babel}
\usepackage{libertine}
\usepackage{ifxetex}

\ifxetex
  \DeclareTextSymbol{\glq}{\encodingdefault}{"201A}
  \DeclareTextSymbol{\grq}{\encodingdefault}{"2018}
  \DeclareTextSymbol{\glqq}{\encodingdefault}{"201E}
  \DeclareTextSymbol{\grqq}{\encodingdefault}{"201C}
\fi

\begin{document}

\glq test\grq

\glqq test\grqq

\end{document}

enter image description here

Note, though, that you can input the characters directly, if you're using XeLaTeX:

‚test‘

„test“

The output would be the same.

  • Great, many thanks! Yes, I'm revisiting an older document that is stuffed with \glq \grq. In fact, I'm using polyglossia with babelshorthands, but unfortunately the single quotes are not (yet?) included. Does it mean that with your modifications I can do without the german package? – Timm Jul 9 '15 at 19:56
  • 1
    @Timm You should do without the german package. – egreg Jul 9 '15 at 19:58

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.