> 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/wen-shu-gou-zao/06-nomenclatures.md).

# 命名法一覧

## はじめに

多くの科学文書では、略語や記号の一覧が一般的です。これらの種類の一覧は、LaTeX で次のものを用いて作成できます `nomencl` パッケージ。この記事では、記号の順序やサブグループ化をカスタマイズしながら、用語一覧を作成する方法を説明します。

用語一覧の項目は、インデックス項目とかなりよく似ています:

```latex
\documentclass{article}
\usepackage{nomencl}
\makenomenclature

\begin{document}
例を示します:
\nomenclature{\(c\)}{真空中の光速}
\nomenclature{\(h\)}{プランク定数}

\printnomenclature
\end{document}
```

[この `nomencl` Overleaf 上の例を開く](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=nomencl+package+example\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bnomencl%7D%0A%5Cmakenomenclature%0A%0A%5Cbegin%7Bdocument%7D%0AHere+is+an+example%3A%0A%5Cnomenclature%7B%5C%28c%5C%29%7D%7BSpeed+of+light+in+a+vacuum%7D%0A%5Cnomenclature%7B%5C%28h%5C%29%7D%7BPlanck+constant%7D%0A%0A%5Cprintnomenclature%0A%5Cend%7Bdocument%7D)

![Nomenclatures01OLV2.png](/files/56a703cacf0ed8f19d0149c1576f3cf3a93fe951)

いつものように、このパッケージはプリアンブルで次のように読み込まれます `\usepackage{nomencl}`. 用語一覧を生成するための3つの基本コマンドは次のとおりです:

* `\makenomenclature`. 通常はパッケージを読み込んだ直後に置きます。
* `\nomenclature`. 用語一覧の項目そのものを定義するために使います。2つの引数を取ります。記号と対応する説明です。
* `\printnomenclatures`. このコマンドは用語一覧を出力します。

## 基本構文

追加オプションは、 `nomencl` パッケージを読み込む際に使用できます。次の例では、用語一覧を目次に追加する方法と、既定の言語を変更する方法を示します:

```latex
\documentclass{article}
\usepackage[spanish]{babel}
\usepackage[intoc, spanish]{nomencl}
\makenomenclature

\begin{document}
\tableofcontents

\section{第1節}

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam lobortisfacilisis sem. Nullam nec mi et neque pharetra sollicitudin. Praesent imperdie...

\nomenclature{\(c\)}{真空中の光速}
\nomenclature{\(h\)}{プランク定数}

\printnomenclature
\end{document}
```

[この `nomencl` Overleaf 上の例を開く](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=nomencl+package+example\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%5Bspanish%5D%7Bbabel%7D%0A%5Cusepackage%5Bintoc%2C+spanish%5D%7Bnomencl%7D%0A%5Cmakenomenclature%0A%0A%5Cbegin%7Bdocument%7D%0A%5Ctableofcontents%0A%0A%5Csection%7BPrimera+Secci%C3%B3n%7D%0A%0ALorem+ipsum+dolor+sit+amet%2C+consectetuer+adipiscing+elit.+Etiam+lobortisfacilisis+sem.+Nullam+nec+mi+et+neque+pharetra+sollicitudin.+Praesent+imperdie...%0A%0A%5Cnomenclature%7B%5C%28c%5C%29%7D%7BSpeed+of+light+in+a+vacuum%7D%0A%5Cnomenclature%7B%5C%28h%5C%29%7D%7BPlanck+constant%7D%0A%0A%5Cprintnomenclature%0A%5Cend%7Bdocument%7D)

![Nomenclatures02OLV2.png](/files/400897b7a1e3fe949182d57b608178f54204815b)

ここでパッケージの読み込み時に使われている追加オプションは次のとおりです:

* `intoc` 目次に **用語一覧** を追加します。
* `spanish` 言語を変更し、既定のタイトル *Nomenclatures* をそれに応じて翻訳します。対応している言語は次のとおりです: `クロアチア語`, `デンマーク語`, `english`, `french`, `ドイツ語`, `イタリア語`, `ポーランド語`, `ポルトガル語`, `russian`, `spanish` や `ウクライナ語`.

の他の便利な機能としては、 `nomencl` パッケージには、用語一覧のタイトルを手動で設定したり、追加の注記を加えたりできる機能があります。

