Expand description
Build the per-file label/reference model from the CST.
A single whole-tree walk (mirror of project::collect_include_edges)
collects \label{…} definitions, literal label options from curated
environments, and the reference-command family, then a flat resolve pass
matches refs to defs by name. Labels live in one document-global namespace,
so there is no scope walk—resolution is a flat name match, not a scope-chain
resolution.
Enums§
- Cite
Command - The behavior of a curated citation command.
Functions§
- build
- build_
with_ declarations - Build the semantic model while honoring project-declared ref/cite aliases.
- cite_
command - The recognized citation command for a control-word name, or
None. - is_
glossary_ ref_ command - Whether
nameis a glossary/acronym reference command whose first{…}group is an entry key (\gls,\acrshort,\glsxtrfull, …). Shared with the completion classifier (crate::completion), likeref_commandandcite_command, so the name set has a single source of truth. Unlike citations, every command here takes exactly one key per group (no comma list). - key_
argument_ command - Whether
nameis a command whose arguments hold opaque keys, identifiers, or text rather than typeset math — the\label/\ref/\cite/\gls/color families plus\tag(amsmath, text content) and\hyperref(key plus link text). The union of the family predicates above, kept here so the name sets stay single-sourced; shared with the linter’s key-argument gate (crate::linter::rules::in_key_argument), which uses it to keep identifier keys like\label{eq:thing_max}out of the math-shape rules’ scope. - ref_
command - The recognized reference command for a control-word name, or
None. A small explicit table — the analog ofproject::include::include_kind. Shared with the completion classifier (crate::completion) so the ref-family name set has a single source of truth.