> 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/latexno/02-paragraphs-and-new-lines.md).

# 段落と改行

## はじめに

この記事では *基本* LaTeX の段落書式設定。テキストの配置を変更する方法も含みます。より詳しい情報とさらなる例は、次の記事にあります [テキスト配置](/latex/ja/shu-shi-she-ding/06-text-alignment.md) や [段落の書式設定](/latex/ja/shu-shi-she-ding/04-articles-how-to-change-paragraph-spacing-in-latex.md).

## 最初の例

まず、2つの中央揃えの段落を、ある `center` 環境の中に書くことで組版する例から始めましょう。2つの段落の間に空行を入れて新しい段落を始めていることに注意してください—ただし、それはよく使われる方法ではありますが、新しい段落を始める唯一の方法ではありません。

```latex
\begin{center}
例1: 次の段落（引用符内に示したもの）は、
center 環境を使った中央揃え配置の例です。

``La\TeX{} は文書作成システムおよび文書マークアップ
言語です。 \LaTeX{} は書式設定に \TeX{} 組版プログラムを使用し
その出力を生成し、それ自体は \TeX{} マクロ言語で書かれています。
\LaTeX{} は特定の（実行可能な）組版プログラムの名前ではありませんが、
マークアップ
規約（\TeX{} マクロ）の集合を指し、それが \LaTeX{} 文書を組版するために使われます。"
\end{center}
```

[Overleaf でこの例を開く](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Basic+paragraph+formatting\&snip=%5Cdocumentclass%7Barticle%7D%0A%25+Using+the+geometry+package+with+a+small%0A%25+page+size+to+create+the+article+graphic%0A%5Cusepackage%5Bpaperheight%3D6in%2C%0A+++paperwidth%3D5in%2C%0A+++top%3D10mm%2C%0A+++bottom%3D20mm%2C%0A+++left%3D10mm%2C%0A+++right%3D10mm%5D%7Bgeometry%7D%0A%5Cbegin%7Bdocument%7D%0A%5Cbegin%7Bcenter%7D%0AExample+1%3A+The+following+paragraph+%28given+in+quotes%29+is+an+%0Aexample+of+centred+alignment+using+the+center+environment.+%0A%0A%60%60La%5CTeX%7B%7D+is+a+document+preparation+system+and+document+markup+%0Alanguage.+%5CLaTeX%7B%7D+uses+the+%5CTeX%7B%7D+typesetting+program+for+formatting+%0Aits+output%2C+and+is+itself+written+in+the+%5CTeX%7B%7D+macro+language.+%0A%5CLaTeX%7B%7D+is+not+the+name+of+a+particular+%28executable%29+typesetting+program%2C+but+%0Arefers+to+the+suite+of+commands+%28%5CTeX%7B%7D+macros%29+which+form+the+markup+%0Aconventions+used+to+typeset+%5CLaTeX%7B%7D+documents.%22%0A%5Cend%7Bcenter%7D%0A%5Cend%7Bdocument%7D)

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

![LaTeX の中央揃え段落の例](/files/9c0f707a0153a2746cd750941c47a9b74b3c5035)

## 新しい段落を始める

上で述べたように、新しい段落を始める方法の一つは空行を入れることですが、次のコード断片では `\par` コマンド：

```latex
これは最初の段落に含まれるテキストです。
これは最初の段落に含まれるテキストです。
これは最初の段落に含まれるテキストです。\par
これは2番目の段落に含まれるテキストです。
これは2番目の段落に含まれるテキストです。
これは2番目の段落に含まれるテキストです。
```

[Overleaf でこの例を開く](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Starting+a+new+paragraph\&snip=%5Cdocumentclass%7Barticle%7D%0A%25+Using+the+geometry+package+with+a+small%0A%25+page+size+to+create+the+article+graphic%0A%5Cusepackage%5Bpaperheight%3D6in%2C%0A+++paperwidth%3D5in%2C%0A+++top%3D10mm%2C%0A+++bottom%3D20mm%2C%0A+++left%3D10mm%2C%0A+++right%3D10mm%5D%7Bgeometry%7D%0A%5Cbegin%7Bdocument%7D%0AThis+is+text+contained+in+the+first+paragraph.+%0AThis+is+text+contained+in+the+first+paragraph.+%0AThis+is+text+contained+in+the+first+paragraph.%5Cpar%0AThis+is+text+contained+in+the+second+paragraph.+%0AThis+is+text+contained+in+the+second+paragraph.%0AThis+is+text+contained+in+the+second+paragraph.%0A%5Cend%7Bdocument%7D)

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

