# Document insights

List the headings, figures, tables, equations, labels, citations, and TODOs of a LaTeX, Typst, or Markdown document, and copy its submission metadata.

Before you submit, it helps to see what the document actually holds. Does every figure have a caption, and is every cited key in the bibliography? **Document insights** lists it all in one dialog, with each entry linked back to its line in the source.

Open it with the **Document insights** button at the right end of the editor toolbar, or run **Document insights** from the ⌘K palette. It works in LaTeX, Typst, and Markdown projects and reads the document starting from the main file, so a LaTeX chapter brought in with `\input` or a Typst file brought in with `#include` is counted too.

## What each tab lists

**Overview** shows a count for every list below. Click a count to open that tab.

- **Headings**, indented by level.
- **Figures** and **Tables**, each with its caption (or **No caption**), its label, and **Unnumbered** when it has no number.
- **Equations**: display equations only, not inline math.
- **Labels**: every label, with what it marks: heading, figure, table, equation, or other.
- **Citations**: every cited key and how many times it is cited. A key that isn't in the bibliography is marked **Not in the bibliography**, and Overview shows how many there are.
- **To-dos**: `TODO`, `FIXME`, and `XXX` notes in the source. In LaTeX, `\todo`, `\missingfigure`, and the fixme package's notes count too.

Click a row to close the dialog and jump to that line. A row in grey couldn't be traced to the source.

## Numbers and pages

Where the numbers come from depends on the engine:

- **LaTeX**: figure, table, equation, and heading numbers and their pages come from the last compile, for items that have a label. The footer tells you whether they are current. If you have edited since, compile again to update them.
- **Typst**: the dialog asks Typst to read the document when it opens, with the project's Typst version and the selected build variant, so the numbers and pages match the source as it is now. If Typst can't compile the document, Overview lists the errors instead, each linked to its line. Only the first 5,000 elements are listed. The footer names the Typst version used.
- **Markdown**: entries are listed in source order, without numbers or pages.

**Refresh** reads the document again without closing the dialog.

## Submission metadata

Overview also shows the **Title**, **Authors**, **Keywords**, **Date**, and **Abstract** Oleafly found. Anything missing reads **Not set**.

- In LaTeX, they come from `\title`, `\author`, `\date`, the `abstract` environment, and a `\keywords` command or a `keywords` or `IEEEkeywords` environment.
- In Typst, they come from the arguments of the template the document applies, or from `#set document(...)`. An abstract can also come from a heading named "Abstract".
- In Markdown, they come from the front matter: `title`, `author` or `authors`, `date`, `keywords`, and `abstract`.

**Copy submission metadata** puts the title, authors, keywords, and abstract on the clipboard as labelled lines, ready to paste into a submission form. The button is off when none of them are set.

## Related pages

- [Preflight checks](/docs/preflight/): deeper checks on the source, log, and PDF before submission
- [Citations & bibliography](/docs/citations/): add the keys that Document insights reports as missing
- [Document settings](/docs/document-settings/): the other document tool on the editor toolbar
