Expand description
Associate .dtx documentation prose with the macro/environment it documents.
A .dtx brackets each documented entity with ltxdoc vocabulary — a macro or
environment environment, or a \DescribeMacro/\DescribeEnv command — while
the implementation lives in a (usually nested) macrocode block. The parser
represents documentation margins as DOC_MARGIN trivia rather than
DOC_COMMENT nodes, so the association is resolved in the semantic layer.
It mirrors outline: a single CST walk producing LSP-agnostic
DocAssociations (byte ranges, no lsp_types), unit-testable without the
language server. The ltxdoc set is static and standard, so — like the sectioning
commands and \label in outline — the constructs are
recognized by name rather than through a per-document signature scan.
The implementation a documented macro brackets is found structurally: the code
is the macrocode/macrocode* block(s) nested inside the documenting
environment, the conventional .dtx idiom. Descent stops at a nested macro/
environment so its macrocode is attributed to it, not the outer construct.
\DescribeMacro/\DescribeEnv carry no nested code (the definition lives
elsewhere).
Structs§
- DocAssociation
- One documented entity: the documenting construct, the name it documents, and any code it brackets.
Enums§
- DocKind
- Which ltxdoc construct introduced the association.
Functions§
- doc_
associations - Collect every documentation↔code association in
root, in document order.