Read one LaTeX section
read_sectionExtract one LaTeX section from an Overleaf .tex file by title, returning only that section's source so revisions stay focused and the rest of the paper remains out of context.
Instructions
Read one section of a .tex file by its title: from its heading to the next heading at the same or a shallower level, stopping before trailing matter such as \appendix, the bibliography or \end{document}. Prefer it over read_file when revising one part of a paper, so the rest stays out of context. sectionTitle is compared case-insensitively with the title in braces, not an optional [short] title: an exact match wins, otherwise the first heading in document order that contains it, so a short fragment can pick an earlier section than intended. Pulls from Overleaf first. Returns the section's LaTeX source as stored, cut off after 60,000 characters; if nothing matches, the reply lists the titles that exist.
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. | |
| sectionTitle | Yes | Section title exactly as it appears inside the sectioning command, e.g. Introduction for \section{Introduction}. Call list_sections first if unsure. |