csquotes - 如何根据 titlecase 删除“引号”环境的缩进

csquotes - 如何根据 titlecase 删除“引号”环境的缩进

我是一位非常满意的用户csquotes。下面是使用显示模式的引号的 mwe。

\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}

我希望在所有显示模式引号(block[c]quote; display[c]quote; 活动字符)中,第一段的缩进将被自动删除(因此无需使用,例如\noindent),在以下情况下文本首字母小写

答案1

我认为这非常符合该quoting包的用例。它不是通过检查首字母的大小写来工作的,而是通过检查引文前是否有段落分隔符来工作的。这是很好的标记,如果你以小写字母开头,那么它是同一个段落,所以你不会中断。在这种情况下,环境quoting不会缩进引文的第一行。如果你在它之前引入一个段落分隔符,它就会缩进。

\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}

在此处输入图片描述

相关内容