> For the complete documentation index, see [llms.txt](https://ayakaleaf-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://ayakaleaf-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{Introduction}

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

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

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

\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{Introducción}

下面这句话归于 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\))。 [`epigraph`](http://www.ctan.org/tex-archive/macros/latex/contrib/epigraph) 宏包为排版题词及题词列表提供了大量选项。要使用该宏包，请在文档导言区添加以下一行：

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

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

```latex
\documentclass{book}
\usepackage{blindtext} %This package generates automatic text
\usepackage{epigraph}

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

\begin{document}
\frontmatter
\mainmatter

\chapter{某些内容}
\epigraph{All human things are subject to decay, and when fate summons, Monarchs must obey}{\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)

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

## 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{莎士比亚，《麦克白》}
饼干！给我一些饼干！
\qauthor{饼干怪兽}
\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)
* [该 **epigraph** 包文档](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://ayakaleaf-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.
