> 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/tex-latexpurimitibu/07-overfullrule.md).

# \overfullrule

`\overfullrule[=]` *寸法*

以下：

* “`[=]`” は、等号が省略可能であることを意味します。
* *寸法* は、TEX が理解できる単位—たとえば pt、bp、mm など—で指定される量です。

TEX が hbox がはみ出していることを検出すると—たとえば、組版された段落内の1行や、あるテキストがある `\hbox{..}`—その情報をログファイルに書き込みます。さらに、TEX エンジンは次のものも提供します `\overfullrule` TEX に、問題のあるボックスの末尾に短い罫線を追加するよう指示するために使えるコマンドで、ユーザーへの視覚的な警告として機能します。

**使用例**

「=」記号は省略可能なので、次のように書けます `\overfullrule=10pt` または `\overfullrule 10pt`.

なお、LATEX は `\overfullrule` を 0pt に、Plain TEX は 5pt に設定します。

#### 例

次のものを使います： `\hbox{}` それははみ出します： `\hbox to 10pt{This box will be overfull}` そして設定します `\overfullrule` を 0 でない値、たとえば 10mm に：

```
\overfullrule=10mm\hbox to 10pt{This box will be overfull}\par
```

次の図は出力を示しています：

![](/files/40f788dfd7ebf321f8358c5da6c3962998f7b14f)

ご覧のとおり、長さ 10mm の罫線が、はみ出した `\hbox`。次に設定します `\overfullrule=0mm` を、はみ出しボックスの罫線が表示されないようにするために：

```
\overfullrule=0mm\hbox to 10pt{This box will be overfull}
```

次の図は出力を示しています：

![](/files/ada5535dc5ca58e2c7c9b78fd518b481405af63b)

その結果の `\hbox` は依然としてはみ出していますが、今回はその事実を強調するためのはみ出し罫線なしで表示されます。

#### 別の例：段落内の行

TEX が段落を組版テキストの行に分割すると、段落内の各行は次のものに格納されます `\hbox`。 `\overfullrule` を 0 でない値にします。次の例では、段落内のはみ出した行の末尾に、はみ出し罫線が表示されます。

段落を作成するには、狭い `\vbox`にいくつかのテキストを入れ、 `\overfullrule=10pt`を設定し、枠線付きのボックスとして描画します。なお、 `\verb` コマンドを使うため、まず `\vbox` をボックスレジスタ（100）に保存し、その後 LATEX のコマンド（マクロ） `\fbox` を使ってその周囲にぴったりした枠線を描き、はみ出した行が見やすくします。

```
\overfullrule=10pt
\setlength{\fboxsep}{0pt}% To ensure a tight border with no gap
\setbox100=\vbox{\hsize=30mm この vbox の中で、
行幅を \verb|\hsize=30mm| を使って 30mm に設定します。
ここでは \verb|\vbox| の中にいくつかのテキストを組版しています
。これは \TeX{} に行分割を行わせる
と同時に、段落を水平ボックスの積み重ねとして構築するためです。
一部の行では \TeX{} が適切な
改行を見つけられず、その結果、幅が広すぎて
30mm の幅に収まらないことがあります。\verb|\overfullrule| が
0 でない（10pt）ため、それらのはみ出した行は
幅 10pt のはみ出し罫線で示されます。\TeX{} にとっては、
このボックスは依然として幅 30mm と見なされます。たとえ
一部の行が収まらず、\verb|\overfullrule| が
幅 10pt のものがいくつかの行の末尾に追加されても。}
\fbox{\copy100}
```

次の図は出力を示しています：

![](/files/cdffb10fe799dce4772084fad22f32e4c7f576d8)


---

# 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/tex-latexpurimitibu/07-overfullrule.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.
