A glossary is collection of explanations for words the reader might not be familiar with.

mdtools expects the glossary in a YAML-file, and can do a few tricks with it:

  • insert glossary explanations or definitions into the text using {{glossary:glossary-term}} or {{define:glossary-term}}
  • render a full glossary using {{insert-full-glossary}}
  • add an explanation for a glossary term as an overlay (in html output) using [glossary](glossary:glossary)

Glossary Format:

terms:
  my-term:
    name: My Term
    definition: what you want to display in the definition of the term
    glossary: what you want to put into the glossary

Glossary Item Style (ebook only)

The ebook writer allows for replacing of glossary links with footnotes, plain text, LaTeX underline or custom formats

Simply add the commandline option --glossary-style for rendering glossary links:

  • --glossary-style=plain (default) removes the glossary link by replacing it with the link title
  • --glossary-style=footnotes renders them as footnote references (and appends a list of footnotes into tmp-appendix.md)
  • --glossary-style=underline replaces links with LaTeX markup for underline

Glossary Item Style (ebook only)

Variables in the template are:

  • title: the title of the link in the text
  • term: the glossary term (identifier in the glossary yaml file)
  • name: the name of the glossary term in the yaml file)
  • description: the description of the glossary term