> 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/zh-tw/tex-latex-ji-ben-ming-ling/06-hfuzz.md).

# \hfuzz

TEX 提供一些指令，可讓你影響它對於某個方塊是否被視為過滿並據此報告的判斷——例如在 `.log` 檔案中使用的指令。

* `\hfuzz[=]` *尺寸*: `\hfuzz` 指定內容在一個 `\hbox` 可以超過該 `\hbox` 之前，將被視為過滿。
* `\vfuzz[=]` *尺寸*: `\vfuzz` 指定內容在一個 `\vbox` 可以超過該高度 `\vbox` 之前，將被報告為過滿。

請注意：

* “`[=]`” 表示等號是可選的。
* *尺寸* 是以 TEX 能理解的單位指定的數值——例如 pt、bp、mm 等。

**使用範例**

* `\hfuzz=0.5pt` 或 `\hfuzz 0.5pt` （「=」可選）
* `\vfuzz=0.75pt` 或 `\vfuzz 0.75pt` （「=」可選）

#### 範例

如果我們把「Overleaf」這個字放入一個 `\hbox` 並測量其寬度（使用預設字型）：

```
\setbox99=\hbox{Overleaf}\the\wd99
```

我們會看到其值為 36.41675pt。如果我們現在將「Overleaf」放入一個 `\hbox` 太窄的，例如 36pt，並設定 [`\overfullrule`](/latex/zh-tw/tex-latex-ji-ben-ming-ling/07-overfullrule.md) 為非零值：

```
\overfullrule=5mm
\hbox to 36pt{Overleaf}
```

下圖顯示輸出：

![](/files/deb3a1bc5975826598fbbe4759a37a3214b8d606)

如果我們將 `\hfuzz=0.5pt` 並重複上述操作：

```
\overfullrule=5mm
\hfuzz=0.5pt
\hbox to 36pt{Overleaf}
```

下圖：

![](/files/7822ed550524e0602bde6e3b210153e4f55adcbe)

顯示 TEX 不再將 `\hbox to 36pt{Overleaf}` 視為過滿，因此不會加上 [`\overfullrule`](/latex/zh-tw/tex-latex-ji-ben-ming-ling/07-overfullrule.md) 規則線，因為 `\hfuzz` （0.5pt）足以阻止這一點。

的行為 `\vfuzz` 與……類似 `\hfuzz`——但 TEX 不會為 vbox 顯示過滿規則線。

#### \hfuzz 的更多細節

TEX *實際上* TEX 實際上檢查的是內容超出寬度與總（零階）收縮膠的差值。例如，假設某些內容的總寬度是 100pt，而所需的方塊寬度是 95pt：TEX 需要吸收的超出寬度是 5pt——它需要將可用膠收縮 5pt。假設總零階膠收縮量為 4pt，則 TEX 會比較目前的 `\hfuzz` 與 5pt 的值$$-$$4pt$$=$$1pt。

#### 相關命令

另見：

* [`\overfullrule`](/latex/zh-tw/tex-latex-ji-ben-ming-ling/07-overfullrule.md)
* [`\hbadness`](/latex/zh-tw/tex-latex-ji-ben-ming-ling/05-hbadness.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/zh-tw/tex-latex-ji-ben-ming-ling/06-hfuzz.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.
