3

I would like to know if I can have a paragraph break in speech and have the speech marks appear automatically. This would help with converting long text from British style to American style for instance. I would like the text to appear like this, keeping the LaTeX as simple as possible:

'This is a quote,' he said. 'But what is possible?

'Can I do this?'

Here is a MWE of what I can currently obtain but without speech marks at the start of the second paragraph:

\documentclass{article}
\usepackage[british]{babel}
\usepackage{csquotes}

\begin{document} \enquote{This is a quote} he said. \enquote{But what is possible?

Can I do this}.

\end{document}

Epsomloki
  • 33
  • 6

2 Answers2

4

You can adjust the quote style for the language in use with csquote's \DeclareQuoteStyle (with middle marks added to the original in csquotes.def):

\documentclass{article}
\usepackage[british]{babel}
\usepackage{csquotes}

\DeclareQuoteStyle[british]{english} {\textquoteleft} [\textquoteleft]% middle outer mark {\textquoteright} [0.05em] {\textquotedblleft} [\textquotedblleft]% middle inner mark {\textquotedblright}

\begin{document} \enquote{This is a quote} he said. \enquote{But what is possible?

Can I do this}. \end{document}

enter image description here

gusbrs
  • 13,740
3

A simple idea is to add a left quote by default to each paragraph using \everypar{`}.

Of course this is only desired within the \enquote command, so you can redefine \enquote to include \everypar. The non-starred version of \enquote is defined in csquotes.sty with a single line of code, so it is easy to copy that definition in your own document and change it.

\documentclass{article}
\usepackage[british]{babel}
\usepackage{csquotes}
\makeatletter
\long\def\csq@quote@i#1#2#3{%
  \csq@bqgroup#1\everypar{`}\csq@oqopen@i#3\csq@qclose@i{#2}}
\makeatother
\begin{document}
    \enquote{This is a quote} he said. \enquote{But what is possible?
Can I do this}.

\end{document}

Result:

enter image description here

Note that \everypar is used for many things in LaTeX so it can be overwritten if the contents of \enquote contains more complex code, resulting in the quote not being applied. However, for regular text it should be relatively safe.

Marijn
  • 37,699
  • This is what I was looking for! I changed the \everypar argument to \csq@qopen so that it switches with style. Otherwise works well, thanks. Will now do some reading around \everypar to understand how/when it might fail. – Epsomloki Dec 15 '21 at 22:46
  • 1
    This may work fine but I would recommend using the answer by gusbrs instead (and also change the accept mark to that answer). I didn't know that csquotes actually has a setting for 'middle mark' but that is arguably more robust than setting \everypar yourself. – Marijn Dec 16 '21 at 08:19