5

How do you force LaTeX to treat three closing quotation marks as the first one being a single-mark, the last two being a double mark?

This is important when a quote within a quote ends as follows:

``the cat 'sat on the mat'''.

This renders:

'' '.

But I want it to render:

' ''.

MWE:

\documentclass[11pt, a4paper]{book}
\begin{document}
``Testing `one, two, three'''.
\end{document}
8

I would recommend to use the csquotes package.

\documentclass[11pt, a4paper]{book}

\usepackage{csquotes}

\begin{document}
\enquote{Testing \enquote{one, two, three}}.
\end{document}

This package is configurable with respect to the style of the quotation. Compare, for example, version A

\documentclass[11pt, a4paper]{book}

\usepackage[english]{babel}
\usepackage[style=british]{csquotes}

\begin{document}
\enquote{Testing \enquote{one, two, three}}.
\end{document}

option style=british

with version B

\documentclass[11pt, a4paper]{book}

\usepackage[english]{babel}
\usepackage[style=american]{csquotes}

\begin{document}
\enquote{Testing \enquote{one, two, three}}.
\end{document}

option style=american

In most cases, the combination of babel and csquotes using the autostyle=true option of csquotes is just fine.

6

As two following single quotation marks are always merged, you can use a space in input. That will give the desired output.

\documentclass[11pt, a4paper]{book}
\begin{document}
``Testing `one, two, three' ''.
\end{document}

Alternatively, if you prefer very small space, you could use (not in LuaLaTeX, thanks to Harald Hanche-Olsen)

\documentclass[11pt, a4paper]{book}
\begin{document}
``Testing `one, two, three'{}''.
\end{document}

And last method (suggested by Knuth in the TeXbook and by barbara beeton in the comments):

\documentclass[11pt, a4paper]{book}
\begin{document}
``Testing `one, two, three'\,''.
\end{document}
  • In luatex, inserting an empty group {} does not inhibit ligatures, so your second alternative doesn't work there. You can fix that with a zero length space, instead: …three'\kern0pt''. This has the added advantage that adjusting the amount of space is trivial. (But of course, with luatex, you can just use the proper quotes directly, avoiding the whole issue.) – Harald Hanche-Olsen Nov 13 '17 at 14:33
  • 3
    in the texbook, knuth recommends using \, for the space. – barbara beeton Nov 13 '17 at 15:46
  • 3
    \, is also recommended in Leslie Lamport's LaTeX: A Document Preparation System – Au101 Nov 14 '17 at 0:12
5

I let csquotes handle this:

\documentclass[11pt, a4paper]{book}
\usepackage[english]{babel}
\usepackage[autostyle]{csquotes}
\begin{document}
\enquote{Testing \enquote{one, two, three}}.
\end{document}

enter image description here

0
\documentclass{article}
\newcommand\mt{\kern 0.083335em}
\begin{document}

% A poor's man solution without packages
``Testing `one, two, three'\mt''.

% Or ...
\textquotedblleft
    Testing 
    \textquoteleft
        one, two, three%
    \textquoteright\mt
\textquotedblright.

\end{document}
  • Could you explain? That \kern number looks very arbitrary. – Aaron Hall Nov 13 '17 at 20:44
  • @AaronHall 0.083335em is exactly one half \thinspace. At glance seem to fit with the space used with csquotes ( I have not searched in the source code of the package, maybe is not exactly the same). – Fran Nov 13 '17 at 21:02
  • Still seems arbitrary. Why one-half of a \thinspace? – Aaron Hall Nov 13 '17 at 21:04
  • @AaronHall Why not? Why \thinspace is one-sith part of em (.16667em) instead of one-tenth of pi logarithm (.114473em) or something else? Is the same space used in csquotes, the smallest standard spacing (\thinspace) seem to large for this and one quarter is hardly noticed. But if this is not convincing, nothing prevents you from changing it. – Fran Nov 13 '17 at 21:23

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.