> 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/latexer/04-double-subscript.md).

# 二重下付き

## はじめに

慣例的に、LaTeX ではアンダースコア文字（`_`）を使って、たとえば下付き文字を組版します。たとえば `$a_b$` は $$a\_b$$を生成します。もし `$a_bcde$` と書くと、最初の文字 `b`だけが下付きになり、 $$a\_bcde$$というのも LaTeX は *仮定しません* 文字列全体を下付きにしたいのだと `bcde`。複数の項目（トークン）を下付きとして組版するには、それらをグループで囲むよう LaTeX に指示する必要があります `{...}`。たとえば次のように： `$a_{bcde}$`、これにより $$a\_{bcde}$$.

## 二重下付きエラー

二重下付きエラーは、LaTeX に、すでに *下付きが付いている* 数式の一部分にさらに下付き文字を付けるよう指示したときに発生します。このエラーは通常、中括弧を使うことで解消されます `{...}` 。中括弧は数式モード内で、いわゆる *部分数式*—組版しようとしている数式表現の断片を指す用語です。

たとえば、次のように書くと `$a_b_c$` は、次の二重下付きエラーを生成します：

![Overleaf に表示される二重下付きエラー](/files/a16c6a94f763c1b917443738676c2144e8df09df)

この特定のエラーは、中括弧を使うことでいくつかの方法で修正できます `{...}`—結果は中括弧の位置によって異なります：

* `$a_{b_c}$` は組版されます $$\displaystyle a\_{b\_c}$$
* `${a_b}_c$` は組版されます $${a\_b}\_c$$
* `$a_{bc}$` は組版されます $$a\_{bc}$$

### 二重下付きエラー：特殊なケース

tex.stackexchange の `質問で` 取り上げています [二重下付きエラーの意外な例](https://tex.stackexchange.com/questions/253080/why-am-i-getting-a-double-subscript-error)を、原因とそれに対応する修正法を知っておく価値がありそうなものとして紹介しています。ここではその例を再掲します。

次の例は、中括弧を使っているにもかかわらずコンパイルに失敗します：

```latex
\documentclass{article}
\begin{document}
\({\vec a_b}_c\)
\end{document}
```

[この ***エラーを発生させる*** Overleaf 上の例を開く](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=accents+package+example\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cbegin%7Bdocument%7D%0A%5C%28%7B%5Cvec+a_b%7D_c%5C%29%0A%5Cend%7Bdocument%7D)

問題を修正する一つの方法は、 [`accents` パッケージ](https://ctan.org/pkg/accents?lang=en) を文書のプリアンブルに追加することです（ [こちら](https://tex.stackexchange.com/a/253094)):

```latex
\documentclass{article}
\usepackage{accents}
\begin{document}
\({\vec a_b}_c\)
\end{document}
```

[Overleaf でこの例を開く](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=accents+package+example\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Baccents%7D%0A%5Cbegin%7Bdocument%7D%0A%5C%28%7B%5Cvec+a_b%7D_c%5C%29%0A%5Cend%7Bdocument%7D)

## 下付き文字についてさらに

さらに深い階層の下付き文字は、LaTeX を次のように書くことで組版できます `$a_{b_{c_{d_e}}}$` 、これにより $$a\_{b\_{c\_{d\_e}}}$$が組版されます。第2階層以下（下付きの下付き）のすべての下付き文字は同じフォントサイズ（ポイント）で組版されますが、第1階層の下付き文字は少し大きいフォントサイズで組版されます。下付き文字についてさらに詳しく知るには、Overleaf の [そのトピック専用のヘルプページをご覧ください](/latex/ja/shu-xue/02-subscripts-and-superscripts.md).


---

# 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/latexer/04-double-subscript.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.
