> 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-tw/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/5b4c7b1a5160d6b743a21c98b7e47cfd94e1afc9)

這一行 `\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)

此範例會產生以下輸出：

![使用 xeCJK 套件與 XeLaTeX 進行日文排版的範例](/files/ab4ef32bd0099f32c8fec82efb1ad11cd9bf8628)

以下是各個指令的說明：

* `\usepackage{xeCJK}`：這包含套件 `xeCJK` ，它允許在以 XeLaTeX 編譯的文件中使用中文、日文和韓文字型。請參閱 [這篇文章](/latex/zh-tw/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/50a0bba5c0645f098d0eef26fdb2aac4fab5b4aa)

## pTeX 引擎

許多在日本發表的期刊與會議論文集都使用一個特定的日文 LaTeX 發行版，稱為 [pLaTeX](https://ctan.org/pkg/platex?lang=en)，它是以 [`jsarticle` 或 `jsbook` 文件類別](https://ctan.org/pkg/jsclasses)為基礎。pLaTeX 支援許多日文排版慣例，包括直排。

### 在 Overleaf 上使用 pLaTeX

雖然 pLaTeX 並未列在 Overleaf 的 **編譯器** 下拉式選單：

![Overleaf 支援的編譯器清單](/files/872c2c1079f7d7552afb44ce927f6393de29959f)

Overleaf 可以透過在您的專案中加入一個小型設定檔來設定使用 pLaTeX：該檔案稱為 [`latexmkrc`](/latex/zh-tw/shen-ru-wen-zhang/28-how-to-use-latexmkrc-with-overleaf.md)。以下是操作步驟：

1. [設定專案的編譯器設定](/latex/zh-tw/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{} 指令的排版指示……

\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/122ffcf11b6df3e7c29d22ca13db82f81f399c12)

## 搭配 LuaLaTeX 的 luatex-ja 套件組

該 [luatex-ja](https://www.ctan.org/pkg/luatexja) 套件組是一項相對較新的嘗試，將 pTeX 的排版能力移植到 LuaLaTeX，以善用 LuaLaTeX 的腳本引擎與 OTF/TTF 支援。（別忘了 [將專案的編譯器設為 LuaLaTeX](/latex/zh-tw/geng-duo-zhu-ti/08-choosing-a-latex-compiler.md)。）最簡單的使用方式是載入 `ltjbook`, `ltjarticle` 或 `ltjreport` 文件類別：

```latex
\documentclass{ltjarticle}
\begin{document}
\section{這是第一個章節}
用日文示範 \LaTeX{} 組版的導入部分。

此字型也可以用於數學模式以及其他環境中
\end{document}
```

[在 Overleaf 中開啟這個 `ltjarticle` 以及 LuaLaTeX 範例於 Overleaf。](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/59051d1d0f4c647876ab97edbe6e06930bc00783)

或者，如果您想使用不同的文件類別，則可以改為載入 `luatex-ja` 套件，如下所示：

```latex
\documentclass{scrartcl}
\usepackage{luatexja}
\begin{document}
\section{這是第一個章節}
用日文示範 \LaTeX{} 組版的導入部分。

此字型也可以用於數學模式以及其他環境中
\end{document}
```

[在 Overleaf 中開啟這個 `luatex-ja` 以及 LuaLaTeX 範例於 Overleaf。](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/b1794f6c8844f34ea374c9fe145ec558dc831181)

若要載入您偏好的日文文字字型，您還需要 `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-tw/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` 以及 LuaLaTeX 範例於 Overleaf。](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)

此範例會產生以下輸出：

![在 Overleaf 中使用 jlreq 文件類別排版的日文文字](/files/7a1441d856280025522447527213fe2e1cb614b8)

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-tw/zi-xing/03-xelatex.md)
* [Latex-questions／Overleaf 支援 pTeX 嗎？](/latex/zh-tw/wen-yu-da/09-does-overleaf-support-ptex.md)
* [引號與引號符號的排版](/latex/zh-tw/yu-yan/04-typesetting-quotations.md)
* [國際語言支援](/latex/zh-tw/yu-yan/03-international-language-support.md)
* [中文](/latex/zh-tw/yu-yan/06-chinese.md)
* [法文](/latex/zh-tw/yu-yan/07-french.md)
* [德文](/latex/zh-tw/yu-yan/08-german.md)
* [希臘文](/latex/zh-tw/yu-yan/09-greek.md)
* [義大利文](/latex/zh-tw/yu-yan/10-italian.md)
* [阿拉伯文](/latex/zh-tw/yu-yan/05-arabic.md)
* [韓語](/latex/zh-tw/yu-yan/12-korean.md)
* [葡萄牙文](/latex/zh-tw/yu-yan/13-portuguese.md)
* [俄文](/latex/zh-tw/yu-yan/14-russian.md)
* [西班牙文](/latex/zh-tw/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-tw/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.
