biblatex-archaeology in its environment Ⅳ: Pandoc

Pandoc is a command line tool for converting from one markup to another. It uses a largely enhanced markdown syntax as intermediate format. This allows for adding input and output filters for only one format instead of writing them for every possible conversion anew. In case you don’t know what markdown is: It was invented for writing HTML quickly by using markup which was common in plain *.txt files. Markdown variants are used fi. by the Wikipedia editor or GitHub README files.. An universal markup converter needs much more elements than is necessary for HTML (eg. footnotes, citations, math etc.). But of course, this approach has its limits. Pandoc supports a lot of elements common in various formats, but cannot provide all special cases which were ever implented in one of its filter formats. Remark that Pandoc my be inside other markdown formats. R markdown is in fact Pandoc markdown, as RStudio is shipped with Pandoc.

In version 2.12 I have used for this post, Pandoc returns the following input formats

$ pandoc --list-input-formats
biblatex
bibtex
commonmark
commonmark_x
creole
csljson
csv
docbook
docx
dokuwiki
epub
fb2
gfm
haddock
html
ipynb
jats
jira
json
latex
man
markdown
markdown_github
markdown_mmd
markdown_phpextra
markdown_strict
mediawiki
muse
native
odt
opml
org
rst
t2t
textile
tikiwiki
twiki
vimwiki

and the following output formats:

$ pandoc --list-output-formats
asciidoc
asciidoctor
beamer
biblatex
bibtex
commonmark
commonmark_x
context
csljson
docbook
docbook4
docbook5
docx
dokuwiki
dzslides
epub
epub2
epub3
fb2
gfm
haddock
html
html4
html5
icml
ipynb
jats
jats_archiving
jats_articleauthoring
jats_publishing
jira
json
latex
man
markdown
markdown_github
markdown_mmd
markdown_phpextra
markdown_strict
mediawiki
ms
muse
native
odt
opendocument
opml
org
pdf
plain
pptx
revealjs
rst
rtf
s5
slideous
slidy
tei
texinfo
textile
xwiki
zimwiki

As you can see,, both BibTeΧ and biblatex are available as input and output format. It is not possible to convert to any format and it doesn’t change field names between BibTeΧ and biblatex. If this is your use case, you are better off with Biber’s tool mode. The markdown format produces a file in YAML format which is Pandocs way to store document metadata. This can be used as external bibliography database. In principle, this has nothing to do with writing LaTeΧ files. The same holds for CSL JSON. You can only convert between these.

There are two ways to add bibliographic data to a document: as document metadata or as external bibliography. I will restrict myself to the latter. If you want to get a LaTeΧ file with biblatex commands, there is a --biblatex option. It will not work with other output formats (even not with PDF, although Pandoc runs LaTeΧ for it!). For other document formats there are the options --csl, --citeproc and --bibliography. The first one eats a CSL (Citation Style Language) file, the middle one a file were the refernces are processed and the latter a database in one of the aforementioned formats. CSL files are easy to obtain. There is big repository on Zotero and they are shipped with Citavi.

The issues with Pandoc very much resemble those with LyΧ. The Pandoc referencing system provides common bibliographic facilities but not fine granulated possibilities of a special purpose package like biblatex-archaeology. Although I like it very much, I don’t think it is made for huge publication projects. Besides the limited bibliography features remark that there is no semantic markup in Pandoc markdown.

biblatex-archaeology in its environment Ⅳ: Pandoc 1

Ingram Braun

Archaeologist, web developer, proofreader

Leave a Reply

Your email address will not be published. Required fields are marked *

Post comment