Trying to get biber to run when generating PDF

Skip to first unread message

Lyndon Drake

Apr 20, 2020, 4:36:08 AM4/20/20
to pandoc-discuss

Last one for the day (I hope): if I generate a LaTeX file and run latexmk on it, I get my citations fine, but if I try to get pandoc to generate the PDF the citations don't come through. I.e. this works:

/usr/local/bin/pandoc -dlatex -s -o output/README.tex
cd output/
latexmk -lualatex README.tex

but this doesn't - the PDF is generated with the citations unmatched:

/usr/local/bin/pandoc -dlatex -s -o output/README.pdf

I'm using the following defaults file in both cases:

  author: Lyndon Drake
  papersize: a4
  documentclass: article
  mainfont: Times New Roman
  lang: en-GB
  mainfontoptions: Ligatures=TeX, Numbers=OldStyle
  otherlangs: [grc, he]
    - /Users/lyndon/repo/workflow/zot-export.bib
  biblio-style: sbl
    - backend=biber
    - indexing=cite
  indent: true

cite-method: biblatex

pdf-engine: lualatex

number-sections: true

Lukas Atkinson

Apr 20, 2020, 7:33:52 AM4/20/20
This seems about right. Either use Pandoc's built-in citation system, or generate LaTeX and compile it yourself. Pandoc is no substitute for latexmk. Latexmk knows how and when to run additional required programs such as Biber or Makeindex.

I tend to write makefiles that manage the necessary Pandoc/Latexmk calls for me, e.g.:

  %.tex :
    pandoc -st latex $< -o $@

  %.pdf : %.tex
    mkdir -p build
    latexmk -pdf -outdir build -interaction=batchmode $*
    cp build/$*.pdf .

Then, a call like `make paper.pdf` will do the necessary steps, assuming exists.

You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

John MacFarlane

Apr 20, 2020, 12:27:19 PM4/20/20
to Lyndon Drake, pandoc-discuss

You can use latexmk as your pdf-engine. You'll need to pass in
--pdf-engine-opts to tell latexmk to use lualatex and biber.

John MacFarlane

Apr 20, 2020, 12:28:09 PM4/20/20
to Lyndon Drake, pandoc-discuss

To clarify, pandoc doesn't attempt to run bibtex or biber itself.
But if you use latexmk as your pdf-engine, latexmk can do this.

Lyndon Drake

Apr 20, 2020, 1:41:21 PM4/20/20
to pandoc-discuss
Ah, OK, that makes perfect sense now that I think about it. I'll give it a go with latexmk as the pdf-engine.
Reply all
Reply to author
0 new messages