![\par コマンドを使って段落を作成する](/files/a1c39ee4bc3c58972c509e52cc06beadfa9767d3)

## 段落の配置

デフォルトでは、LaTeX の段落は両端揃え、つまり左右両端の余白にぴったり合わせて配置されます。もし組版したいのが *両端揃えでない* 段落なら `flushleft` または `flushright` 環境を閉じます。

### flushleft および flushright 環境

次の例では、段落を `flushleft` や `flushright` 環境内で組版する方法を示します— `center` 環境の例については、節を参照してください [最初の例](#a-first-example).

```latex
\section*{左揃えで組版された段落}

\begin{flushleft}
La\TeX{} は文書作成システムおよび文書マークアップ
言語です。 \LaTeX{} は書式設定に \TeX{} 組版プログラムを使用し
その出力を生成し、それ自体は \TeX{} マクロ言語で書かれています。
\LaTeX{} は特定の（実行可能な）組版プログラムの名前ではありませんが、
マークアップ
\LaTeX{} 文書を組版するために使われる規約です。
\end{flushleft}

\section*{右揃えで組版された段落}

\begin{flushright}
La\TeX{} は文書作成システムおよび文書マークアップ
言語です。 \LaTeX{} は書式設定に \TeX{} 組版プログラムを使用し
その出力を生成し、それ自体は \TeX{} マクロ言語で書かれています。
\LaTeX{} は特定の（実行可能な）組版プログラムの名前ではありませんが、
マークアップ
\LaTeX{} 文書を組版するために使われる規約です。
\end{flushright}
```

[Overleaf でこの例を開く](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Example+of+flushleft+and+flushright\&snip=%5Cdocumentclass%7Barticle%7D%0A%25+Using+the+geometry+package+with+a+small%0A%25+page+size+to+create+the+article+graphic%0A%5Cusepackage%5Bpaperheight%3D6in%2C%0A+++paperwidth%3D5in%2C%0A+++top%3D10mm%2C%0A+++bottom%3D20mm%2C%0A+++left%3D10mm%2C%0A+++right%3D10mm%5D%7Bgeometry%7D%0A%5Cbegin%7Bdocument%7D%0A%5Csection%2A%7BA+paragraph+typeset+flush+left%7D%0A%0A%5Cbegin%7Bflushleft%7D%0ALa%5CTeX%7B%7D+is+a+document+preparation+system+and+document+markup+%0Alanguage.+%5CLaTeX%7B%7D+uses+the+%5CTeX%7B%7D+typesetting+program+for+formatting+%0Aits+output%2C+and+is+itself+written+in+the+%5CTeX%7B%7D+macro+language.+%0A%5CLaTeX%7B%7D+is+not+the+name+of+a+particular+%28executable%29+typesetting+program%2C+but+%0Arefers+to+the+suite+of+commands+%28%5CTeX%7B%7D+macros%29+which+form+the+markup+%0Aconventions+used+to+typeset+%5CLaTeX%7B%7D+documents.%0A%5Cend%7Bflushleft%7D%0A%0A%5Csection%2A%7BA+paragraph+typeset+flush+right%7D%0A%0A%5Cbegin%7Bflushright%7D%0ALa%5CTeX%7B%7D+is+a+document+preparation+system+and+document+markup+%0Alanguage.+%5CLaTeX%7B%7D+uses+the+%5CTeX%7B%7D+typesetting+program+for+formatting+%0Aits+output%2C+and+is+itself+written+in+the+%5CTeX%7B%7D+macro+language.+%0A%5CLaTeX%7B%7D+is+not+the+name+of+a+particular+%28executable%29+typesetting+program%2C+but+%0Arefers+to+the+suite+of+commands+%28%5CTeX%7B%7D+macros%29+which+form+the+markup+%0Aconventions+used+to+typeset+%5CLaTeX%7B%7D+documents.%0A%5Cend%7Bflushright%7D%0A%5Cend%7Bdocument%7D)

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

![LaTeX の flushleft および flushright 環境](/files/1e36f90c051069348d968a6da9d958b58867f08a)

### \raggedright と \raggedleft

次のような環境を使う代わりに `flushleft`, `flushright` または `center` は、いわゆる「切り替え」コマンドです:

* `\raggedright`、を使う代わりに `flushleft` 環境
* `\raggedleft`、を使う代わりに `flushright` 環境
* `\centering`、を使う代わりに `center` 環境

これらの切り替えコマンドは、挿入された箇所から文書末尾までテキストの配置を変更します。ただし、その効果がグループ内に限定されるか、別の切り替えコマンドによって変更される場合は除きます。

次の例では、 `\raggedright`, `\raggedleft` や `\centering` の効果は、 `\begingroup ... \endgroup`によって作成されたグループ内で使われているため、ローカルに限定されています。さらに、各場合で段落テキストの後に空行があり、そのあとに `\endgroup` コマンドがあり、これにより LaTeX は段落を書式設定し、\raggedright によって適用された設定が `\raggedright`, `\raggedleft` や `\centering` まだ有効です。

```latex
\section*{完全両端揃えで組版された段落}
\LaTeX{} は特定の（実行可能な）組版プログラムの名前ではありませんが、\TeX{} マクロの集合であるコマンド群を指し、それがマークアップ
\LaTeX{} 文書を組版するために使われる規約です。

\section*{\texttt{\string\raggedright} を使って組版された段落}

\begingroup
\raggedright
\LaTeX{} は特定の（実行可能な）組版プログラムの名前ではありませんが、\TeX{} マクロの集合であるコマンド群を指し、それがマークアップ
\LaTeX{} 文書を組版するために使われる規約です。

\endgroup

\section*{\texttt{\string\raggedleft} を使って組版された段落}

\begingroup
\raggedleft
\LaTeX{} は特定の（実行可能な）組版プログラムの名前ではありませんが、\TeX{} マクロの集合であるコマンド群を指し、それがマークアップ
\LaTeX{} 文書を組版するために使われる規約です。

\endgroup

\section*{\texttt{\string\centering} を使って組版された段落}

\begingroup
\centering
\LaTeX{} は特定の（実行可能な）組版プログラムの名前ではありませんが、\TeX{} マクロの集合であるコマンド群を指し、それがマークアップ
\LaTeX{} 文書を組版するために使われる規約です。

\endgroup
```

[Overleaf でこの例を開く](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Non-justified+paragraph+formatting+options\&snip=%5Cdocumentclass%7Barticle%7D%0A%25+Using+the+geometry+package+with+a+small%0A%25+page+size+to+create+the+article+graphic%0A%5Cusepackage%5Bpaperheight%3D6in%2C%0A+++paperwidth%3D5in%2C%0A+++top%3D10mm%2C%0A+++bottom%3D20mm%2C%0A+++left%3D10mm%2C%0A+++right%3D10mm%5D%7Bgeometry%7D%0A%5Cbegin%7Bdocument%7D%0A%5Csection%2A%7BA+fully+justified++typeset+paragraph%7D+%0A%5CLaTeX%7B%7D+is+not+the+name+of+a+particular+%28executable%29+typesetting+program%2C+but+refers+to+the+suite+of+commands+%28%5CTeX%7B%7D+macros%29+which+form+the+markup+%0Aconventions+used+to+typeset+%5CLaTeX%7B%7D+documents.%0A%0A%5Csection%2A%7BA+paragraph+typeset+using+%5Ctexttt%7B%5Cstring%5Craggedright%7D%7D%0A%0A%5Cbegingroup%0A%5Craggedright+%0A%5CLaTeX%7B%7D+is+not+the+name+of+a+particular+%28executable%29+typesetting+program%2C+but+refers+to+the+suite+of+commands+%28%5CTeX%7B%7D+macros%29+which+form+the+markup+%0Aconventions+used+to+typeset+%5CLaTeX%7B%7D+documents.%0A%0A%5Cendgroup%0A%0A%5Csection%2A%7BA+paragraph+typeset+using+%5Ctexttt%7B%5Cstring%5Craggedleft%7D%7D%0A%0A%5Cbegingroup%0A%5Craggedleft+%0A%5CLaTeX%7B%7D+is+not+the+name+of+a+particular+%28executable%29+typesetting+program%2C+but+refers+to+the+suite+of+commands+%28%5CTeX%7B%7D+macros%29+which+form+the+markup+%0Aconventions+used+to+typeset+%5CLaTeX%7B%7D+documents.%0A%0A%5Cendgroup%0A%0A%5Csection%2A%7BA+paragraph+typeset+using+%5Ctexttt%7B%5Cstring%5Ccentering%7D%7D%0A%0A%5Cbegingroup%0A%5Ccentering+%0A%5CLaTeX%7B%7D+is+not+the+name+of+a+particular+%28executable%29+typesetting+program%2C+but+refers+to+the+suite+of+commands+%28%5CTeX%7B%7D+macros%29+which+form+the+markup+%0Aconventions+used+to+typeset+%5CLaTeX%7B%7D+documents.%0A%0A%5Cendgroup%0A%5Cend%7Bdocument%7D)

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

![LaTeX 段落を組版するためのさまざまな配置オプション](/files/47d5fd202055d9bc08cc88622424533f5dece2e2)

より詳しい情報とテキスト配置の例については [Overleaf のテキスト配置に関する記事を参照してください](/latex/ja/shu-shi-she-ding/06-text-alignment.md) これはまた、 [ragged2e LaTeX パッケージの使用についても解説しています](https://ctan.org/pkg/ragged2e?lang=en) 整形の不揃いなテキストを組版し、ハイフネーションを設定するためのものです。

## 段落のインデント

デフォルトでは、新しい段落は通常、 `\parindent` というパラメータによって制御される量だけインデントされます `\setlength`を使って設定できます。例えば:

```latex
\setlength{\parindent}{20pt}
```

は `\parindent` を20pt に設定します。インデントを避けるには、 `\parindent` を0pt（または0mm、0cm など）に設定するか、コマンド `\noindent` を段落の先頭で使います。デフォルトでは、LaTeX は次の例に示すように、文書のセクションに含まれる最初の段落をインデントしません:

```latex
\setlength{\parindent}{20pt}

\section*{これはセクションです}
\textbf{最初の段落} はセクション内のもので、ご覧のとおりインデントされていません。これは段落内の追加のテキストです。これは段落内の追加のテキストです。

\textbf{2番目の段落}。ご覧のとおり、これはインデントされています。これは段落内の追加のテキストです。これは段落内の追加のテキストです。

\noindent\textbf{3番目の段落}。これも \texttt{\string\noindent} を使っているためインデントされていません。これは段落内の追加のテキストです。これは段落内の追加のテキストです。現在の \verb|\parindent| の値は \the\parindent です。これは段落内の追加のテキストです。
```

[Overleaf でこの例を開く](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Basic+paragraph+indentation\&snip=%5Cdocumentclass%7Barticle%7D%0A%25+Using+the+geometry+package+with+a+small%0A%25+page+size+to+create+the+article+graphic%0A%5Cusepackage%5Bpaperheight%3D6in%2C%0A+++paperwidth%3D5in%2C%0A+++top%3D10mm%2C%0A+++bottom%3D20mm%2C%0A+++left%3D10mm%2C%0A+++right%3D10mm%5D%7Bgeometry%7D%0A%5Cbegin%7Bdocument%7D%0A%5Csetlength%7B%5Cparindent%7D%7B20pt%7D%0A%0A%5Csection%2A%7BThis+is+a+section%7D%0A%5Ctextbf%7BFirst+paragraph%7D+of+a+section+which%2C+as+you+can+see%2C+is+not+indented.+This+is+more+text+in+the+paragraph.+This+is+more+text+in+the+paragraph.%0A%0A%5Ctextbf%7BSecond+paragraph%7D.+As+you+can+see+it+is+indented.+This+is+more+text+in+the+paragraph.+This+is+more+text+in+the+paragraph.+%0A%0A%5Cnoindent%5Ctextbf%7BThird+paragraph%7D.+This+too+is+not+indented+due+to+use+of+%5Ctexttt%7B%5Cstring%5Cnoindent%7D.+This+is+more+text+in+the+paragraph.+This+is+more+text+in+the+paragraph.++The+current+value+of+%5Cverb%7C%5Cparindent%7C+is+%5Cthe%5Cparindent.+This+is+more+text+in+the+paragraph.%0A%5Cend%7Bdocument%7D)

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

![LaTeX の段落インデントのデモ](/files/28c06935dd4633ab7f20e1381d77ad0557dfea62)

### インデント関連コマンドに関する注意

段落のインデントは、次の3つのコマンドによって制御または影響されます:

* `\parindent`: 現在の段落インデントのサイズを格納するパラメータ
* `\indent`: このコマンドの効果は使われる場所によって異なります:
  * 水平モード（段落内、または `\hbox`）または数式モードでは、幅 `\parindent`
  * 垂直モード（段落間、または `\vbox`）では、インデント付きの新しい段落の開始をトリガーします
* `\noindent`: このコマンドの効果も、使われる場所によって異なります:
  * 垂直モード（段落間、または `\vbox`）でも、新しい *インデントなしの* 段落
  * 水平モード（段落内、または `\hbox`）または数式モードでは効果がありません。無視されます

次の例は `\indent`:

```latex
\documentclass{article}
% geometry パッケージを小さな
% ページサイズとともに使って記事の図を作成する
\usepackage[paperheight=6in,
   paperwidth=5in,
   top=10mm,
   bottom=20mm,
   left=10mm,
   right=10mm]{geometry}
\begin{document}
\noindent テキストを含む新しい段落、そのあとに \verb|\indent|\indent コマンド。次に、インデントも付くインライン数式 $y\indent x$。 \verb|\indent| は、\verb|\hbox| 内で使う場合にも機能します。たとえば \verb|\hbox{A\indent B}| では \hbox{A\indent B} となります。
\end{document}
```

[Overleaf でこの例を開く](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Example+of+the+%5Cindent+command\&snip=%5Cdocumentclass%7Barticle%7D%0A%25+Using+the+geometry+package+with+a+small%0A%25+page+size+to+create+the+article+graphic%0A%5Cusepackage%5Bpaperheight%3D6in%2C%0A+++paperwidth%3D5in%2C%0A+++top%3D10mm%2C%0A+++bottom%3D20mm%2C%0A+++left%3D10mm%2C%0A+++right%3D10mm%5D%7Bgeometry%7D%0A%5Cbegin%7Bdocument%7D%0A%5Cnoindent+A+new+paragraph+with+some+text%2C+then+an+%5Cverb%7C%5Cindent%7C%5Cindent+command.+Next%2C+some+inline+math+which+also+has+an+indent+%24y%5Cindent+x%24.+%5Cverb%7C%5Cindent%7C+also+works+when+used+in+an+%5Cverb%7C%5Chbox%7C+such+as+%5Cverb%7C%5Chbox%7BA%5Cindent+B%7D%7C+which+produces+%5Chbox%7BA%5Cindent+B%7D.%0A%5Cend%7Bdocument%7D)

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

![\indent コマンドのデモ](/files/c1797c53bb202a7f93ca561048262d6e7bce8687)

## さらに読む

詳しくは確認してください

* [段落の書式設定](/latex/ja/shu-shi-she-ding/04-articles-how-to-change-paragraph-spacing-in-latex.md)
* [テキスト配置](/latex/ja/shu-shi-she-ding/06-text-alignment.md)
* [LaTeX における長さ](/latex/ja/shu-shi-she-ding/01-lengths-in-latex.md)
* [改行と空白](/latex/ja/shu-shi-she-ding/05-line-breaks-and-blank-spaces.md)
* [リスト](/latex/ja/latexno/04-lists.md)
* [太字、斜体、下線](/latex/ja/latexno/03-bold-italics-and-underlining.md)
* [LaTeX2εへのそれほど短くない入門](http://www.ctan.org/tex-archive/info/lshort/)


---

# 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/latexno/02-paragraphs-and-new-lines.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.
