Jun 17

More LaTeX Tips for Your Thesis – Quoting

Quoting in standard LaTeX has got a few drawbacks:

  • Depending on which language-packages you use, you sometimes need "', sometimes just " for quotes (otherwise it might print umlauts).
  • Switching between the type of quotation marks late means you have to replace them throughout your document.
  • You have to pay attention to using different quotation marks when nesting them.
  • Literal quotes are not directly associated to the reference you give. And you cannot easily search for them in your document (\cite also appears independently of quotes, quotation marks also appear for other reasons):
    "'To be or not to be"'\cite{hamlet}

The package to solve all of your quotation problems is called csquotes.

\usepackage[ngerman, english]{babel}

In case you don’t know, the babel package provides basic internationalisation support, e.g. for splitting words at the correct positions.The csquotes package’s autostyle option depends on the babel package for recognising your document language. It then sets the type of quotation marks according to the mapping given in the options.

Here is a small usage example:

And he was like: \enquote{We were in a drinking establishment called \enquote{The Foo Bar}.}\\

\textcquote[p. 44]{hamlet}{To be, or not to be: that is the question

The first line introduces the \enquote command, which basically just places the text in the appropriate quotation marks. However, for the nested quote, the marks are automatically switched to double quotes. The \textcquote command associates a quote with a citation and behaves mostly like manual quoting with an added \cite. The output looks like this:

Since csquotes has got many more options than these, you might want to refer to the manual.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>