> For the complete documentation index, see [llms.txt](https://overleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://overleaf-pro.ayaka.space/latex/zh-cn/yu-yan/04-typesetting-quotations.md).

# 引语和引号

## 引言

说到引文和引号，每种语言都有自己的符号和规则。因此，人们创建了若干 LaTeX 宏包，帮助排版行内引文、展示式引文或每章开头的引文。需要指出的是，即使你输入的是英文引号，所使用的不同引号也取决于 **英语（英国）** 和 **英语（美国）**。LaTeX 可以排版大量不同的引号，而且几乎每种语言都有相应的选项（见 [参考指南](#reference-guide)).

我们将介绍几个适合排版不同类型引文的宏包。

## dirtytalk 宏包

[`dirtytalk`](http://ctan.org/tex-archive/macros/latex/contrib/dirtytalk) 是一个小型的 LaTeX 宏包，只有一个可用命令： `\say`，如下一个示例所示：

```latex
\documentclass{article}
\usepackage{dirtytalk}
\begin{document}
\section{引言}

使用这个宏包输入引文非常容易：

\say{这里，写入了一个引文，甚至还可以有一些 \say{嵌套} 引文
可以实现}
\end{document}
```

[在 Overleaf 中打开此示例。](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=An+example+of+the+dirtytalk+package\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bdirtytalk%7D%0A%5Cbegin%7Bdocument%7D%0A%5Csection%7BIntroduction%7D%0A%0ATyping+quotations+with+this+package+is+quite+easy%3A%0A%0A%5Csay%7BHere%2C+a+quotation+is+written+and+even+some+%5Csay%7Bnested%7D+quotations+%0Aare+possible%7D%0A%5Cend%7Bdocument%7D)

此示例生成以下输出：

![OLV2EnglishDirtyTalk.png](/files/a0030ea27c47ebafc3889e8315b080e1a0a3c75f)

该 `dirtytalk` 宏包可以通过在文档导言区添加以下一行来加载：

```latex
\usepackage{dirtytalk}
```

`dirtytalk` 支持一层嵌套引文，并且提供重新定义引号字符的选项。例如，在一份用法语写成的文档中可以使用以下代码：

```latex
\usepackage[french]{babel}
\usepackage[T1]{fontenc}
\usepackage[
    left = \flqq{},%
    right = \frqq{},%
    leftsub = \flq{},%
    rightsub = \frq{} %
]{dirtytalk}
```

前两个命令定义主要的左引号和右引号，第二对命令定义次级引号。下面是使用上面代码的示例：

```latex
\documentclass{article}
\usepackage[french]{babel}
\usepackage[T1]{fontenc}

\usepackage[
    left = \flqq{},%
    right = \frqq{},%
    leftsub = \flq{},%
    rightsub = \frq{} %
]{dirtytalk}

\begin{document}
\section{引言}

使用这个宏包输入引文非常容易：

\say{这里，写入了一个引文，甚至还可以有一些 \say{嵌套} 引文可以实现}
\end{document}
```

[在 Overleaf 中打开此示例。](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Changing+quotes+using+the+dirtytalk+package\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%5Bfrench%5D%7Bbabel%7D%0A%5Cusepackage%5BT1%5D%7Bfontenc%7D%0A%0A%5Cusepackage%5B%0A++++left+%3D+%5Cflqq%7B%7D%2C%25+%0A++++right+%3D+%5Cfrqq%7B%7D%2C%25+%0A++++leftsub+%3D+%5Cflq%7B%7D%2C%25+%0A++++rightsub+%3D+%5Cfrq%7B%7D+%25%0A%5D%7Bdirtytalk%7D%0A%0A%5Cbegin%7Bdocument%7D%0A%5Csection%7BIntroduction%7D%0A%0ATyping+quotations+with+this+package+is+quite+easy%3A%0A%0A%5Csay%7BHere%2C+a+quotation+is+written+and+even+some+%5Csay%7Bnested%7D+quotations+are+possible%7D%0A%5Cend%7Bdocument%7D)

此示例生成以下输出：

![OLV2FrenchDirtyTalk.png](/files/540bd1190f7d06cc8476ec779be58d248773cbe3)

这个宏包适合大多数情况：它非常简单，因为只需一个命令，而且支持一层引文嵌套。如果需要更复杂的引号结构，下面几节列出的选项可能更有效。

## csquotes 宏包

该 [`csquotes`](http://ctan.org/tex-archive/macros/latex/contrib/csquotes) 宏包为行内引文和展示式引文提供了高级功能。它支持各种命令、环境以及可由用户定义的引号。引号可以通过以下方式自动调整为当前语言： [`babel`](https://ctan.org/pkg/babel?lang=en) 或 [`polyglossia`](https://ctan.org/pkg/polyglossia) 宏包。该宏包适用于引号需求复杂的文档，因此提供了大量命令，可插入行内引号、带来源的引号以及支持语言切换的块引用。

下面的示例使用了 `csquotes` 宏包，并结合 `babel`，在一份用西班牙语编写的文档中。它会自动加载正确的引号字符“«”和“»”——它们被称为法式引号（guillemets，西班牙语中称为“comillas angulares”）。

```latex
\documentclass{article}
\usepackage[spanish]{babel}
\usepackage{csquotes}

\begin{document}
\section{引言}

下面这句话据说出自 Linus Torvals：

\begin{displayquote}
我知道我有一个小行星般大小的自我，但即使是我，有时也会犯错
\end{displayquote}

这句话揭示了他 \textquote{诙谐} 个性中的一个重要方面。
\end{document}
```

[在 Overleaf 中打开此示例。](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Example+using+the+csquotes+package\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%5Bspanish%5D%7Bbabel%7D%0A%5Cusepackage%7Bcsquotes%7D%0A%0A%5Cbegin%7Bdocument%7D%0A%5Csection%7BIntroducci%C3%B3n%7D%0A%0ALa+siguiente+frase+es+atribu%C3%ADda+a+Linus+Torvals%3A%0A%0A%5Cbegin%7Bdisplayquote%7D%0AS%C3%A9+que+tengo+un+ego+del+tama%C3%B1o+de+un+planeta+peque%C3%B1o%2C+pero+incluso+yo+a+veces+me+equivoco%0A%5Cend%7Bdisplayquote%7D%0A%0ALa+frase+revela+un+aspecto+importante+de+su+%5Ctextquote%7Bjocosa%7D+personalidad.%0A%5Cend%7Bdocument%7D)

此示例生成以下输出：

![OLV2csquotes.png](/files/89336bea3ce920cd6b19c3b12b62f6a0f0c78f74)

在该示例中，环境 `displayquote` 会排版一个展示引文，而命令 `\textquote` 以及行内引文。

## epigraph 宏包

有些作者喜欢在章节开头写引文：这类引文被称为 [题词](https://en.wikipedia.org/wiki/Epigraph_\(literature\))。 [`题词`](http://www.ctan.org/tex-archive/macros/latex/contrib/epigraph) 宏包提供了大量选项，用于排版题词及题词列表。要使用该宏包，请在文档导言区添加以下一行：

```latex
\usepackage{epigraph}
```

下面是一个示例，展示了使用命令输入的一条题词引文 `\epigraph{}{}`，其第一个参数是引文本身，第二个参数是引文来源（作者、书籍等）：

```latex
\documentclass{book}
\usepackage{blindtext} %此宏包会生成自动文本
\usepackage{epigraph}

\title{题词示例}
\author{Overleaf}
\date{2021年8月}

\begin{document}
\frontmatter
\mainmatter

\chapter{某事}
\epigraph{所有人类事物都注定会衰败，而当命运召唤时，君主也必须服从}{\textit{《Mac Flecknoe》 \\ John Dryden}}
\blindtext
\end{document}
```

[在 Overleaf 中打开此示例](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=epigraph+package+example\&snip=%5Cdocumentclass%7Bbook%7D%0A%5Cusepackage%7Bblindtext%7D+%25This+package+generates+automatic+text%0A%5Cusepackage%7Bepigraph%7D+%0A%0A%5Ctitle%7BEpigraph+example%7D%0A%5Cauthor%7BOverleaf%7D%0A%5Cdate%7BAugust+2021%7D%0A%0A%5Cbegin%7Bdocument%7D%0A%5Cfrontmatter%0A%5Cmainmatter%0A%0A%5Cchapter%7BSomething%7D%0A%5Cepigraph%7BAll+human+things+are+subject+to+decay%2C+and+when+fate+summons%2C+Monarchs+must+obey%7D%7B%5Ctextit%7BMac+Flecknoe+%5C%5C+John+Dryden%7D%7D%0A%5Cblindtext%0A%5Cend%7Bdocument%7D)

此示例生成以下输出：

![OLV2epigraph.png](/files/41b049a7f5ebafdb29312b7c4fca12019691ac7e)

该 `题词` 宏包可以通过一个特殊环境处理多条引文，并且还具有许多自定义选项。

## fancychapters 宏包（已过时）

该宏包可在每章开头排版题词或引文，但它原本是为 [与 LaTeX 2.09 一起使用](https://ctan.org/pkg/fancychapters) 而设计的，因此我们不再推荐使用它。

## quotchap 宏包

该宏包 [`quotchap`](https://ctan.org/pkg/quotchap) 重新定义命令 `chapter`及其带星号的版本，以重新格式化它们。你可以使用这个宏包更改章节编号的颜色。它还提供了一个特殊环境，用于排版引文及其对应作者。

要使用该宏包，请在文档导言区加入以下一行：

```latex
\usepackage{quotchap}
```

引文在环境中输入 `savequote`。在下面的示例中，方括号中的参数 `[45mm]`，用于设置引文区域的宽度。每条引文之后，命令 `\qauthor{}` 用于排版并格式化作者姓名。

```latex
\documentclass{book}
\usepackage{blindtext}
\usepackage{quotchap}

\begin{document}
\begin{savequote}[45mm]
——我们三人何时再相会
在雷鸣、闪电或雨中？
——当喧嚣纷扰结束时，
当战斗分出胜负时。
\qauthor{Shakespeare, Macbeth}
饼干！给我一些饼干！
\qauthor{Cookie Monster}
\end{savequote}

\chapter{经典芝麻街}
\blindtext
\end{document}
```

[在 Overleaf 中打开此示例。](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Example+using+the+quotchap+package\&snip=%5Cdocumentclass%7Bbook%7D%0A%5Cusepackage%7Bblindtext%7D%0A%5Cusepackage%7Bquotchap%7D%0A%0A%5Cbegin%7Bdocument%7D%0A%5Cbegin%7Bsavequote%7D%5B45mm%5D%0A---When+shall+we+three+meet+again%0Ain+thunder%2C+lightning%2C+or+in+rain%3F%0A---When+the+hurlyburly%E2%80%99s+done%2C%0Awhen+the+battle%E2%80%99s+lost+and+won.%0A%5Cqauthor%7BShakespeare%2C+Macbeth%7D%0ACookies%21+Give+me+some+cookies%21%0A%5Cqauthor%7BCookie+Monster%7D%0A%5Cend%7Bsavequote%7D%0A%0A%5Cchapter%7BClassic+Sesame+Street%7D%0A%5Cblindtext%0A%5Cend%7Bdocument%7D)

此示例生成以下输出：

![OLV2quotchap.png](/files/ade259a76f38fbbf08c43a2fe8f295767be215fa)

## 参考指南

几种语言中的引号小表：

| 语言     | 主引号 | 次引号 |
| ------ | --- | --- |
| 英语（英国） | ‘…’ | “…” |
| 英语（美国） | “…” | ‘…’ |
| 丹麦语    | »…« | ›…‹ |
| 立陶宛语   | —   | «…» |
| 法语     | ‚…‘ | ‚…‘ |
| 德语     | —   | „…” |
| 俄语     | ‚…‘ | —   |
| 乌克兰语   | ‚…‘ | «…» |
| 波兰语    | „…“ | ‚…‘ |

## 进一步阅读

更多信息请参见

* [国际语言支持](/latex/zh-cn/yu-yan/03-international-language-support.md)
* [阿拉伯语](/latex/zh-cn/yu-yan/05-arabic.md)
* [中文](/latex/zh-cn/yu-yan/06-chinese.md)
* [法语](/latex/zh-cn/yu-yan/07-french.md)
* [德语](/latex/zh-cn/yu-yan/08-german.md)
* [希腊语](/latex/zh-cn/yu-yan/09-greek.md)
* [意大利语](/latex/zh-cn/yu-yan/10-italian.md)
* [日语](/latex/zh-cn/yu-yan/11-japanese.md)
* [韩语](/latex/zh-cn/yu-yan/12-korean.md)
* [葡萄牙语](/latex/zh-cn/yu-yan/13-portuguese.md)
* [俄语](/latex/zh-cn/yu-yan/14-russian.md)
* [西班牙语](/latex/zh-cn/yu-yan/15-spanish.md)
* [希腊字母和数学符号列表](/latex/zh-cn/shu-xue/11-list-of-greek-letters-and-math-symbols.md)
* [字体大小、字体族和样式](/latex/zh-cn/zi-ti/01-font-sizes-families-and-styles.md)
* [使用 XƎLaTeX 支持现代字体](/latex/zh-cn/zi-ti/03-xelatex.md)
* [该 **dirtytalk** 包文档](http://mirrors.ctan.org/macros/latex/contrib/dirtytalk/dirtytalk.pdf)
* [该 **csquotes** 包文档](http://mirrors.ctan.org/macros/latex/contrib/csquotes/csquotes.pdf)
* [该 **题词** 包文档](http://mirrors.ctan.org/macros/latex/contrib/epigraph/epigraph.pdf)
* [该 **quotchap** 包文档](http://mirrors.ctan.org/macros/latex/contrib/quotchap/quotchap.pdf)
* [WikiBooks 上的 LaTeX/特殊字符](http://en.wikibooks.org/wiki/LaTeX/Special_Characters)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://overleaf-pro.ayaka.space/latex/zh-cn/yu-yan/04-typesetting-quotations.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
