pandoc / lua-filters

A collection of lua filters for pandoc
MIT License
611 stars 166 forks source link

Bib-place: control the placement of a citeproc bibliography in a Pandoc template #163

Open jdutant opened 3 years ago

jdutant commented 3 years ago

Useful to place something between the end of text and the bibliography when using citeproc. The filter places any citeproc generated bibliography Div (and its immediately preceding Header, if any) in a metadata variable calledreferencesblock, that can then be printed anywhere in a custom template. Since the entire Div is passed on, any formating pandoc/citeproc applies to it for various outputs is preserved.

The filter does not affect biblatex / natbib outputs, so it can be used with a custom template that caters for all bibliography engines.

jdutant commented 3 years ago

In the first version only the Div with identifierrefs was captured. But this may be preceded by a header. In the new version (d7b74340d9bf6c2a09d5ae1c693dd5f81509069e) the filter captures both the references and whatever heading immediately precedes them.