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

# 日本語

さまざまな LaTeX エンジンで日本語組版をサポートするためのパッケージはいくつかありますが、すべてのパッケージが縦書きなど、あらゆる日本語組版の慣習を完全にサポートしているわけではありません。このヘルプ記事では、pdfLaTeX、XƎLaTeX、pTeX、LuaLaTeX で日本語を組版する方法を簡単に説明します。

## CJKutf8 パッケージを pdfLaTeX で使用する

この `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}
```

[この CJKutf8 の例を Overleaf で開く。](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)

この例では、2 つのフォントファミリーを使って日本語テキストを組版した次の出力が示されます。

![pdfLaTeX で CJKutf8 パッケージを使用した日本語組版の例](/files/e4c3966929f6f05de31c7dacb717c61de80e2817)

この行は `\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}
このテキストは、別のフォントを持つことになります

これは等幅フォントを使用する verbatim 環境です。
\end{verbatim}
\end{document}
```

[この xeCJK の例を Overleaf で開く。](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/064139b7ead0b9a87675fb3a42679b689a89daa5)

以下は各コマンドの説明です。

* `\usepackage{xeCJK}`：これにはパッケージが含まれます `xeCJK` これにより、XeLaTeX でコンパイルする文書内で中国語、日本語、韓国語のフォントを使用できます。 [この記事](/latex/ja/sononotopikku/08-choosing-a-latex-compiler.md) Overleaf プロジェクトのコンパイラ設定については、ヘルプを参照してください。
* `\setCJKmainfont{IPAMincho}`：この文書で使用するメインフォントを設定します。
* `\setCJKsansfont{IPAGothic}`：サンセリフ体フォントを必要とする要素で使用するフォントを設定します。
* `\setCJKmonofont{IPAGothic}`：等幅フォントを必要とする要素で使用するフォントを設定します。例では、 `verbatim` 環境内の日本語テキストがこのフォントを使用します。

### Google Noto フォントを使う

CJK 組版に適した Google Noto フォントは 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}
このテキストは、別のフォントを持つことになります

これは等幅フォントを使用する verbatim 環境です。
\end{verbatim}
\end{document}
```

[この xeCJK の例を Overleaf で開く。](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)

この例では次の出力が生成されます:

![Google Noto フォントを使用した Overleaf での日本語組版](/files/9dddaab856a44401b81dd9b2474b371c7a59b648)

## pTeX エンジン

日本で出版される多くの雑誌や会議論文集では、次のような特定の日本語 LaTeX ディストリビューションが使用されています。 [pLaTeX](https://ctan.org/pkg/platex?lang=en)で、これは次のものをベースにしています： [`jsarticle` または `jsbook` 文書クラス](https://ctan.org/pkg/jsclasses)。pLaTeX は、縦書きを含む多くの日本語組版の慣習をサポートしています。

### Overleaf で pLaTeX を使う

pLaTeX は、Overleaf の **コンパイラ** メニューのドロップダウンには表示されませんが：

![Overleaf のサポートされているコンパイラ一覧](/files/1e048419235ef584a9c5c1dd0f0a776bc3727325)

プロジェクトに小さな設定ファイルを追加することで、Overleaf を pLaTeX で使用するように設定できます。そのファイルの名前は [`latexmkrc`](/latex/ja/xiang-xi-ji-shi/28-how-to-use-latexmkrc-with-overleaf.md)です。手順は次のとおりです。

1. [プロジェクトのコンパイラ設定を](/latex/ja/narejjibsu/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';
```

[この pLaTeX プロジェクトを Overleaf で開く。](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/a9db94c5bfb74cbbf2b41ab67b86dd08a5eb58ef)

## LuaLaTeX 用の luatex-ja パッケージバンドル

この [luatex-ja](https://www.ctan.org/pkg/luatexja) パッケージバンドルは、pTeX の組版機能を LuaLaTeX に移植し、LuaLaTeX のスクリプトエンジンと OTF/TTF サポートを活用するための比較的新しい取り組みです。（忘れずに [プロジェクトのコンパイラを LuaLaTeX に設定してください](/latex/ja/sononotopikku/08-choosing-a-latex-compiler.md)。）最も簡単な使い方は、次のものを読み込むことです： `ltjbook`, `ltjarticle` または `ltjreport` 文書クラス：

```latex
\documentclass{ltjarticle}
\begin{document}
\section{これは最初のセクションである}
日本語で \LaTeX の組版を実証するための導入部分。

フォントは、数式環境や他の環境でも使用できます。
\end{document}
```

[この `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)

この例では次の出力が生成されます:

![LuaLaTeX と ltjarticle 文書クラスを使用して Overleaf で日本語を組版する](/files/5d62b2beafcebdf8a723d5877f59e21644888235)

あるいは、別の文書クラスを使いたい場合は、次のものを読み込めます： `luatex-ja` 代わりにパッケージを次のように読み込みます：

```latex
\documentclass{scrartcl}
\usepackage{luatexja}
\begin{document}
\section{これは最初のセクションである}
日本語で \LaTeX の組版を実証するための導入部分。

フォントは、数式環境や他の環境でも使用できます。
\end{document}
```

[この `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)

この例では次の出力が生成されます:

![LuaLaTeX と luatex-ja を使用して Overleaf で日本語を組版する](/files/15a83796bc766ffd07239965028bc70a7b294a32)

日本語テキストに自分の好みのフォントを読み込むには、次のものも必要です： `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/ja/sononotopikku/08-choosing-a-latex-compiler.md), [pLaTeX or upLaTeX](#the-ptex-engine) コンパイラとして。

```latex
\documentclass{jlreq}
\begin{document}
\section{これは最初のセクションである}
日本語で \LaTeX の組版を実証するための導入部分。

フォントは、数式環境や他の環境でも使用できます。
\end{document}
```

[この `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/8c8a5b19572ea1f1e14a664c646cda983ddd7074)

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/ja/fonto/03-xelatex.md)
* [Latex-questions/Overleaf は pTeX をサポートしていますか？](/latex/ja/to-2/09-does-overleaf-support-ptex.md)
* [引用と引用符の組版](/latex/ja/yan-yu/04-typesetting-quotations.md)
* [国際言語サポート](/latex/ja/yan-yu/03-international-language-support.md)
* [中国語](/latex/ja/yan-yu/06-chinese.md)
* [フランス語](/latex/ja/yan-yu/07-french.md)
* [ドイツ語](/latex/ja/yan-yu/08-german.md)
* [ギリシャ語](/latex/ja/yan-yu/09-greek.md)
* [イタリア語](/latex/ja/yan-yu/10-italian.md)
* [アラビア語](/latex/ja/yan-yu/05-arabic.md)
* [韓国語](/latex/ja/yan-yu/12-korean.md)
* [ポルトガル語](/latex/ja/yan-yu/13-portuguese.md)
* [ロシア語](/latex/ja/yan-yu/14-russian.md)
* [スペイン語](/latex/ja/yan-yu/15-spanish.md)
* [LaTeX2εへのそれほど短くない入門](http://www.ctan.org/tex-archive/info/lshort/)
* [WikiBooks の LaTeX/Internationalization](http://en.wikibooks.org/wiki/LaTeX/Internationalization)
* [WikiBooks の LaTeX/Special\_Characters](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/ja/yan-yu/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.
