PANDOC-CITEPROC-PREAMBLE.1(1)
π PANDOC-CITEPROC-PREAMBLE π
ok so bestie, welcome to pandoc-citeproc-preamble β that's the name of this little User Commands cutie, and honestly it's about to make your bibliographies look absolutely iconic. β¨
πΈ NAME πΈ
pandoc-citeproc-preamble β slides a preamble in right before Pandoc's bibliography, no cap ππ
π¦ SYNOPSIS π¦
pandoc-citeproc-preamble
(yeah that's literally it, she's a filter, she doesn't need a whole argument era)
β¨ DESCRIPTION β¨
okay so here's the tea: pandoc-citeproc-preamble is a JSON filter for pandoc(1), and what she does is insert a preamble before the output that Pandoc's citeproc filter appends to the document. π«Ά
and what even goes in that preamble? literally whatever you want β it might include a heading (like, say, "Bibliography"), and/or raw markup to format the bibliography for whatever output format you're on. slay. π
π USAGE π
the way you use it: drop --filter pandoc-citeproc-preamble somewhere after --citeproc. like this, bestie:
% pandoc -s --citeproc --bibliography=~/doc/mine.bib \
--filter pandoc-citeproc-preamble \
~/doc/my_essay.mdwn -o ~/my_essay.pdf
see how --filter pandoc-citeproc-preamble comes after --citeproc? that's the move. order matters here, iykyk. π
π FILES π
~/.pandoc/citeproc-preamble/default.FORMATβ the default citeproc preamble for Pandoc output format FORMAT (think stuff like"latex", you know the vibe). π
and if you wanna override that? no problem babe, you just set some document metadata like this:
% pandoc ... --filter pandoc-citeproc-preamble \
-M citeproc-preamble=~/mypreamble.tex ...
boom. custom preamble. main character energy. π
π RATIONALE π
okay let me explain why this exists because it's genuinely so real of this tool.
one motivation for authoring with Pandoc is that your input files are agnostic with regard to the output format they'll eventually be compiled to. like... you should NOT have to cram LaTeX code into your input file just to format the bibliography. that's so not the point. π your input file might get compiled to HTML too, and she shouldn't be forced to pick a side.
BUT β and this is the plot twist β when you're compiling to PDF, formatting code is usually required so the entries of Pandoc's bibliography actually line up with each other. by default, all entries except the first will be indented. (not cute.) another super common customisation is setting up a hanging indent for bibliography entries.
and here's the problem: Pandoc's citeproc filter doesn't provide any facility to add formatting control code to its output. none. zero. π
so pandoc-citeproc-preamble is necessary so that you're not forced to dump your control code at the end of your input files β which would make you lose the input file's agnosticity with regard to output format. and we are NOT losing that. periodt. π₯
π AUTHOR π
Sean Whitton <spwhitton@spwhitton.name> β the legend herself π«
π§ SEE ALSO π§
and that's the whole page, bestie!! go forth and make bibliographies pretty π¦πΈπ
ta-ta for now β this was PANDOC-CITEPROC-PREAMBLE.1, built with perl v5.40.1, dated 2025-10-01. mwah π
π¦ where this page comes from
- ubuntu resolute: pandoc-citeproc-preamble 1.7-3 Β· GPL-3.0-or-later
- ubuntu stonking: pandoc-citeproc-preamble 1.7-3 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms