> 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/shu-shi-she-ding/01-lengths-in-latex.md).

# LaTeX における長さ

LaTeX には、作成された文書のさまざまな寸法を決定する多くの長さがあります。たとえば、指定された寸法パラメータは [フォント](/latex/ja/fonto/01-font-sizes-families-and-styles.md), [pages](/latex/ja/shu-shi-she-ding/07-page-size-and-margins.md)、または [段落](/latex/ja/shu-shi-she-ding/04-articles-how-to-change-paragraph-spacing-in-latex.md).

## 単位

以下に、LaTeX で使用可能な単位の説明を示します。

| 略語     | 値                                                                                                      |
| ------ | ------------------------------------------------------------------------------------------------------ |
| **pt** | pt はおよそ 1/72.27 インチで、これは約 0.0138 インチまたは 0.3515 mm に相当します（厳密には、pt はアメリカの *印刷用フィート* の 249/250 と定義されています） |
| **mm** | ミリメートル                                                                                                 |
| **cm** | センチメートル                                                                                                |
| **in** | インチ                                                                                                    |
| **ex** | 現在のフォントにおける 'x'（小文字）の高さのおおよそ（使用しているフォントによって異なります）                                                      |
| **em** | 現在のフォントにおける 'M'（大文字）の幅のおおよそ（使用しているフォントによって異なります）                                                       |
| **mu** | 1/18 em に等しい数式用単位。ここでの em は数式記号ファミリーから取られます                                                            |
| **sp** | いわゆる「special points」で、65536sp=1pt となる低レベルの計量単位                                                         |

以下は ex 単位と em 単位の違いを示す例です。

```latex
\documentclass[twocolumn]{article}
\usepackage{blindtext}
\usepackage{graphicx}

\setlength{\columnsep}{1in}

\begin{document}

\texttt{10ex} の幅にすると、次のようになります:

\includegraphics[width=10ex]{overleaf-logo}
\vspace{5mm}

\texttt{10em} の幅にすると、次のようになります:

\includegraphics[width=10em]{overleaf-logo}

\end{document}
```

![LengthsEx1OverleafUpdated.png](/files/1ff8f78f48b41c2b239460121dff9bdb83d10355)

[Overleafで例を開く](https://www.overleaf.com/project/new/template/19506?id=65960656\&templateName=Length+types+and+values+in+LaTeX\&latexEngine=pdflatex\&texImage=texlive-full%3A2020.1\&mainFile=)

## 長さ

長さとは、文書のいくつかの要素に対する相対的な距離の単位です。長さは次のコマンドで変更できます:

```latex
\setlength{\lengthname}{value_in_specified_unit}
```

たとえば、2段組の文書では、次のようにして段の間隔を 1 インチに設定できます。

```latex
\setlength{\columnsep}{1in}
```

![LengthsEx2.png](/files/900c8e53a4bfa1d3722f422bde425eb5af3547a2)

以下は、よく使われる長さとその説明をまとめた表です

| 長さ                | 説明                           |
| ----------------- | ---------------------------- |
| `\baselineskip`   | 段落内の行間の垂直距離                  |
| `\columnsep`      | 段組間の距離                       |
| `\columnwidth`    | 1段の幅                         |
| `\evensidemargin` | 偶数ページの余白。書籍などの両面印刷文書でよく使われます |
| `\linewidth`      | 現在の環境における行の幅。                |
| `\oddsidemargin`  | 奇数ページの余白。書籍などの両面印刷文書でよく使われます |
| `\paperwidth`     | ページの幅                        |
| `\paperheight`    | ページの高さ                       |
| `\parindent`      | 段落の字下げ                       |
| `\parskip`        | 段落間の垂直スペース                   |
| `\tabcolsep`      | 表（tabular 環境）における列間隔         |
| `\textheight`     | ページ内の本文領域の高さ                 |
| `\textwidth`      | ページ内の本文領域の幅                  |
| `\topmargin`      | 上余白の長さ                       |

[Overleafで例を開く](https://www.overleaf.com/project/new/template/19506?id=65960656\&templateName=Length+types+and+values+in+LaTeX\&latexEngine=pdflatex\&texImage=texlive-full%3A2020.1\&mainFile=)

## 長さを単位として使う

既定の長さは、TeX エンジンに組み込まれたハードコードの制限により、最大でおよそ 16384pt（または 5.75 メートル）まで、任意の値に設定できます。LaTeX の長さパラメータは、他の LaTeX 要素の寸法を設定する単位としても使えます。たとえば、画像の幅を本文全体の幅の 4 分の 1 に設定できます:

```latex
\includegraphics[width=0.25\textwidth]{overleaf-logo}
[...]
```

![LengthsEx3OverleafV2.png](/files/115a9c36c850cd231134cee33b170fef87171421)

次のコマンドでは `\includegraphics` 幅は、本文領域全体の幅の 0.25 に設定されています（このコマンドの詳細については [画像の挿入](/latex/ja/sononotopikku/27-inserting-images.md) を参照してください）。任意の長さを使い、それに任意の係数を掛けることができます。

[Overleafで例を開く](https://www.overleaf.com/project/new/template/19506?id=65960656\&templateName=Length+types+and+values+in+LaTeX\&latexEngine=pdflatex\&texImage=texlive-full%3A2020.1\&mainFile=)

## 参考文献

詳しくは次を参照してください。 [wikibooks の長さに関する記事](http://en.wikibooks.org/wiki/LaTeX/Lengths).


---

# 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/shu-shi-she-ding/01-lengths-in-latex.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.
