Skip to content

manni term

Define your terms once, check every reference to them, and carry the set into Vale and translation.

When two pages call one thing by different names, readers think there are two things. Search splits the results, and translators translate both. manni term keeps one record per term and checks every page that names one.

A term is a record with an identity. It has one preferred label, a definition, the other names it goes by, and its place among other terms. Pages point at it by label through concepts:, and manni term checks that every one of those labels names an entry.

A term reaches manni in one of two shapes.

  • A page per term. The record is the page’s metadata, and the page declares type: term. That works in every format manni meta reads.
  • A file of many. The entries live in the body, in the construct the format has for a list of terms. A DITA <glossgroup>, a DocBook <glossary>, an AsciiDoc [glossary] list and a .. glossary:: directive say what they are. A Markdown definition list and an HTML <dl> are read where the file declares type: term-set. A TBX termbase, v2 or v3, holds an entry per concept, and each language in it is a term. So does a SKOS concept scheme in Turtle or JSON-LD, read when you name it. A MadCap Flare glossary, a .flglo file, holds an entry per term.

Term entries are written in the built-in manni:terminology:1.2.0 vocabulary. manni meta validate checks one page’s shape against it when the page’s schema set includes it, as -s manni:terminology:1.2.0 does. manni term check checks the set.

Under its terms source, manni graph builds the termbase into its concept scheme, and a page’s concepts: resolve through it. Vale reads the style manni term write -f vale generates, and holds the body of every page to the same names. manni check runs term check once a collection holds a term.

CommandDoes
manni term list [paths...]Lists every entry the set resolves to, with its id, label and alt-labels.
manni term get <term> [paths...]Shows one entry and the line it was read from.
manni term check [paths...]Checks the set and every concepts: reference into it, against twenty-two rules.
manni term lint [paths...]Runs Vale over each definition, abstract and scope note.
manni term write [paths...]Writes the set back in place, or renders it as pages, a glossary file, TBX, SKOS, CSV, JSON or a Vale style.
manni term formatsLists the constructs read and written, per format.

You don’t need to install anything. Two term pages define corrective lens and progressive lens, and PAL is an alt-label of the second. A guide names four concepts:

docs/guides/fitting.md
---
title: Fitting lenses
concepts: [PAL, trifocal, corrective lens, progressive lens]
---
Terminal window
npx @hawkeyexl/manni term check
docs/guides/fitting.md:3
warning manni:term/alt-label-reference concepts: "PAL" is an alt-label of "progressive lens", so name the label.
manni:term alt-label-reference: A page's concepts: names an entry by one of its alt-labels.
Guide: https://hawkeyexl.github.io/manni/term/reference/rules/#alt-label-reference
error manni:term/undefined-term concepts: "trifocal" names no entry.
Correct the value, or run manni term fill to add the term.
manni:term undefined-term: A page's concepts: names no entry, by label, id or alt-label.
Guide: https://hawkeyexl.github.io/manni/term/reference/rules/#undefined-term
1 error, 1 warning in 2 terms

The exit code is 1, from the error. No entry claims trifocal. PAL is a name the set knows, and the warning says which entry claims it, so the fix is the label. Drop trifocal, and PAL, which the guide already names by its label, and the check passes:

✓ 2 terms, 2 references, no findings

The reference shelf holds the detail. The CLI reference covers every flag and every usage error. The configuration reference covers the term: keys. The terminology reference covers the fields, and the rules reference covers the twenty-two checks.

What manni term checks, and what it doesn’t

Section titled “What manni term checks, and what it doesn’t”

It checks

That every concepts: value names an entry by its label. That ids and labels are unique within a language, ignoring case. That broader, narrower, related-terms and see resolve. That the hierarchy has no cycle, counting each page’s graph: block, and that a block’s hierarchy is on its term. With Vale, it checks the prose of each definition against your house voice.

It doesn't

Check how the body of a page uses a term. That is what the Vale style write -f vale generates is for, run by Vale over the docs. Only fill --crawl reads a body, to propose terms. It doesn’t judge whether a definition is correct, either.