# Format single quotes correctly automatically

LaTeX has a tendency to format all quotation marks in the same direction. For double quotes, I've fixed this problem by adding:

\usepackage[autostyle, english = american]{csquotes}
\MakeOuterQuote{"}


However, I can't seem to figure out how to do the same for single quotes. At the moment, This is a 'quote'. results in:

As you can see, the opening ' should be mirrored. I've found multiple topics about this on StackExchange and most suggest to use \lq or a backtick instead. However, I was wondering if it would be possible to automatically format single quotes correctly, just like I did with the double quotes above. Suggestions are greatly appreciated!

Well you can do it. But you need to remove the quote first from the list of reserved characters.

But if you uncomment the l'enfer you will see why csquotes did put the character in the list (and so prevents you from using it as a \MakeInnerQuote character).

I would advise you to avoid such tricks. They bite you when you don't expect them. Using \enquote is a bit more typing work but much safer. Instead of trying to tweak LaTeX invest some time to setup your editor so that it inserts \enquote with a shortkey.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage[autostyle]{csquotes}
\MakeOuterQuote{"}
\MakeAutoQuote{«}{»}
\makeatletter
%Remove \do\' from the list of reserved chars
\def\csq@resrvdchars{%
\do$\do$\do\*\do\@\do\~\do\-\do\\do\.\do\,\do\;\do\:%
\do\!\do\?\do\0\do\1\do\2\do\3\do\4\do\5\do\6\do\7\do\8\do\9}
\makeatother
\MakeInnerQuote{'}

\begin{document}
"quote" 'quote'  %l'enfer
\enquote{quote}
\enquote*{quote}
«quote «inner quote» quote»
\end{document}


csquotes decides which type of quotation marks to use based on the language setting. For example, in British typography it is custom to have single quote marks as the outer quote, and double as inner quote marks. For American English it's the opposite.

Hence,

\documentclass{article}
\usepackage[british]{babel}
\usepackage{csquotes}
\MakeOuterQuote{"}
\begin{document}
"quote"
\end{document}


produces

.

Change british to american`, and you get

.

• Was this helpful at all, or should I delete? – Torbjørn T. May 10 '16 at 9:37
• It doesn't really answer my question, but it's surely interesting to know. Thanks! – Algorithm_NL May 10 '16 at 11:13