One of the great features of csquotes
is that, using \MakeAutoQuote
, we can simply type proper hard-coded quotation marks and have csquotes
do the rest, i.e. turn them into the correct format (as defined by language, typography etc.), plus take care of nesting:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[english]{babel}
\usepackage[babel]{csquotes}
\usepackage{lipsum}
\MakeAutoQuote{»}{«}
\MakeAutoQuote*{›}{‹}
\begin{document}
\lipsum*[1]
»\lipsum*[2] »[...]««
\lipsum*[3]
\blockquote{\lipsum*[2] »[...]«}
\end{document}
In my documents, I use »
+ «
and ›
+ ‹
exclusively (placed on an easy-to-reach position on my keyboard), no matter what language I'm writing in, no matter what the quotation marks are required to look like in print. Csquotes
will treat them as \enquote
s. That's perfect ...unless we're talking about a longer quote which we'd like to automatically be turned into block format. What I'd like to have is an even smarter autoquote that behaves like \blockquote
rather than \enquote
, i.e. that will switch to block format if the anticipated length hits a certain threshold. That way, I could uniformly use »
and «
throughout my document without having to manually consider the quote's length.
Unfortunately, \MakeAutoQuote
seems to be linked to \enquote
rather tightly (§4.1 of csquotes doc). What would be a way of changing that, and are there any pitfalls that I'm not aware of at the moment?
FOLLOW-UP
prompted by @cfr's and Ulrike's replies, I came up with (the idea of) what some might consider a somewhat dirty workaround. If we can use \mkblockquote
to define the block quotes' precise format, why not change the function of our active blockquoting chars (e.g. »
and «
) after the beginning of each instance of a block quote -- to become active textquoting chars inside the block quote? And give them back their block quote function at the very end?
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[english]{babel}
\usepackage[babel]{csquotes}
\usepackage{lipsum}
% define » and « to trigger a block quote
\MakeBlockQuote{»}{|}{«}
\renewcommand{\mkblockquote}[4]{%
% inside a block quote, make them trigger a text quote
\MakeAutoQuote{»}{«}%
#1#2#3#4%
% now they resume functioning as block quote triggers again
\MakeBlockQuote{»}{|}{«}
}%
\begin{document}
\lipsum*[1]
»\lipsum*[2]«
»\lipsum*[2] »[...]««
\lipsum*[3]
\end{document}
Apparently, this is not how it works. I had hoped \MakeBlockQuote
would work like, say, \renewcommand
, but csquotes
doesn't seem to accept a re-definition of the active blockquote chars. Even this construction causes an »invalid argument error«:
\MakeBlockQuote{»}{|}{«}
\MakeBlockQuote{>}{|}{<}
It's as if, once defined, the block quotes are inseperably tied to those chars. Or is there a way we can make this work somehow?
\MakeBlockQuote
once and for all? That seems so un-TeX-y to me.