.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "PANDOC-CITEPROC-PREAMBLE.1 1" .TH PANDOC-CITEPROC-PREAMBLE.1 1 2024-03-21 "perl v5.38.2" "User Commands" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME pandoc\-citeproc\-preamble \- insert a preamble before Pandoc's bibliography .SH SYNOPSIS .IX Header "SYNOPSIS" \&\fBpandoc-citeproc-preamble\fR .SH DESCRIPTION .IX Header "DESCRIPTION" \&\fBpandoc-citeproc-preamble\fR is a JSON filter for \fBpandoc\fR\|(1) which inserts a preamble before the output that Pandoc's citeproc filter appends to the document. This preamble might include a heading (e.g. "Bibliography") and/or raw markup to format the bibliography for the output format. .SH USAGE .IX Header "USAGE" Add \fB\-\-filter pandoc-citeproc-preamble\fR somewhere after \fB\-\-citeproc\fR, e.g. .Sp .Vb 3 \& % pandoc \-s \-\-citeproc \-\-bibliography=~/doc/mine.bib \e \& \-\-filter pandoc\-citeproc\-preamble \e \& ~/doc/my_essay.mdwn \-o ~/my_essay.pdf .Ve .SH FILES .IX Header "FILES" .IP ~/.pandoc/citeproc\-preamble/default.\fIFORMAT\fR 4 .IX Item "~/.pandoc/citeproc-preamble/default.FORMAT" Default citeproc preamble for Pandoc output format \fIFORMAT\fR (e.g. "latex"). .PP To override this, you can set document metadata like this: .Sp .Vb 2 \& % pandoc ... \-\-filter pandoc\-citeproc\-preamble \e \& \-M citeproc\-preamble=~/mypreamble.tex ... .Ve .SH RATIONALE .IX Header "RATIONALE" One motivation for authoring with Pandoc is that one's input files are agnostic with regard to the output format to which they will eventually be compiled. For example, it should not be necessary to include LaTeX code in one's input file in order to format the bibliography. The input file might also be compiled to HTML. .PP However, when compiling to PDF, formatting code is usually required in order to have the entries of Pandoc's bibliography line up with each other; by default, all entries except the first will be indented. Another common customisation is to set up a hanging indent for bibliography entries. .PP Since Pandoc's citeproc filter doesn't provide any facility to add formatting control code to its output, \fBpandoc-citeproc-preamble\fR is necessary to avoid the user being forced to add their control code to the end of their input files, thereby losing the input file's agnosticity with regard to output format. .SH AUTHOR .IX Header "AUTHOR" Sean Whitton .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBpandoc\fR\|(1)