> 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/09-multiple-columns.md).

# 複数列

## はじめに

2段組の文書は、パラメータを指定することで簡単に作成できます `\twocolumn` を documentclass 宣言に渡します。列レイアウトにさらに柔軟性が必要な場合や、複数列の文書を作成したい場合は、パッケージ `multicol` がそのためのコマンド群を提供します。この記事では、 `multicol` パッケージの使い方を、まずこの基本例から説明します：

```latex
\documentclass{article}
\usepackage{blindtext}
\usepackage{multicol}
\title{Multicols Demo}
\author{Overleaf}
\date{2021年4月}

\begin{document}
\maketitle

\begin{multicols}{3}
[
\section{第1節}
人の世のあらゆるものは滅びゆく運命にあります。そして運命が召すとき、君主も従わねばなりません。
]
\blindtext\blindtext
\end{multicols}

\end{document}
```

[この `multicols` Overleaf 上の例を開く](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=multicols+package+demo\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bblindtext%7D%0A%5Cusepackage%7Bmulticol%7D%0A%5Ctitle%7BMulticols+Demo%7D%0A%5Cauthor%7BOverleaf%7D%0A%5Cdate%7BApril+2021%7D%0A%0A%5Cbegin%7Bdocument%7D%0A%5Cmaketitle%0A%0A%5Cbegin%7Bmulticols%7D%7B3%7D%0A%5B%0A%5Csection%7BFirst+Section%7D%0AAll+human+things+are+subject+to+decay.+And+when+fate+summons%2C+Monarchs+must+obey.%0A%5D%0A%5Cblindtext%5Cblindtext%0A%5Cend%7Bmulticols%7D%0A%0A%5Cend%7Bdocument%7D)

![3列の例](/files/d568d3a004e701839a97232db86e4044449f52e2)

パッケージを読み込むには、次の行を

```latex
\usepackage{multicol}
```

プリアンブルに追加します。パッケージを読み込んだら、環境 `multicols` を使えるようになります。この環境は 2 つの引数を取ります：

* 列数。この引数は波括弧内で渡す必要があり、この例では値は 3 です。
* 「ヘッダーテキスト」は、角括弧の間に挿入します。これは省略可能で、段組テキストの上部に表示されます。ここでは図や表のようなフロート要素を除き、任意の LaTeX コマンドを使えます。例では、ここに節タイトルと短い段落を設定しています。

タグで囲まれたテキスト `\begin{multicols}` や `\end{multicols}` で囲まれたテキストは段組形式で出力されます。

## 列間隔

列間隔は `\columnsep`で決まります。以下の例を参照してください：

```latex
\documentclass{article}
\usepackage{blindtext}
\usepackage{multicol}
\setlength{\columnsep}{1cm}
\title{2つ目の multicols デモ}
\author{Overleaf}
\date{2021年4月}

\begin{document}
\maketitle

\begin{multicols}{2}
[
\section{第1節}
人の世のあらゆるものは滅びゆく運命にあります。そして運命が召すとき、君主も従わねばなりません。
]
\blindtext\blindtext
\end{multicols}

\end{document}
```

[この `multicols` Overleaf 上の例を開く](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=multicols+package+demo\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bblindtext%7D%0A%5Cusepackage%7Bmulticol%7D%0A%5Csetlength%7B%5Ccolumnsep%7D%7B1cm%7D%0A%5Ctitle%7BSecond+multicols+Demo%7D%0A%5Cauthor%7BOverleaf%7D%0A%5Cdate%7BApril+2021%7D%0A%0A%5Cbegin%7Bdocument%7D%0A%5Cmaketitle%0A%0A%5Cbegin%7Bmulticols%7D%7B2%7D%0A%5B%0A%5Csection%7BFirst+Section%7D%0AAll+human+things+are+subject+to+decay.+And+when+fate+summons%2C+Monarchs+must+obey.%0A%5D%0A%5Cblindtext%5Cblindtext%0A%5Cend%7Bmulticols%7D%0A%0A%5Cend%7Bdocument%7D)

![2段組の例](/files/27f6fc4d931a5dcc78172b89ad046902467372cc)

ここでは、コマンド `\setlength{\columnsep}{1cm}` が列間隔を 1cm に設定します。参照： [LaTeX における長さ](/latex/ja/shu-shi-she-ding/01-lengths-in-latex.md) 使用可能な単位の一覧。

## 不均衡な段組

デフォルトの `multicols` 環境では、各列に同じ量のテキストが入るように段が揃えられます。この既定の形式は、星付き環境 `multicols*`:

```latex
\documentclass{article}
\usepackage{blindtext}
\usepackage{multicol}
\setlength{\columnsep}{1cm}
\title{2つ目の multicols デモ}
\author{Overleaf}
\date{2021年4月}
\begin{document}
\maketitle
\begin{multicols*}{3}
[
\section{第1節}
人の世のあらゆるものは滅びゆく運命にあります。そして運命が召すとき、君主も従わねばなりません。
]
\blindtext\blindtext
\end{multicols*}

\end{document}
```

