Expand description
patch_course_glossary_and_references: glossary terms and BibTeX references.
Renaming a citation key rewrites its \cite{β¦} citations in page content; other changes only
report the pages that use the term or key.
StructsΒ§
- Glossary
AndReferences - The document
get_course_glossary_and_referencesshows and its patch tool edits. - Glossary
Edit - The edited document, before its effects on the pages are worked out.
- Glossary
References Result - The new state after a successful call, and what it means for the pages.
- Glossary
Term - A glossary term; its editable fields are
TERM_FIELDS. - Reference
- A BibTeX reference; its editable fields are
REFERENCE_FIELDS. - Usage
- A document that uses a term or citation key the call removed or renamed.
EnumsΒ§
- Entry
Edit π - What a
removeorreplacedoes to one glossary term or reference. - Usage
Kind - Whether a
Usageis of a glossary term or a citation key.
ConstantsΒ§
- REFERENCE_
FIELDS π - Reference fields ops may set.
- TERM_
FIELDS π - Glossary term fields ops may set.
StaticsΒ§
- CITE π
- LATEX π
- The renderer hands
[latex]β¦[/latex]to KaTeX before it looks for citations, so a\citein there is no citation.
FunctionsΒ§
- apply
- Applies
opstodoc; GlossaryEdit::with_page_effects then works out what it does to pages. - apply_
op π - bibtex_
entry_ πkey - The key of the single entry in
bibtex, or a message saying why it doesnβt parse. Checks the shape@type{key, field = {β¦}, β¦}with balanced braces and exactly one entry. - citation_
keys π - The keys of the citations the renderer shows. Rich text stores keys HTML-escaped.
- edit_
entry π - Applies
edittoentries[position];setwrites one named field. - entry_
edit π - The edit
opmakes atfield(the path after the entryβs id) of an entry withfields. - page_
effects π - The pages whose citations
renamesrewrites, and the pages that use a reported key or term. - rewrite_
citations π - unknown_
entry_ πfield - A field an entry with
fieldsdoesnβt have. - uses_
term π - Whole-word and case-sensitive, as the renderer highlights glossary terms.
- validate π
- Checks the terms and references of
docthat differ frombefore: entries the call left alone may predate these rules, and mustnβt block unrelated edits.