0

I am a very satisfied user of csquotes. Below a mwe using quotes in display mode.

\documentclass{article}
\usepackage[threshold=0]{csquotes}
  \MakeBlockQuote{<}{|}{>}
  \SetBlockEnvironment{quotation}

\begin{document}

<This is a text written in display mode, with the first letter in uppercase.

This is the second paragraph.>

\begin{displayquote}
\noindent this is a text written in display mode, with the first letter in lowercase.

This is the second paragraph.
\end{displayquote}

\end{document}

I would like that in all display mode quotes (block[c]quote; display[c]quote; active characters) the indentation of the first paragraph will be automatically removed (so without using, e.g. \noindent), in cases where the first letter of the text is lowercase.

2
  • Let me ask a question: does the first letter of the first paragraph in displayquote determine if there is indentation?
    – Celdor
    Feb 14, 2023 at 11:09
  • No, indentation depends only on the choice of using the quotation environment, via \SetBlockEnvironment{quotation}
    – matteo339
    Feb 14, 2023 at 12:59

1 Answer 1

0

I think this is very much the use case intended for the quoting package. It doesn't work by checking the case of the first letter, but rather by if there was a paragraph break before the quotation. And that's good markup, if you are starting with a lowercase letter, it is the same paragraph, so you don't break. In which case, the quoting environment does not indent the first line of the quotation. If you introduce a paragraph break before it, it is then indented.

\documentclass{article}

\usepackage{quoting}
\usepackage[threshold=0]{csquotes}
  \MakeBlockQuote{<}{|}{>}
  \SetBlockEnvironment{quoting}

\begin{document}

The next quote starts with an uppercase letter because it is a new paragraph,
so we break a paragraph before it, and it will start indented:

<This is a text written in display mode, with the first letter in uppercase.

This is the second paragraph.>

The next quotation is a continuation of this sentence (and thus paragraph), so
we make no paragraph break before it. It starts without indentation:
\begin{displayquote}
this is a text written in display mode, with the first letter in lowercase.

This is the second paragraph.
\end{displayquote}

\end{document}

enter image description here

1
  • A very good solution, without having to do analysis on the case of text. Thank you very much!
    – matteo339
    Feb 15, 2023 at 10:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .