11

I have an issue with the double quote in my quotation.

Using "OpenGL....." results in ÖpenGL... even with \"OpenGL... the result is the same.

Using \verb results in double quotes in a wrong font type (at least it looks out of place).

\begin{quotation}
"OpenGL (Open Graphics Library) ist eine Spezifikation für eine plattform-
und programmiersprachenunabhängige Programmierschnittstelle zur
Entwicklung von 2D- und 3D-Computergrafik."
\end{quotation}
2
  • 2
    \shorthandoff{"} could help, see the babel documentation for this command. Though it's recommendable to quote in another way, as the answers show.
    – Stefan Kottwitz
    Feb 11, 2011 at 18:25
  • 6
    Just a comment: usually in TeX, putting a backslash makes things "worse" and not "better", in that it does not escape characters to become less special, but more. It's not like \" in, say, Linux filenames, which is a literal quotation character rather than a string delimiter.
    – Ryan Reich
    Feb 11, 2011 at 19:32

2 Answers 2

25

Do not use " for quoting, use `` and '' (English quotes) or "` and "' (German quotes, needs babel, see below) instead:

\begin{quotation}
"`OpenGL (Open Graphics Library) ist eine Spezifikation für eine plattform-
und programmiersprachenunabhängige Programmierschnittstelle zur
Entwicklung von 2D- und 3D-Computergrafik."'
\end{quotation}

The babel package with the german/ngerman option does the "O -> Ö translation. This is to for (old) systems which do not have the Umlauts.

4
  • Yeah, thanks. I am using \usepackage[ngerman]{babel}, hope that is correct?! Feb 11, 2011 at 18:13
  • 6
    This, or skip that and take a look at the csquotes package. (Background for the OP: "+character is special when support for german is loaded, so that "a yields ä etc. If you don't like csquotes, "` and "' will yield proper quotes.) Feb 11, 2011 at 18:14
  • @Warren: This is correct (for the new orthography). It just changed the meaning of ". Feb 11, 2011 at 18:21
  • @Ulrich: Yes, I should have mentioned csquotes, but I tried not to give too much information. Feb 11, 2011 at 18:21
11

The csquotes package has been mentioned several times, so I decided to make a small example:

\documentclass{article}

\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{csquotes}

\SetBlockEnvironment{quotation}

\begin{document}

\begin{displayquote}
  \enquote{%
    OpenGL (Open Graphics Library) ist eine Spezifikation für eine plattform- und
    programmiersprachenunabhängige Programmierschnittstelle zur Entwicklung von
    2D- und 3D-Computergrafik.%
  }%
\end{displayquote}

\end{document}

Note that display quotes are usually set without quotation marks.

3
  • 1
    And now my beginner question: why using the % behind the curly brackets and the text? Feb 11, 2011 at 21:03
  • 4
    @Warren: a linebreak counts as a space (unless "hidden" in a oomment), and here this would result in a space, for example, after the opening quote before the word OpenGL. Feb 11, 2011 at 21:38
  • @Ulrich: thanks, I just tested it and I saw the spaces... didn't know that. Feb 11, 2011 at 22:08

You must log in to answer this question.

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