我正在使用 XeLaTeX。
\documentclass[10pt,twoside]{report}
\usepackage[thresholdtype=words]{csquotes}
\usepackage{enumerate}
\begin{document}
\blockquote{
\textbf{konungr} (-s, -ar), \textit{m.}
\begin{enumerate}
\item king.
\end{enumerate}
}
\end{document}
会产生以下错误:
! LaTeX Error: Something's wrong--perhaps a missing \item.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.13 ^^I}
但是,如果我删除的包选项csquotes
,即替换第 3 行:
\usepackage[thresholdtype=words]{csquotes}
有了这个:
\usepackage{csquotes}
编译成功。结果如下:
其缩进正确。
这是一个最低限度的编译示例。我不想删除该软件包选项,因为我想让\blockquote
后面的一行非常短,并有类似的缩进。如果没有软件包选项,则会出现以下情况:
\documentclass[10pt,twoside]{report}
\usepackage{csquotes}
\usepackage{enumerate}
\begin{document}
\blockquote{
\textbf{konungr} (-s, -ar), \textit{m.}
\begin{enumerate}
\item king.
\end{enumerate}
}
\blockquote{
Nouns like ``konungr'' \textit{king} and ``dvergr'' \textit{ghost} decline in the easiest pattern.
}
\end{document}
结果是:
第二个\blockquote
不像第一个那样缩进,而是用双引号括起来。
答案1
我猜想问题出在csquotes
单词计数方式上,但我无法解释其中的细节。不过,你可以解决这个问题。
我的第一个想法是,包含列表的引文应该简单地放在csquotes
'displayquote
环境中。也就是说,
\begin{displayquote}
\textbf{konungr} (-s, -ar), \textit{m.}
\begin{itemize}
\item king.
\end{itemize}
\end{displayquote}
或者,您可以创建自己的版本\blockquote
,从按字数计数切换回默认的按行计数。下面的示例仅仅是概念证明,并提供了\blockquote
比原始命令“愚蠢”得多的 -type 命令。(但也许这没有什么真正的损失:我自己从来不关心可选参数。)
\documentclass[10pt,twoside]{report}
\usepackage[thresholdtype=words]{csquotes}
\SetBlockThreshold{50}
%\usepackage{enumitem}% this package does not affect problem
\newcommand\zzz[1]{%
\begingroup
\setkeys{csq}{thresholdtype=lines}%
\blockquote{#1}%
\endgroup
}
\newcommand{\example}{This is a minimally compiling example. I do not
want to remove that package option because I want to have a
similarly indented blockquote for a very short line that follows
this. This is a minimally compiling example. I do not want to
remove that package option because I want to have a similarly
indented blockquote for a very short line that follows this.}
\begin{document}
\example
\blockquote{This is a minimally compiling example.}
\blockquote{\example}
\zzz{%
\textbf{konungr} (-s, -ar), \textit{m.}
\begin{itemize}
\item king.
\item or: ``rex''
\end{itemize}
}
\blockquote{\example}
\example
\blockquote{This is a minimally compiling example.}
\end{document}