> 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-questions/02-keep-track-of-your-labels-with-showlabels.md).

# Keep track of your labels with showlabels

**Author: James Allen (January 2012)**

Whenever I'm writing long LaTeX documents I always find myself jumping backwards and forwards in the code trying to remember what I named a `\label`. To save me losing my place in the code I use the [`showlabels`](https://ctan.org/pkg/showlabels?lang=en) package which displays the name of the label next to the corresponding equation. Then I can look in the PDF where it's easier the find the equation I'm looking for and I don't need to jump around in my code. It works on nearly everything you can assign a `\label` to. Marvellous!

**Usage**

In your preamble put:

```latex
\usepackage{showlabels}
```

**Example output**

![ShowlabelsExample.png](/files/t5Waf6LGeVTlYLOmkq6o)

**Options**

You can provide an option to showlabels to tell it where to place the labels:

```latex
\usepackage[inline]{showlabels}
```

Available options are (taken from the [documentation](https://ctan.org/pkg/showlabels?lang=en)):

* `outer` \[default]—all notes are placed in the text's outer margin
* `inner`—inner margin
* `left`—left margin
* `right`—right margin
* `marginal` \[default]—put notes in the margin
* `inline`—put notes inline, as much as possible, and ignore any of the margin-placement options above
* `nolabel`—do not insert a marginal note for `\label` commands
* `draft` \[default]—does nothing, partner of...
* `final`—turns off all the package's functionality

Note that `showlabels` should be included after the packages `amsmath` and `hyperref` to work correctly with them. See the [official documentation (PDF)](http://mirrors.ctan.org/macros/latex/contrib/showlabels/showlabels.pdf) for more details.


---

# 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-questions/02-keep-track-of-your-labels-with-showlabels.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.