```latex
\documentclass{article}
\usepackage{nomencl}
\makenomenclature

\renewcommand{\nomname}{記号一覧}

\renewcommand{\nompreamble}{次の一覧では、この後本文中で使用するいくつかの記号を説明します}

\begin{document}
例を示します:

\nomenclature{\(c\)}{真空中の光速}
\nomenclature{\(h\)}{プランク定数}

\printnomenclature
\end{document}
```

[この `nomencl` Overleaf 上の例を開く](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=nomencl+package+example\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bnomencl%7D%0A%5Cmakenomenclature%0A%0A%5Crenewcommand%7B%5Cnomname%7D%7BList+of+Symbols%7D%0A%0A%5Crenewcommand%7B%5Cnompreamble%7D%7BThe+next+list+describes+several+symbols+that+will+be+later+used+within+the+body+of+the+document%7D%0A%0A%5Cbegin%7Bdocument%7D%0AHere+is+an+example%3A%0A%0A%5Cnomenclature%7B%5C%28c%5C%29%7D%7BSpeed+of+light+in+a+vacuum%7D%0A%5Cnomenclature%7B%5C%28h%5C%29%7D%7BPlanck+constant%7D%0A%0A%5Cprintnomenclature%0A%5Cend%7Bdocument%7D)

![Nomenclatures03verbOLV2.png](/files/d717d943c5e8d13a62189fbb55c63815fdd8fe03)

この行は

```
\renewcommand{\nomname}{記号一覧}
```

既定のタイトルを変更します。

コマンド

```
\renewcommand{\nompreamble}{次の一覧...}
```

は、タイトルと記号一覧の間にいくつかのテキストを挿入します。

## グルーピング

記号を種類ごとにグループ化するには、追加の作業が必要です。各記号にプレフィックスを付け、 `etoolbox` パッケージを使ってプレフィックスを比較します。

```latex
\documentclass{article}
\usepackage{amssymb}
\usepackage{nomencl}
\makenomenclature

%% このコードはグループを作成します
% -----------------------------------------
\usepackage{etoolbox}
\renewcommand\nomgroup[1]{%
  \item[\bfseries
  \ifstrequal{#1}{P}{物理定数}{%
  \ifstrequal{#1}{N}{数の集合}{%
  \ifstrequal{#1}{O}{その他の記号}{}}}%
]}
% -----------------------------------------

\begin{document}
例を示します:

\nomenclature[P]{\(c\)}{真空中の光速}
\nomenclature[P]{\(h\)}{プランク定数}
\nomenclature[P]{\(G\)}{万有引力定数}
\nomenclature[N]{\(\mathbb{R}\)}{実数}
\nomenclature[N]{\(\mathbb{C}\)}{複素数}
\nomenclature[N]{\(\mathbb{H}\)}{四元数}
\nomenclature[O]{\(V\)}{一定体積}
\nomenclature[O]{\(\rho\)}{摩擦係数}

\printnomenclature
\end{document}
```

[この `nomencl` Overleaf 上の例を開く](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=nomencl+package+example\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bamssymb%7D%0A%5Cusepackage%7Bnomencl%7D%0A%5Cmakenomenclature%0A%0A%25%25+This+code+creates+the+groups%0A%25+-----------------------------------------%0A%5Cusepackage%7Betoolbox%7D%0A%5Crenewcommand%5Cnomgroup%5B1%5D%7B%25%0A++%5Citem%5B%5Cbfseries%0A++%5Cifstrequal%7B%231%7D%7BP%7D%7BPhysics+constants%7D%7B%25%0A++%5Cifstrequal%7B%231%7D%7BN%7D%7BNumber+sets%7D%7B%25%0A++%5Cifstrequal%7B%231%7D%7BO%7D%7BOther+symbols%7D%7B%7D%7D%7D%25%0A%5D%7D%0A%25+-----------------------------------------%0A%0A%5Cbegin%7Bdocument%7D%0AHere+is+an+example%3A%0A%0A%5Cnomenclature%5BP%5D%7B%5C%28c%5C%29%7D%7BSpeed+of+light+in+a+vacuum%7D%0A%5Cnomenclature%5BP%5D%7B%5C%28h%5C%29%7D%7BPlanck+constant%7D%0A%5Cnomenclature%5BP%5D%7B%5C%28G%5C%29%7D%7BGravitational+constant%7D%0A%5Cnomenclature%5BN%5D%7B%5C%28%5Cmathbb%7BR%7D%5C%29%7D%7BReal+numbers%7D%0A%5Cnomenclature%5BN%5D%7B%5C%28%5Cmathbb%7BC%7D%5C%29%7D%7BComplex+numbers%7D%0A%5Cnomenclature%5BN%5D%7B%5C%28%5Cmathbb%7BH%7D%5C%29%7D%7BQuaternions%7D%0A%5Cnomenclature%5BO%5D%7B%5C%28V%5C%29%7D%7BConstant+volume%7D%0A%5Cnomenclature%5BO%5D%7B%5C%28%5Crho%5C%29%7D%7BFriction+index%7D%0A%0A%5Cprintnomenclature%0A%5Cend%7Bdocument%7D)