[この `multicols` Overleaf 上の例を開く](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=multicols+package+demo\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bblindtext%7D%0A%5Cusepackage%7Bmulticol%7D%0A%5Csetlength%7B%5Ccolumnsep%7D%7B1cm%7D%0A%5Ctitle%7BSecond+multicols+Demo%7D%0A%5Cauthor%7BOverleaf%7D%0A%5Cdate%7BApril+2021%7D%0A%5Cbegin%7Bdocument%7D%0A%5Cmaketitle%0A%5Cbegin%7Bmulticols%2A%7D%7B3%7D%0A%5B%0A%5Csection%7BFirst+Section%7D%0AAll+human+things+are+subject+to+decay.+And+when+fate+summons%2C+Monarchs+must+obey.%0A%5D%0A%5Cblindtext%5Cblindtext%0A%5Cend%7Bmulticols%2A%7D%0A%0A%5Cend%7Bdocument%7D)

![3列デモ](/files/a39d971e8f37f77b6bbbf004e694f390838dc93e)

この例を Overleaf で開くと、テキストはページ末尾に達するまで 1 列に出力され、その後は次の列へと続いていきます。

## フロート要素の挿入

フロート要素（表や図）は、段組文書に `wrapfig` や `wraptable`を使って挿入できます。以下の LaTeX コード断片は完全な LaTeX 文書ではありませんが、フロート要素の使い方を示しています。コードの下のリンクを使って、Overleaf でコンパイルできる完全な LaTeX 文書を開いてください。

```latex
\begin{multicols}{2}
[
\section{第1節}
人の世のあらゆるものは滅びゆく運命にあります。そして運命が召すとき、君主も従わねばなりません。
]

こんにちは。ここに意味のないテキストがあります。このテキストは何を示すべきかを
この位置では、印字されたテキストがこのように見えます。
このテキストを読んでも、何の情報も得られません。本当に？ それとも
情報はないのでしょうか？ それとも。

\vfill

\begin{wrapfigure}{l}{0.7\linewidth}
\includegraphics[width=\linewidth]{overleaf-logo}
\caption{これは Overleaf のロゴです}
\end{wrapfigure}

このようなダミーテキストは、選択したフォントについての情報や、どのように
文字の書体、そして見た目の印象についての情報を与えてくれます。このテキストは
すべてを含む...

\begin{wraptable}{l}{0.7\linewidth}
\centering
\begin{tabular}{|c|c|}
\\hline
名称 & ISO \\
\\hline
アフガニスタン & AF \\
オーランド諸島 & AX \\
アルバニア    &AL  \\
アルジェリア   &DZ \\
アメリカ領サモア & AS \\
アンドラ & AD   \\
アンゴラ & AO \\
\\hline
\end{tabular}
\caption{表、フロート要素}
\label{table:ta}
\end{wraptable}

\end{multicols}
```

![MulticolumnsEx4OverleafV2.png](/files/1d06cf69bd2748432d4413298dfa0a996306a130)

