AtlatestRepositorysigil-doc
1
# Semantic glossaries3
Define a term in the lesson where its meaning is introduced:5
```sigil-doc6
@term["binding" id: "binding" aliases: '("bindings")]7
@p {8
An entry in an @term-ref["environment"]{environment} that links a symbol9
to a location.10
}11
@end term13
@p {14
A @term-ref["binding"]{binding} gives a name to that location.15
}16
```18
`@term` is declarative and does not render at its declaration site. `@term-ref`19
renders its label and resolves to the publication's generated glossary entry.20
Definitions and references may occur in any order across publication documents.22
One document supplies the publication-wide insertion point:24
```sigil-doc25
#lang sigil/doc26
@chapter["Glossary of Terms"]28
@(glossary)30
@end chapter31
```33
Publication assembly requires exactly one glossary marker whenever terms exist. It34
rejects duplicate term IDs, missing term definitions, target collisions, and multiple35
glossary insertion points before a renderer writes output. HTML and print backends36
sort entries case-insensitively and emit only populated letter groups. Definitions37
remain close to their teaching context while the reader sees a conventional glossary.