![Nomenclatures04OLV2.png](/files/db0bd648b9ca697ecae2fe9037ebafd67efb33af)

いくつかの追加グループが追加されます。このためのコードはそれほど単純ではなく、 `\ifstrequal{}{}{}{}`を使用します。最初の2つの引数は比較する文字列で、等しければ項目がグループに追加され、そうでなければ次の入れ子の条件がチェックされます。

注意してください。今では各 `\nomenclature` コマンドには、グループ化コードで使われる追加の引数として、角括弧内のプレフィックスがあります。

もし `etoolbox` が利用できない場合は、 `ifthen` パッケージを代わりに使用できます。これには条件式 `\ifthenelse{}{}{}`がありますが、構文は少し複雑です:

```latex
\usepackage{ifthen}
  \renewcommand{\nomgroup}[1]{%
  \item[\bfseries
  \ifthenelse{\equal{#1}{P}}{物理定数}{%
  \ifthenelse{\equal{#1}{O}}{その他の記号}{%
  \ifthenelse{\equal{#1}{N}}{数の集合}{}}}%
  ]}
```

これで同じ用語一覧のグループが生成されます。

## 物理定数に単位を追加する

もう1つの興味深い機能は、 `siunitx` パッケージを使って単位を追加し、それらを対応する項目の右側に揃えて配置することです。そのためには、 `nomunit` マクロを次の例のように定義する必要があります:

```latex
\documentclass{article}
\usepackage{amssymb}
\usepackage{nomencl}
\usepackage{siunitx}
\usepackage{hyperref}
\makenomenclature
\hypersetup{
    colorlinks=true,
    urlcolor=blue,
}
%% これによりサブグループが追加されます
%----------------------------------------------
\usepackage{etoolbox}
\renewcommand\nomgroup[1]{%
  \item[\bfseries
  \ifstrequal{#1}{A}{物理定数}{%
  \ifstrequal{#1}{B}{数の集合}{%
  \ifstrequal{#1}{C}{その他の記号}{}}}%
]}
%----------------------------------------------

%% これにより単位が追加されます
%----------------------------------------------
\newcommand{\nomunit}[1]{%
\renewcommand{\nomentryend}{\hspace*{\fill}#1}}
%----------------------------------------------

用語一覧の例
Overleaf チーム
\date{\today}

\begin{document}
\maketitle

\noindent これは、\texttt{nomencl} パッケージがどのように機能するかを示す例で、単位は \texttt{siunitx} パッケージを使って組版されています。物理定数の値と対応する単位を示すために \href{https://www.nist.gov/pml/fundamental-physical-constants}{NIST} が参照されており、リンクは \texttt{hyperref} パッケージ経由で提供されています:

\nomenclature[A, 02]{\(c\)}{\href{https://physics.nist.gov/cgi-bin/cuu/Value?c}
{真空中の光速}
\nomunit{\SI{299792458}{\meter\per\second}}}
\nomenclature[A, 03]{\(h\)}{\href{https://physics.nist.gov/cgi-bin/cuu/Value?h}
{プランク定数}
\nomunit{\SI[group-digits=false]{6.62607015e-34}{\joule\per\hertz}}}
\nomenclature[A, 01]{\(G\)}{\href{https://physics.nist.gov/cgi-bin/cuu/Value?bg}
{万有引力定数}
\nomunit{\SI[group-digits=false]{6.67430e-11}{\meter\cubed\per\kilogram\per\second\squared}}}
\nomenclature[B, 03]{\(\mathbb{R}\)}{実数}
\nomenclature[B, 02]{\(\mathbb{C}\)}{複素数}
\nomenclature[B, 01]{\(\mathbb{H}\)}{四元数}
\nomenclature[C]{\(V\)}{一定体積}
\nomenclature[C]{\(\rho\)}{摩擦係数}

\printnomenclature

\end{document}
```

