> 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/latex-cuo-wu/19-latex-error-unknown-float-option-h.md).

# LaTeX 錯誤：未知的浮動體選項 \`H'

當你忘記載入 **`float`** 套件時。浮動體參數會在方括號中撰寫，只要我們使用一個 *float* 例如圖形或表格，也就是說， **`H`** 中插入一個 **`\begin{figure}[H]`**。 **`H`** 浮動體參數是 **`float`** 套件的一部分。它告訴編譯器將圖形放在頁面上的該精確位置，而不是把它移到別處。每當我們想使用這個選項時，必須在 **`\usepackage{float}`** 中加入。若想進一步了解如何使用選項來指定浮動位置，請參閱我們的 [說明文件](/latex/zh-tw/tu-biao-yu-biao-ge/02-positioning-images-and-tables.md).

## 常見原因

**忘記載入 `float` 套件的範例程式碼：**

該 [float 套件](https://www.ctan.org/pkg/float?lang=en) 提供我們 `H` 選項。這是 `h`更強的版本，並告訴 LaTeX 我們希望圖形出現在 *精確地* 這裡。如果我們使用 `H` 選項，但忘記包含 `\usepackage{float}` 在我們的前言區中，我們會得到如下所示的錯誤

main.tex，第 12 行

LaTeX 錯誤：未知的浮動選項 \`H'。

請參閱 LaTeX 手冊或 LaTeX Companion 以獲得說明。輸入 H 以取得即時說明。... l.10 \begin{figure}\[H] 選項 \`H' 被忽略，並改用 \`p'。

要解決這個錯誤，我們只需要在 **`\usepackage{float}`** 中加入，亦即在 **`\begin{document}`**


---

# 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/latex-cuo-wu/19-latex-error-unknown-float-option-h.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.
