Text Formattingcsquotes | Smart Quotes

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
Bram
Posts: 20
Joined: Sat Jul 14, 2012 12:54 pm

csquotes | Smart Quotes

Post by Bram »

I have often texts where authors write straigt single quotes ('). I need to replace them with the default quotation style in the language involved (e.g. `This is a quotation’).

The csquotes package does this with \MakeOuterQuote{}. It works perfect with \MakeOuterQuote{"}, but when using \MakeOuterQuote{'} I get an 'invalid argument' error (as in the example below).

Any help would be appreciated

Code: Select all

\documentclass{memoir}

\usepackage{csquotes}

\MakeOuterQuote{'}
\begin{document}
'This is a quotation'
\end{document}
Last edited by localghost on Thu Sep 27, 2012 8:54 pm, edited 2 times in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

csquotes | Smart Quotes

Post by cgnieder »

If you compile your MWE from the shell and actually press »H« as suggested in the error message you'll get the whole error message:
Only single characters with category code 12 or 13 may be
allocated as active quotes. Numbers, punctuation marks, and
characters which are part of LaTeX's syntax or reserved
for a specific purpose are invalid.
The forbidden characters are:

Code: Select all

[]*@~-`'.,;:!?0123456789
Solution: use another character:

Code: Select all

\documentclass{memoir}

\usepackage{csquotes}
\MakeOuterQuote{+}

\begin{document}
+This is a quotation+
\end{document}
Regards
site moderator & package author
Bram
Posts: 20
Joined: Sat Jul 14, 2012 12:54 pm

Re: csquotes | Smart Quotes

Post by Bram »

Thanks! And now I know how to get useful error messages.
Regards,
Bram
Post Reply