[この `multicols` Overleaf LaTeX プロジェクト内の例](https://www.overleaf.com/project/new/template/19510?id=65969509\&templateName=A+multicols+demo\&latexEngine=pdflatex\&texImage=texlive-full%3A2020.1\&mainFile=)

パッケージ内のフロート **multicol** パッケージは現在のバージョンでは十分にサポートされていません。従来の `figure*` や `table*` 環境で挿入された要素は、挿入後の次のページの上部または下部にしか表示されず、レイアウトを崩します。ここで示す例は回避策ですが、いくつか粗い点があるかもしれません。たとえば、フロート幅を `\linewidth` に設定すると、奇妙なテキストの重なりが発生します。とはいえ、以下にコマンドの簡単な説明を示します：

* `\usepackage{wrapfig}`。この行をプリアンブルに入れて、パッケージを読み込みます **wrapfig**
* 環境 `wrapfigure` は、本文に回り込む図を挿入します。この環境についての詳細や追加例は [画像と表の配置](/latex/ja/to/02-positioning-images-and-tables.md).
* 環境 `wraptable` は〜に相当します *wrapfigure* が、表用です。参照： [画像と表の配置](/latex/ja/to/02-positioning-images-and-tables.md) 詳細は。

## 縦の罫線の挿入

文書によっては、可読性を高めるために、列区切りとして縦の罫線を挿入できます：

```latex
\documentclass{article}
\usepackage{blindtext}
\usepackage{multicol}
\usepackage{color}
\setlength{\columnseprule}{1pt}
\def\columnseprulecolor{\color{blue}}

\begin{document}

\begin{multicols}{3}
[
\section{第1節}
人の世のあらゆるものは滅びゆく運命にあります。そして運命が召すとき、君主も従わねばなりません。
]
こんにちは。ここに意味のないテキストがあります。このテキストは何を示すべきかを
この位置では、印字されたテキストがこのように見えます。

このテキストを読んでも、何の情報も得られません。本当に？ それとも
情報はないのでしょうか？ それとも。

\columnbreak
\blindtext
ここから新しい列になります。意味のないテキストをいくつか示します。このテキスト
は、この位置で印刷されたテキストがどのように見えるかを示すはずです。

このテキストを読んでも、何の情報も得られません。本当に？ それとも
情報はないのでしょうか？ それとも...
\end{multicols}

\blindtext

\end{document}
```

[この `multicols` Overleaf 上の例を開く](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=multicols+package+demo\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bblindtext%7D%0A%5Cusepackage%7Bmulticol%7D%0A%5Cusepackage%7Bcolor%7D%0A%5Csetlength%7B%5Ccolumnseprule%7D%7B1pt%7D%0A%5Cdef%5Ccolumnseprulecolor%7B%5Ccolor%7Bblue%7D%7D%0A%0A%5Cbegin%7Bdocument%7D%0A%0A%5Cbegin%7Bmulticols%7D%7B3%7D%0A%5B%0A%5Csection%7BFirst+Section%7D%0AAll+human+things+are+subject+to+decay.+And+when+fate+summons%2C+Monarchs+must+obey.%0A%5D%0AHello%2C+here+is+some+text+without+a+meaning.++This+text+should+show+what+%0Aa+printed+text+will+look+like+at+this+place.%0A%0AIf+you+read+this+text%2C+you+will+get+no+information.++Really%3F++Is+there+%0Ano+information%3F++Is+there.%0A%0A%5Ccolumnbreak%0A%5Cblindtext%0AThis+will+be+in+a+new+column%2C+here+is+some+text+without+a+meaning.++This+text+%0Ashould+show+what+a+printed+text+will+look+like+at+this+place.%0A%0AIf+you+read+this+text%2C+you+will+get+no+information.++Really%3F++Is+there+%0Ano+information%3F++Is+there...%0A%5Cend%7Bmulticols%7D%0A%0A%5Cblindtext%0A%0A%5Cend%7Bdocument%7D)

![列間の罫線の例](/files/4a8ef874476d694f69b7cea6766d2237faca46a4)

この例を Overleaf で開くと、列区切り線の色も指定できることがわかります。以下に各コマンドの説明を示します：

**\usepackage{color}.**

この行は、文書内で複数の色を使えるようにするため、プリアンブルに挿入します。

**\setlength{\columnseprule}{1pt}**

これは列区切りに使う罫線の幅を決めます。既定では 0 に設定されています。例では幅が 1pt の罫線が出力されます。

**\def\columnseprulecolor{\color{blue}}**

区切り罫線の色は青に設定されています。色の操作については、LaTeX で色を使う記事を参照してください。

**\columnbreak**

このコマンドは列の区切り位置を挿入します。この場合、テキストの振る舞いは予想と異なります。列区切りが挿入され、その後、区切り位置より前の段落が利用可能な空間を埋めるよう均等に配置されます。例では、第2段落が列の下部にあり、第2段落と第1段落の間に空白が挿入されています。

## さらに読む

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

* [段落と改行](/latex/ja/latexno/02-paragraphs-and-new-lines.md)
* [太字、斜体、下線](/latex/ja/latexno/03-bold-italics-and-underlining.md)
* [リスト](/latex/ja/latexno/04-lists.md)
* [画像の挿入](/latex/ja/sononotopikku/27-inserting-images.md)
* [表](/latex/ja/to/01-tables.md)
* [画像と表の配置](/latex/ja/to/02-positioning-images-and-tables.md)
* [LaTeX における長さ](/latex/ja/shu-shi-she-ding/01-lengths-in-latex.md)
* [段落の書式設定](/latex/ja/shu-shi-she-ding/04-articles-how-to-change-paragraph-spacing-in-latex.md)
* [ページサイズと余白](/latex/ja/shu-shi-she-ding/07-page-size-and-margins.md)
* [片面印刷と両面印刷の文書](/latex/ja/shu-shi-she-ding/08-single-sided-and-double-sided-documents.md)
* [LaTeXで色を使う](/latex/ja/shu-shi-she-ding/13-using-colors-in-latex.md)
* [脚注](/latex/ja/shu-shi-she-ding/14-footnotes.md)
* [欄外メモ](/latex/ja/shu-shi-she-ding/15-margin-notes.md)
* [**multicols** パッケージのドキュメント](http://mirrors.ctan.org/macros/latex/required/tools/multicol.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/shu-shi-she-ding/09-multiple-columns.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.
