> 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/11-japanese.md).

# 日语

有不同的宏包可用于支持各种 LaTeX 引擎的日文排版，不过并非所有宏包都能完全支持所有日文排版约定，例如竖排。本帮助文章简要概述了如何使用 pdfLaTeX、XƎLaTeX、pTeX 和 LuaLaTeX 来排版日文。

## 与 pdfLaTeX 一起使用的 CJKutf8 宏包

该 `CJKutf8` 该宏包足以让你使用 pdfLaTeX 编译。

```latex
\documentclass{article}
\usepackage{CJKutf8}
\begin{document}

\begin{CJK}{UTF8}{min}
\section{这是第一个节}
用于演示使用 \LaTeX 进行日文排版的导言部分。

字体也可用于数学模式和其他环境中
\end{CJK}

\\bigskip

在该环境之外可以使用拉丁字符。

\begin{CJK*}{UTF8}{goth}
\section{这是第一个节}
用于演示使用 \LaTeX 进行日文排版的导言部分。

字体也可用于数学模式和其他环境中
\end{CJK*}
\end{document}
```

[在 Overleaf 中打开这个 CJKutf8 示例。](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=CJKutf8+package+with+pdfLaTeX\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7BCJKutf8%7D%0A%5Cbegin%7Bdocument%7D%0A%0A%5Cbegin%7BCJK%7D%7BUTF8%7D%7Bmin%7D%0A%5Csection%7B%E3%81%93%E3%82%8C%E3%81%AF%E6%9C%80%E5%88%9D%E3%81%AE%E3%82%BB%E3%82%AF%E3%82%B7%E3%83%A7%E3%83%B3%E3%81%A7%E3%81%82%E3%82%8B%7D%0A%E6%97%A5%E6%9C%AC%E8%AA%9E%E3%81%A7+%5CLaTeX+%E3%81%AE%E7%B5%84%E7%89%88%E3%82%92%E5%AE%9F%E8%A8%BC%E3%81%99%E3%82%8B%E3%81%9F%E3%82%81%E3%81%AE%E5%B0%8E%E5%85%A5%E9%83%A8%E5%88%86%E3%80%82%0A%0A%E3%83%95%E3%82%A9%E3%83%B3%E3%83%88%E3%81%AF%E3%81%BE%E3%81%9F%E3%80%81%E6%95%B0%E5%AD%A6%E7%9A%84%E3%81%AA%E5%BD%A2%E6%85%8B%E3%81%8A%E3%82%88%E3%81%B3%E4%BB%96%E3%81%AE%E7%92%B0%E5%A2%83%E3%81%A7%E4%BD%BF%E7%94%A8%E3%81%99%E3%82%8B%E3%81%93%E3%81%A8%E3%81%8C%E3%81%A7%E3%81%8D%E3%82%8B%0A%5Cend%7BCJK%7D%0A%0A%5Cbigskip%0A%0AOutside+the+environment+Latin+characters+may+be+used.%0A%0A%5Cbegin%7BCJK%2A%7D%7BUTF8%7D%7Bgoth%7D%0A%5Csection%7B%E3%81%93%E3%82%8C%E3%81%AF%E6%9C%80%E5%88%9D%E3%81%AE%E3%82%BB%E3%82%AF%E3%82%B7%E3%83%A7%E3%83%B3%E3%81%A7%E3%81%82%E3%82%8B%7D%0A%E6%97%A5%E6%9C%AC%E8%AA%9E%E3%81%A7+%5CLaTeX+%E3%81%AE%E7%B5%84%E7%89%88%E3%82%92%E5%AE%9F%E8%A8%BC%E3%81%99%E3%82%8B%E3%81%9F%E3%82%81%E3%81%AE%E5%B0%8E%E5%85%A5%E9%83%A8%E5%88%86%E3%80%82%0A%0A%E3%83%95%E3%82%A9%E3%83%B3%E3%83%88%E3%81%AF%E3%81%BE%E3%81%9F%E3%80%81%E6%95%B0%E5%AD%A6%E7%9A%84%E3%81%AA%E5%BD%A2%E6%85%8B%E3%81%8A%E3%82%88%E3%81%B3%E4%BB%96%E3%81%AE%E7%92%B0%E5%A2%83%E3%81%A7%E4%BD%BF%E7%94%A8%E3%81%99%E3%82%8B%E3%81%93%E3%81%A8%E3%81%8C%E3%81%A7%E3%81%8D%E3%82%8B%0A%5Cend%7BCJK%2A%7D%0A%5Cend%7Bdocument%7D)

