> 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/latex-errors/28-no-positions-in-optional-float-specifier.md).

# No positions in optional float specifier

This is a standard LaTeX error which appears when you do not include a [float specifier](/latex/figures-and-tables/02-positioning-images-and-tables.md) in the options of a float i.e. the **`ht`** in **`\begin{figure}[ht]`**. The float specifier parameter is an option which allows us to have a greater control over where a figure is placed. The different placement options available to us are listed below:

| Specifier | Permission                                                                                                                                              |
| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| h         | Place the float *here*, i.e., *approximately* at the same point it occurs in the source text (however, not *exactly* at the spot)                       |
| t         | Position at the *top* of the page.                                                                                                                      |
| b         | Position at the *bottom* of the page.                                                                                                                   |
| p         | Put on a special *page* for floats only.                                                                                                                |
| !         | Override internal parameters LaTeX uses for determining "good" float positions.                                                                         |
| H         | Places the float at precisely the location in the LaTeX code. Requires the *float* package (*\usepackage{float}*). This is somewhat equivalent to *h!*. |

These *float specifiers* can be placed inside the square brackets when we create a float, such as **`\begin{figure}[h]`**. They can even be placed in combinations such as **`\begin{figure}[!htb]`**, which tells LaTeX to place the figure *here*, or *top*, or *bottom*. If you leave the square brackets blank by writing something like **`\begin{table}[]`**, an error message will appear such as the one shown below.

main.tex

No positions in optional float specifier.

## How to resolve the error

**Removing the square brackets:**

The simplest way to get rid of this error is to remove the square brackets when we are not using a float specifier i.e. instead of writing **`\begin{figure}[]`**, you could simply write **`\begin{figure}`**.

**Inserting a float specifier:**

Another way to resolve this error is by inserting a [float specifier](/latex/figures-and-tables/02-positioning-images-and-tables.md) telling LaTeX where you would like your float to appear. This should be included in the square brackets, such as **`\begin{figure}[h]`** or **`\begin{table}[!htb]`**.


---

# 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/latex-errors/28-no-positions-in-optional-float-specifier.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.
