Skip to content

Latest commit

 

History

History
31 lines (21 loc) · 1.27 KB

README.md

File metadata and controls

31 lines (21 loc) · 1.27 KB

Pandoc Definition Reference Extension

This is a Pandoc filter that uses definition lists as sources for terms and a special syntax to link to those terms within the document body.

Put simply, if you have a term defined in your Markdown using the definition list syntax as follows:

term

:   The definition of the term goes here.

    Multiple paragraphs may be present, if the term requires an extended
    definition.

then you can reference the term in other parts of the document like this:

Here, we make use of the ::term:: to show how the first paragraph is displayed
as hover text and how the term is linked to its definition.

For a detailed example, see the following in the example directory:

  • example.md - A source file with multiple definitions and references to those definitions.
  • example.json - Intermediate Pandoc AST output for debugging purposes.
  • example.html - Rendered HTML.
  • pandoc-pre-defref.yaml - Pandoc response file for generating example.json.
  • pandoc.yaml - Pandoc response file for generating example.html.

You can view the rendered HTML here.