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