在文档中缩进长引用?

在文档中缩进长引用?

这个问题引出了包中的一个新功能:
quoting

假设我有一句很长的法律文本需要写入我的文档中。

根据 XYZ 定律:

Aaaaaa aoe oa ao oa oa aou oauoaeuoae uao aaaaaa aoe oa ao oa oa aou oauoaeuoae uao aaaaaa aoe oa ao oa oa aou oauoaeuoae uao aaaaaa aoe oa ao oa oa aou oauoaeuoae uao aaaaaa aoe oa ao oa oa aou oauoaeuoae uao aaaaaa aoe oa ao oa oa aou oauoaeuoae uao aaaaaa aoe oa ao oa oa aou oauoaeuoae uao aaaaaa aoe oa ao oa oa aou oauoaeuoae uao aaaaaa aoe oa ao oa oa aou oauoaeuoae uao aaaaaa aoe oa ao oa oa ou oauoaeuoae uao aaaaaa aoe oa ao oa oa aou oauoaeuoae uao aaaaaa aoe oa ao oa oa aou oauoaeuoae uao aaaaaa aoe oa ao oa oa aou oauoaeuoae uao aaaaaa aoe oa ao oa oa aou oauoaeuoae uao aaaaaa aoe oa ao oa oa aou oauoaeuoae uao。

我怎样才能用斜体和适当的引用清楚地缩进以表明这不是我写的?

答案1

基本方法是使用标准quotequotation环境,并进行适当的重新定义以使文本变为斜体;如下所示:

\documentclass{article}
\usepackage[T1]{fontenc}

\makeatletter
\g@addto@macro\quote\itshape
\g@addto@macro\quotation\itshape
\makeatother

\newcommand\Text{Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit,
vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida
mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna.
Donec vehicula augue eu neque. Pellentesque habitant morbi tristique senectus
et netus et malesuada fames ac turpis egestas. Mauris ut leo.}

\begin{document}

\Text\begin{quote}
``\Text''
\end{quote}
\Text
\begin{quotation}
``\Text''
\end{quotation}

\end{document}

如果您想要进一步定制,csquotes包可能会引起兴趣。

在此处输入图片描述

答案2

我的解决方案与 Gonzalo 的解决方案有两点不同:

  • quote我不会在和环境之间切换,而是quotation使用我的quoting包及其同名环境。通过在环境前添加一个空行来控制首行缩进。斜体字体通过包选项实现font=itshape

  • 我没有在文中多次添加``和,而是使用''etoolbox包来修补环境的开始和结束quoting。这样,如果想要更改环境的定义,就不必在文本中搜索每个引用实例。编辑:使用quotingv 0.1b,可以简单地使用begintextendtext选项。


\documentclass{article}

\usepackage[font=itshape,begintext=``,endtext='']{quoting}

\newcommand\Text{Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit,
vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida
mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna.
Donec vehicula augue eu neque. Pellentesque habitant morbi tristique senectus
et netus et malesuada fames ac turpis egestas. Mauris ut leo.}

\begin{document}

\Text
% <--- No first-line indentation of "quoting"
\begin{quoting}
\Text
\end{quoting}
% <--- No indentation after "quoting"
\Text

\begin{quoting}
\Text
\end{quoting}

\end{document}

在此处输入图片描述

答案3

我知道这个问题已经得到解答,但我更喜欢epigraph包。在序言中添加类似以下内容

\usepackage{epigraph}
\setlength{\epigraphwidth}{0.90\textwidth}

并使用类似下面的内容进行调用

\epigraph
{\itshape\ldots we \emph{never} experiment with just \emph{one} electron or atom or (small) molecule. In thought-experiments we sometimes assume that we do; this invariably entails ridiculous consequences\ldots}
{\emph{Are There Quantum Jumps? Part II}\\ Erwin Schr\"odinger}

这将给你类似这样的结果

在此处输入图片描述

相关内容