[Overleafで開く（パッケージを使用した例 `nomencl` や `siunitx` ）。](/latex/ja/wen-shu-gou-zao/06-nomenclatures.md)

![Nomcomplex.png](/files/882030ae1548b10dd8d732e37c55b71a8227a8ab)

## 項目の並べ替え

これは既定の並び順です:

```latex
\documentclass{article}
\usepackage{nomencl}

\makenomenclature

\begin{document}
例を示します:

\nomenclature{\(+a\)}{演算子}
\nomenclature{\(2a\)}{数}
\nomenclature{\(:a\)}{句読点記号}
\nomenclature{\(Aa\)}{大文字}
\nomenclature{\(aa\)}{小文字}
\nomenclature{\(\alpha\)}{ギリシャ文字}

\printnomenclature

\end{document}
```

[この `nomencl` Overleaf 上の例を開く](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=nomencl+default+sort+order\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bnomencl%7D%0A%0A%5Cmakenomenclature%0A%0A%5Cbegin%7Bdocument%7D%0AHere+is+an+example%3A%0A%0A%5Cnomenclature%7B%5C%28%2Ba%5C%29%7D%7BOperator%7D%0A%5Cnomenclature%7B%5C%282a%5C%29%7D%7BNumber%7D%0A%5Cnomenclature%7B%5C%28%3Aa%5C%29%7D%7BPunctuation+symbol%7D%0A%5Cnomenclature%7B%5C%28Aa%5C%29%7D%7BUppercase+letter%7D%0A%5Cnomenclature%7B%5C%28aa%5C%29%7D%7BLowercase+letter%7D%0A%5Cnomenclature%7B%5C%28%5Calpha%5C%29%7D%7BGreek+character%7D%0A%0A%5Cprintnomenclature%0A%0A%5Cend%7Bdocument%7D)

![Nomenclatures05OLV2.png](/files/8d4834d0eb3fb5f0a1004cc8dd44c39fe0597db8)

ギリシャ文字がアルファベット文字の前に表示されていることに注意してください。これはバックスラッシュのためです `\` を `\alpha`.

グルーピングと同様に、プレフィックスを使って用語一覧の項目を手動で並べ替えることができます:

```latex
\documentclass{article}
\usepackage{nomencl}

\makenomenclature

\begin{document}
例を示します:

\nomenclature[06]{\(+a\)}{演算子}
\nomenclature[03]{\(2a\)}{数}
\nomenclature[05]{\(:a\)}{句読点記号}
\nomenclature[04]{\(Aa\)}{大文字}
\nomenclature[01]{\(aa\)}{小文字}
\nomenclature[02]{\(\alpha\)}{ギリシャ文字}

\printnomenclature

\end{document}
```

[この `nomencl` Overleaf 上の例を開く](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Sorting+nomencl+entries\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bnomencl%7D%0A%0A%5Cmakenomenclature%0A%0A%5Cbegin%7Bdocument%7D%0AHere+is+an+example%3A%0A%0A%5Cnomenclature%5B06%5D%7B%5C%28%2Ba%5C%29%7D%7BOperator%7D%0A%5Cnomenclature%5B03%5D%7B%5C%282a%5C%29%7D%7BNumber%7D%0A%5Cnomenclature%5B05%5D%7B%5C%28%3Aa%5C%29%7D%7BPunctuation+symbol%7D%0A%5Cnomenclature%5B04%5D%7B%5C%28Aa%5C%29%7D%7BUppercase+letter%7D%0A%5Cnomenclature%5B01%5D%7B%5C%28aa%5C%29%7D%7BLowercase+letter%7D%0A%5Cnomenclature%5B02%5D%7B%5C%28%5Calpha%5C%29%7D%7BGreek+character%7D%0A%0A%5Cprintnomenclature%0A%0A%5Cend%7Bdocument%7D)

![Nomenclatures06OLV2.png](/files/1720ed1387f55bdf710865c6040fd44c2a65d3e6)

括弧内の数字が、対応する記号を出力する順序を決定します。グルーピングと手動による並べ替えを組み合わせることもできます:

```latex
\documentclass{article}
\usepackage{amssymb}
\usepackage{nomencl}
\makenomenclature

