How the bibliography is made
References are stored in a bibtex file. The XML file contains citations that are similar to a LaTeX citation command.
During processing, the bibtex file and the bibliography and citation type (anthology or monograph, numeric or author/year) are read out of the XML source file.
pandoc-citeproc
is used to construct a JSON file out of the bibtex
database. This is helpful during the next parts of processing.
The next step formats the bibliography, depending on the bibliography
type, as a complete list or as per-chapter-list. In the second case,
several markdown and html files are created, one for each chapter.
They are named after the xml:id
of the chapter.
The function format_citations
then creates two outputs: the list of
references, formatted in html and a dictionary with the citekey as
headword and three manifestations of the data (author-year-citation,
year-citation and title).