此示例生成如下输出，演示了使用两种字体族排版的日文文本：

![使用带有 pdfLaTeX 的 CJKutf8 宏包进行日文排版的示例](/files/955d75c7919b0b6eaf897fb78d306fce1fc32563)

这一行 `\usepackage{CJKutf8}` 导入 `CJKutf8` 它为中文、日文和韩文字符启用了 UTF8 编码。

在这种情况下，每一块日文文本都必须输入在一个 `\begin{CJK*}{UTF8}{min}` 环境中。在该环境中 `UTF8` 是编码，而 `min` （明朝体）是示例第 1 部分所使用的字体。

如示例第 2 部分所示，你可以将 `min` 与 `goth` 替换为使用哥特体；不过， `CJKutf8` 而 pdfLaTeX 并不容易使用其他字体。

## 与 XeLaTeX 一起使用的 xeCJK 宏包

XeLaTeX 提供了使用 OpenType 和 TrueType 字体的 შესაძლებლություն，而 `xeCJK` 宏包为中文、日文和韩文排版提供支持。

```latex
\documentclass{article}
\usepackage{xeCJK}
\setCJKmainfont{IPAMincho}
\setCJKsansfont{IPAGothic}
\setCJKmonofont{IPAGothic}
\begin{document}

\section{这是第一个节}
用于演示使用 \LaTeX 进行日文排版的导言部分。

字体也可用于数学模式和其他环境中

\\bigskip

你也可以在日文文档中使用拉丁字符。

\\bigskip

\begin{verbatim}
这段文本将使用另一种字体

这是一个使用等宽字体的逐字环境。
\end{verbatim}
\end{document}
```