\usepackage{etoolbox}
\renewcommand\nomgroup[1]{%
  \item[\bfseries
  \ifstrequal{#1}{A}{物理定数}{%
  \ifstrequal{#1}{B}{数の集合}{%
  \ifstrequal{#1}{C}{その他の記号}{}}}%
]}

\begin{document}
例を示します:

\nomenclature[A, 02]{\(c\)}{真空中の光速}
\nomenclature[A, 03]{\(h\)}{プランク定数}
\nomenclature[A, 01]{\(G\)}{万有引力定数}
\nomenclature[B, 03]{\(\mathbb{R}\)}{実数}
\nomenclature[B, 02]{\(\mathbb{C}\)}{複素数}
\nomenclature[B, 01]{\(\mathbb{H}\)}{八元数}
\nomenclature[C]{\(V\)}{一定体積}
\nomenclature[C]{\(\rho\)}{摩擦係数}

\printnomenclature

\end{document}
```

[この `nomencl` Overleaf 上の例を開く](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Grouping+and+sorting+with+nomencl\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bamssymb%7D%0A%5Cusepackage%7Bnomencl%7D%0A%5Cmakenomenclature%0A%0A%5Cusepackage%7Betoolbox%7D%0A%5Crenewcommand%5Cnomgroup%5B1%5D%7B%25%0A++%5Citem%5B%5Cbfseries%0A++%5Cifstrequal%7B%231%7D%7BA%7D%7BPhysics+Constants%7D%7B%25%0A++%5Cifstrequal%7B%231%7D%7BB%7D%7BNumber+Sets%7D%7B%25%0A++%5Cifstrequal%7B%231%7D%7BC%7D%7BOther+Symbols%7D%7B%7D%7D%7D%25%0A%5D%7D%0A%0A%5Cbegin%7Bdocument%7D%0AHere+is+an+example%3A%0A%0A%5Cnomenclature%5BA%2C+02%5D%7B%5C%28c%5C%29%7D%7BSpeed+of+light+in+a+vacuum%7D%0A%5Cnomenclature%5BA%2C+03%5D%7B%5C%28h%5C%29%7D%7BPlanck+constant%7D%0A%5Cnomenclature%5BA%2C+01%5D%7B%5C%28G%5C%29%7D%7BGravitational+constant%7D%0A%5Cnomenclature%5BB%2C+03%5D%7B%5C%28%5Cmathbb%7BR%7D%5C%29%7D%7BReal+numbers%7D%0A%5Cnomenclature%5BB%2C+02%5D%7B%5C%28%5Cmathbb%7BC%7D%5C%29%7D%7BComplex+numbers%7D%0A%5Cnomenclature%5BB%2C+01%5D%7B%5C%28%5Cmathbb%7BH%7D%5C%29%7D%7BOctonions%7D%0A%5Cnomenclature%5BC%5D%7B%5C%28V%5C%29%7D%7BConstant+volume%7D%0A%5Cnomenclature%5BC%5D%7B%5C%28%5Crho%5C%29%7D%7BFriction+index%7D%0A%0A%5Cprintnomenclature%0A%0A%5Cend%7Bdocument%7D)

![Nomenclatures07OLV2.png](/files/12d0a3f7a0d48cd5ca578ed684cd51b960ba9ae5)

グルーピングに使用される大文字は、前のセクションの例で使用したものとは異なります。というのも、その文字はグループの並べ替えに使われているからです。

## さらに読む

詳しくは以下を参照してください：

* [用語集](/latex/ja/wen-shu-gou-zao/05-glossaries.md)
* [複数ファイルの LaTeX プロジェクト](/latex/ja/wen-shu-gou-zao/08-multi-file-latex-projects.md)
* [テキスト配置](/latex/ja/shu-shi-she-ding/06-text-alignment.md)
* [太字、斜体、下線](/latex/ja/latexno/03-bold-italics-and-underlining.md)
* [数式](/latex/ja/shu-xue/01-mathematical-expressions.md)
* [マクロの作成と再定義](/latex/ja/komando/01-commands.md)
* [`nomencl` パッケージのドキュメント](http://mirror.jmu.edu/pub/CTAN/macros/latex/contrib/nomencl/nomencl.pdf)
* [`ifthen` パッケージのドキュメント](http://texdoc.net/texmf-dist/doc/latex/base/ifthen.pdf)
* [`etoolbox` パッケージのドキュメント](http://mirror.math.ku.edu/tex-archive/macros/latex/contrib/etoolbox/etoolbox.pdf)


---

# 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/wen-shu-gou-zao/06-nomenclatures.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.
