List LaTeX sections
list_sectionsLists a .tex file's sectioning commands with nesting depth and line ranges, so you can target parts by title before reading or editing.
Instructions
List the sectioning commands in one .tex file, \part down to \subparagraph including starred forms, with their nesting depth and line ranges. Call it before read_section or edit_section to get the exact titles they match, and to address part of a paper by title instead of line numbers that shift with every edit. path names a single file: \input and \include are not followed, so list each included file separately, and commented-out headings are skipped. Pulls from Overleaf first. Returns one line per heading, indented by depth, as \section{Title} [lines start-end], or says the file has none; a missing, binary or out-of-project path fails.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to the .tex file relative to the project root, e.g. main.tex. | |
| project | No | Which project to use: its Overleaf address, its 24-character id, or a registered project name. Omit to use the default project. |