[在 Overleaf 中打开这个 xeCJK 示例。](https://www.overleaf.com/docs?engine=xelatex\&snip_name=xeCJK+package+with+XeLaTeX\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7BxeCJK%7D%0A%5CsetCJKmainfont%7BIPAMincho%7D%0A%5CsetCJKsansfont%7BIPAGothic%7D%0A%5CsetCJKmonofont%7BIPAGothic%7D%0A%5Cbegin%7Bdocument%7D%0A%0A%5Csection%7B%E3%81%93%E3%82%8C%E3%81%AF%E6%9C%80%E5%88%9D%E3%81%AE%E3%82%BB%E3%82%AF%E3%82%B7%E3%83%A7%E3%83%B3%E3%81%A7%E3%81%82%E3%82%8B%7D%0A%E6%97%A5%E6%9C%AC%E8%AA%9E%E3%81%A7+%5CLaTeX+%E3%81%AE%E7%B5%84%E7%89%88%E3%82%92%E5%AE%9F%E8%A8%BC%E3%81%99%E3%82%8B%E3%81%9F%E3%82%81%E3%81%AE%E5%B0%8E%E5%85%A5%E9%83%A8%E5%88%86%E3%80%82%0A%0A%E3%83%95%E3%82%A9%E3%83%B3%E3%83%88%E3%81%AF%E3%81%BE%E3%81%9F%E3%80%81%E6%95%B0%E5%AD%A6%E7%9A%84%E3%81%AA%E5%BD%A2%E6%85%8B%E3%81%8A%E3%82%88%E3%81%B3%E4%BB%96%E3%81%AE%E7%92%B0%E5%A2%83%E3%81%A7%E4%BD%BF%E7%94%A8%E3%81%99%E3%82%8B%E3%81%93%E3%81%A8%E3%81%8C%E3%81%A7%E3%81%8D%E3%82%8B%0A%0A%5Cbigskip%0A%0AAnd+you+can+also+use+Latin+characters+within+your+Japanese+document.%0A%0A%5Cbigskip%0A%0A%5Cbegin%7Bverbatim%7D%0A%E3%81%93%E3%81%AE%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%81%AF%E3%80%81%E5%88%A5%E3%81%AE%E3%83%95%E3%82%A9%E3%83%B3%E3%83%88%E3%82%92%E6%8C%81%E3%81%A4%E3%81%93%E3%81%A8%E3%81%AB%E3%81%AA%E3%82%8A%E3%81%BE%E3%81%99%0A%0AThis+is+a+verbatim+environment+using+a+monospaced+font.%0A%5Cend%7Bverbatim%7D%0A%5Cend%7Bdocument%7D)

此示例生成以下输出：

![使用带有 XeLaTeX 的 xeCJK 宏包进行日文排版的示例](/files/33265f94f4f7853b9ccf10acc9fa73e5884032ed)

下面是每条命令的说明：

* `\usepackage{xeCJK}`：这包括该宏包 `xeCJK` ，它允许在使用 XeLaTeX 编译的文档中使用中文、日文和韩文字体。参见 [本文](/latex/zh-cn/geng-duo-zhu-ti/08-choosing-a-latex-compiler.md) 以获取有关设置 Overleaf 项目编译器的帮助。
* `\setCJKmainfont{IPAMincho}`：设置此文档所使用的主字体。
* `\setCJKsansfont{IPAGothic}`：设置需要无衬线字体的元素所使用的字体。
* `\setCJKmonofont{IPAGothic}`：设置需要等宽字体的元素所使用的字体。在示例中， `verbatim` 环境中的日文文本使用了该字体。

### 使用 Google Noto 字体

由于适合用于 CJK 排版的 Google Noto Fonts 存储在 Overleaf 的服务器上，我们可以用它们来重现前面的示例。

```latex
\documentclass{article}
\usepackage{xeCJK}
\setCJKmainfont{Noto Serif CJK JP}
\setCJKsansfont{Noto Sans CJK JP}
\setCJKmonofont{Noto Sans Mono CJK JP}
\begin{document}

\section{这是第一个节}
用于演示使用 \LaTeX 进行日文排版的导言部分。

字体也可用于数学模式和其他环境中

\\bigskip

你也可以在日文文档中使用拉丁字符。

\\bigskip

\begin{verbatim}
这段文本将使用另一种字体

这是一个使用等宽字体的逐字环境。
\end{verbatim}
\end{document}
```

[在 Overleaf 中打开这个 xeCJK 示例。](https://www.overleaf.com/docs?engine=xelatex\&snip_name=xeCJK+package+with+XeLaTeX+and+Google+Noto+fonts\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7BxeCJK%7D%0A%5CsetCJKmainfont%7BNoto+Serif+CJK+JP%7D%0A%5CsetCJKsansfont%7BNoto+Sans+CJK+JP%7D%0A%5CsetCJKmonofont%7BNoto+Sans+Mono+CJK+JP%7D%0A%5Cbegin%7Bdocument%7D%0A%0A%5Csection%7B%E3%81%93%E3%82%8C%E3%81%AF%E6%9C%80%E5%88%9D%E3%81%AE%E3%82%BB%E3%82%AF%E3%82%B7%E3%83%A7%E3%83%B3%E3%81%A7%E3%81%82%E3%82%8B%7D%0A%E6%97%A5%E6%9C%AC%E8%AA%9E%E3%81%A7+%5CLaTeX+%E3%81%AE%E7%B5%84%E7%89%88%E3%82%92%E5%AE%9F%E8%A8%BC%E3%81%99%E3%82%8B%E3%81%9F%E3%82%81%E3%81%AE%E5%B0%8E%E5%85%A5%E9%83%A8%E5%88%86%E3%80%82%0A%0A%E3%83%95%E3%82%A9%E3%83%B3%E3%83%88%E3%81%AF%E3%81%BE%E3%81%9F%E3%80%81%E6%95%B0%E5%AD%A6%E7%9A%84%E3%81%AA%E5%BD%A2%E6%85%8B%E3%81%8A%E3%82%88%E3%81%B3%E4%BB%96%E3%81%AE%E7%92%B0%E5%A2%83%E3%81%A7%E4%BD%BF%E7%94%A8%E3%81%99%E3%82%8B%E3%81%93%E3%81%A8%E3%81%8C%E3%81%A7%E3%81%8D%E3%82%8B%0A%0A%5Cbigskip%0A%0AAnd+you+can+also+use+Latin+characters+within+your+Japanese+document.%0A%0A%5Cbigskip%0A%0A%5Cbegin%7Bverbatim%7D%0A%E3%81%93%E3%81%AE%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%81%AF%E3%80%81%E5%88%A5%E3%81%AE%E3%83%95%E3%82%A9%E3%83%B3%E3%83%88%E3%82%92%E6%8C%81%E3%81%A4%E3%81%93%E3%81%A8%E3%81%AB%E3%81%AA%E3%82%8A%E3%81%BE%E3%81%99%0A%0AThis+is+a+verbatim+environment+using+a+monospaced+font.%0A%5Cend%7Bverbatim%7D%0A%5Cend%7Bdocument)

此示例生成以下输出：

![在 Overleaf 上使用 Google Noto 字体进行日文排版](/files/7fd6bb0f6738eba0be28f566e77baa638b79b6dc)

## pTeX 引擎

日本出版的许多期刊和会议论文集使用一种特定的日文 LaTeX 发行版，称为 [pLaTeX](https://ctan.org/pkg/platex?lang=en)，它基于 [`jsarticle` 或 `jsbook` 文档类](https://ctan.org/pkg/jsclasses)。pLaTeX 支持许多日文排版约定，包括竖排。

### 在 Overleaf 上使用 pLaTeX

尽管 pLaTeX 并未列在 Overleaf 的 **编译器** 下拉菜单中：

![Overleaf 支持的编译器列表](/files/689c296f23bbd8e77a775427f5608bf96bf626ff)

通过向你的项目添加一个小的配置文件，Overleaf 可以配置为使用 pLaTeX：该文件名为 [`latexmkrc`](/latex/zh-cn/shen-ru-wen-zhang/28-how-to-use-latexmkrc-with-overleaf.md)。操作步骤如下：

1. [将项目的编译器设置为](/latex/zh-cn/zhi-shi-ku/026-changing-compiler.md) 更改为 **LaTeX**
2. 添加一个新的空文件，名为 `latexmkrc` （无文件扩展名）到你的项目中
3. 将以下几行添加到 `latexmkrc`:

```perl
$latex = 'platex';
$bibtex = 'pbibtex';
$dvipdf = 'dvipdfmx %O -o %D %S';
$makeindex = 'mendex %O -o %D %S';
```

如果你使用的是为 `uplatex` 设计的模板，那么请改为将 `platex` 更改为 `uplatex`以及 `pbibtex` 更改为 `upbibtex`.

下面的列表展示了一个基础的 pLaTeX 文档以及一个 `latexmkrc` 用于在 Overleaf 上编译它的文件。使用列表下方的链接在 Overleaf 中打开这些文件。

**`pLaTeX-example.tex`**

```latex
\documentclass{jsarticle}
\bibliographystyle{jplain}
\title{一个 pLaTeX 示例}
\begin{document}

本文将介绍文档排版系统 p\LaTeX{} 的使用方法。使用 p\LaTeX{} 时，
预先在正文中混入称为 \TeX{} 命令的排版指令\ldots

\section{导言}
你好，世界！
\end{document}
```

**`latexmkrc`**

```latex
$latex = 'platex';
$bibtex = 'pbibtex';
$dvipdf = 'dvipdfmx %O -o %D %S';
$makeindex = 'mendex %O -o %D %S';
```

[在 Overleaf 中打开这个 pLaTeX 项目。](https://www.overleaf.com/docs?engine=latex_dvipdf\&snip_name\[]=pLaTeX-example.tex\&snip\[]=%5Cdocumentclass%7Bjsarticle%7D%0A%5Cbibliographystyle%7Bjplain%7D%0A%5Ctitle%7BA+pLaTeX+example%7D%0A%5Cbegin%7Bdocument%7D%0A%0A%E6%9C%AC%E7%A8%BF%E3%81%A7%E3%81%AF%E3%80%81%E6%96%87%E6%9B%B8%E7%B5%84%E7%89%88%E3%82%B7%E3%82%B9%E3%83%86%E3%83%A0p%5CLaTeX%7B%7D%E3%81%AE%E4%BD%BF%E3%81%84%E6%96%B9%E3%82%92%E8%A7%A3%E8%AA%AC%E3%81%97%E3%81%BE%E3%81%99%E3%80%82p%5CLaTeX%7B%7D%E3%82%92%E5%88%A9%E7%94%A8%E3%81%99%E3%82%8B%E3%81%A8%E3%81%8D%E3%81%AB%E3%81%AF%E3%80%81%0A%E3%81%82%E3%82%89%E3%81%8B%E3%81%98%E3%82%81%E6%96%87%E7%AB%A0%E4%B8%AD%E3%81%AB%5CTeX%7B%7D%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89%E3%81%A8%E5%91%BC%E3%81%B0%E3%82%8C%E3%82%8B%E7%B5%84%E7%89%88%E7%94%A8%E3%81%AE%E6%8C%87%E7%A4%BA%E3%82%92%E6%B7%B7%E5%9C%A8%E3%81%95%E3%81%9B%5Cldots%0A%0A%5Csection%7B%E5%B0%8E%E5%85%A5%7D%0A%E3%81%93%E3%82%93%E3%81%AB%E3%81%A1%E3%81%AF%E4%B8%96%E7%95%8C%EF%BC%81%0A%5Cend%7Bdocument%7D\&snip_name\[]=latexmkrc\&snip\[]=%24latex+%3D+%27platex%27%3B%0A%24bibtex+%3D+%27pbibtex%27%3B%0A%24dvipdf+%3D+%27dvipdfmx+%25O+-o+%25D+%25S%27%3B%0A%24makeindex+%3D+%27mendex+%25O+-o+%25D+%25S%27%3B\&main_document=pLaTeX-example.tex)

此示例生成以下输出：

![在 Overleaf 中使用 pLaTeX 进行日文排版的示例](/files/bbced633c9ade7a7fc6bbe7e1df14892c5653bbf)

## 与 LuaLaTeX 一起使用的 luatex-ja 宏包集合

该 [luatex-ja](https://www.ctan.org/pkg/luatexja) 宏包集合是一个相对较新的工作，旨在将 pTeX 的排版能力移植到 LuaLaTeX，以利用 LuaLaTeX 的脚本引擎以及 OTF/TTF 支持。（记得 [将项目的编译器设置为 LuaLaTeX](/latex/zh-cn/geng-duo-zhu-ti/08-choosing-a-latex-compiler.md)。）最简单的使用方式是加载 `ltjbook`, `ltjarticle` 或 `ltjreport` 文档类：

```latex
\documentclass{ltjarticle}
\begin{document}
\section{这是第一个节}
用于演示使用 \LaTeX 进行日文排版的导言部分。

字体也可用于数学模式和其他环境中
\end{document}
```

[在 Overleaf 中打开此 `ltjarticle` 以及在 Overleaf 上的 LuaLaTeX 示例。](https://www.overleaf.com/docs?engine=lualatex\&snip_name=Using+ltjarticle+and+LuaLaTeX\&snip=%5Cdocumentclass%7Bltjarticle%7D%0A%5Cbegin%7Bdocument%7D%0A%5Csection%7B%E3%81%93%E3%82%8C%E3%81%AF%E6%9C%80%E5%88%9D%E3%81%AE%E3%82%BB%E3%82%AF%E3%82%B7%E3%83%A7%E3%83%B3%E3%81%A7%E3%81%82%E3%82%8B%7D%0A%E6%97%A5%E6%9C%AC%E8%AA%9E%E3%81%A7+%5CLaTeX+%E3%81%AE%E7%B5%84%E7%89%88%E3%82%92%E5%AE%9F%E8%A8%BC%E3%81%99%E3%82%8B%E3%81%9F%E3%82%81%E3%81%AE%E5%B0%8E%E5%85%A5%E9%83%A8%E5%88%86%E3%80%82%0A%0A%E3%83%95%E3%82%A9%E3%83%B3%E3%83%88%E3%81%AF%E3%81%BE%E3%81%9F%E3%80%81%E6%95%B0%E5%AD%A6%E7%9A%84%E3%81%AA%E5%BD%A2%E6%85%8B%E3%81%8A%E3%82%88%E3%81%B3%E4%BB%96%E3%81%AE%E7%92%B0%E5%A2%83%E3%81%A7%E4%BD%BF%E7%94%A8%E3%81%99%E3%82%8B%E3%81%93%E3%81%A8%E3%81%8C%E3%81%A7%E3%81%8D%E3%82%8B%0A%5Cend%7Bdocument%7D)

此示例生成以下输出：

![在 Overleaf 上使用 LuaLaTeX 和 ltjarticle 文章类进行日文排版](/files/113a95f20d57a4d78ce25bd0fb2e85e03d075a5c)

或者，如果你想使用其他文档类，那么你可以改为加载 `luatex-ja` 宏包，如下所示：

```latex
\documentclass{scrartcl}
\usepackage{luatexja}
\begin{document}
\section{这是第一个节}
用于演示使用 \LaTeX 进行日文排版的导言部分。

字体也可用于数学模式和其他环境中
\end{document}
```

[在 Overleaf 中打开此 `luatex-ja` 以及在 Overleaf 上的 LuaLaTeX 示例。](https://www.overleaf.com/docs?engine=lualatex\&snip_name=Using+luatex-ja+and+LuaLaTeX\&snip=%5Cdocumentclass%7Bscrartcl%7D%0A%5Cusepackage%7Bluatexja%7D%0A%5Cbegin%7Bdocument%7D%0A%5Csection%7B%E3%81%93%E3%82%8C%E3%81%AF%E6%9C%80%E5%88%9D%E3%81%AE%E3%82%BB%E3%82%AF%E3%82%B7%E3%83%A7%E3%83%B3%E3%81%A7%E3%81%82%E3%82%8B%7D%0A%E6%97%A5%E6%9C%AC%E8%AA%9E%E3%81%A7+%5CLaTeX+%E3%81%AE%E7%B5%84%E7%89%88%E3%82%92%E5%AE%9F%E8%A8%BC%E3%81%99%E3%82%8B%E3%81%9F%E3%82%81%E3%81%AE%E5%B0%8E%E5%85%A5%E9%83%A8%E5%88%86%E3%80%82%0A%0A%E3%83%95%E3%82%A9%E3%83%B3%E3%83%88%E3%81%AF%E3%81%BE%E3%81%9F%E3%80%81%E6%95%B0%E5%AD%A6%E7%9A%84%E3%81%AA%E5%BD%A2%E6%85%8B%E3%81%8A%E3%82%88%E3%81%B3%E4%BB%96%E3%81%AE%E7%92%B0%E5%A2%83%E3%81%A7%E4%BD%BF%E7%94%A8%E3%81%99%E3%82%8B%E3%81%93%E3%81%A8%E3%81%8C%E3%81%A7%E3%81%8D%E3%82%8B%0A%5Cend%7Bdocument%7D)

此示例生成以下输出：

![在 Overleaf 上使用 LuaLaTeX 和 luatex-ja 进行日文排版](/files/8ff2f02dd384a1e85c26b8b6d785f71a1b3204ef)

要为日文文本加载你自己偏好的字体，你还需要 `luatexja-fontspec` 宏包的示例代码：

```latex
\usepackage[match]{luatexja-fontspec}
\setmainjfont{TakaoMincho}
\setsansjfont{TakaoGothic}
\setmonojfont{Komatuna}
```

参见 [luatex-ja 宏包文档](http://texdoc.net/pkg/luatexja) 以了解其其他（非常丰富的）日文排版功能和自定义选项。

## jlreq 类

该 `[jlreq](https://www.ctan.org/pkg/jlfeq)` 类是较新的日文文档排版选择。你只需将 `jlreq` 设置为文档类，但它需要 [LuaLaTeX](/latex/zh-cn/geng-duo-zhu-ti/08-choosing-a-latex-compiler.md), [pLaTeX 或 upLaTeX](#the-ptex-engine) 作为编译器。

```latex
\documentclass{jlreq}
\begin{document}
\section{这是第一个节}
用于演示使用 \LaTeX 进行日文排版的导言部分。

字体也可用于数学模式和其他环境中
\end{document}
```

[在 Overleaf 中打开此 `jlreq` 以及在 Overleaf 上的 LuaLaTeX 示例。](https://www.overleaf.com/docs?engine=lualatex\&snip_name=Using+jlreq+and+LuaLaTeX\&snip=%5Cdocumentclass%7Bjlreq%7D%0A%5Cbegin%7Bdocument%7D%0A%5Csection%7B%E3%81%93%E3%82%8C%E3%81%AF%E6%9C%80%E5%88%9D%E3%81%AE%E3%82%BB%E3%82%AF%E3%82%B7%E3%83%A7%E3%83%B3%E3%81%A7%E3%81%82%E3%82%8B%7D%0A%E6%97%A5%E6%9C%AC%E8%AA%9E%E3%81%A7+%5CLaTeX+%E3%81%AE%E7%B5%84%E7%89%88%E3%82%92%E5%AE%9F%E8%A8%BC%E3%81%99%E3%82%8B%E3%81%9F%E3%82%81%E3%81%AE%E5%B0%8E%E5%85%A5%E9%83%A8%E5%88%86%E3%80%82%0A%0A%E3%83%95%E3%82%A9%E3%83%B3%E3%83%88%E3%81%AF%E3%81%BE%E3%81%9F%E3%80%81%E6%95%B0%E5%AD%A6%E7%9A%84%E3%81%AA%E5%BD%A2%E6%85%8B%E3%81%8A%E3%82%88%E3%81%B3%E4%BB%96%E3%81%AE%E7%92%B0%E5%A2%83%E3%81%A7%E4%BD%BF%E7%94%A8%E3%81%99%E3%82%8B%E3%81%93%E3%81%A8%E3%81%8C%E3%81%A7%E3%81%8D%E3%82%8B%0A%5Cend%7Bdocument%7D)

此示例生成以下输出：

![使用 jlreq 文档类在 Overleaf 上排版的日文文本](/files/bfea571d0b79015bc452595ea5d2cc45f98eb811)

Overleaf Gallery 包含一个演示 `jlreq` 和 LuaLaTeX 的模板，你可以 [在此打开](https://www.overleaf.com/latex/templates/ri-ben-yu-japanese-jlreq/jjkkyvjjvvgk)。 `jlreq` 宏包文档包含关于 [日文排版功能](http://mirrors.ctan.org/macros/jptex/latex/jlreq/jlreq-ja.pdf) 和所提供的自定义选项的详细信息。

## 进一步阅读

更多信息请参见

* [使用 XƎLaTeX 支持现代字体](/latex/zh-cn/zi-ti/03-xelatex.md)
* [Latex-questions/Overleaf 是否支持 pTeX？](/latex/zh-cn/wen-da/09-does-overleaf-support-ptex.md)
* [排版引号和引号符号](/latex/zh-cn/yu-yan/04-typesetting-quotations.md)
* [国际语言支持](/latex/zh-cn/yu-yan/03-international-language-support.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/05-arabic.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)
* [LaTeX2ε 不那么简短的介绍](http://www.ctan.org/tex-archive/info/lshort/)
* [WikiBooks 上的 LaTeX/国际化](http://en.wikibooks.org/wiki/LaTeX/Internationalization)
* [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/11-japanese.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.
