[Tex/LaTex] Error with the pandoc beamer template when using bibliography

pandoc

If this minimal working example saved in test.md file:

# Part one

## Section One 

### Frame one 

- Items...  [@Publication2001]

is compiled with this literature.bib file:

@article{Publication2001,
  title={Blah},
  author={Blah, B},  
  journal={Numerical Heat Transfer, Part B: Fundamentals},
  volume={66},
  number={6},
  pages={526--543},
  year={2001},
  publisher={Taylor \& Francis}
}

first to .tex with

pandoc \
    -s \
    -t beamer \
    --natbib \
    --bibliography=literature.bib \
    test.md \
    -o test.tex

and then to PDF with the commands:

pdflatex test.tex
bibtex test
pdflatex test.tex

the following error occurs:

Package natbib Warning: Citation `Publication2001' on page 3 undefined on input
 line 70.

[3] (./test.bbl
! Missing \endgroup inserted.
<inserted text> 
                \endgroup 
l.1 \begin{thebibliography}{1}

? 

Software versions:

pandoc 1.15.0.6
Compiled with texmath 0.8.2.2, highlighting-kate 0.6.


pdflatex --version 
pdfTeX 3.14159265-2.6-1.40.16 (TeX Live 2015/Arch Linux)
kpathsea version 6.2.1
Compiled with libpng 1.6.18; using libpng 1.6.18
Compiled with zlib 1.2.8; using zlib 1.2.8
Compiled with poppler version 0.36.0

Pandoc templates: I am using the current master branch of the pandoc template repository for the pandoc templates.

What is happening here?

Best Answer

Looks like a bug to me (I get the same error with the pandoc 1.15.1 on Ubuntu 14.04) , because you can resolve the citation with

pandoc -s -s -t beamer --bibliography=foo.bib --filter pandoc-citeproc foo.md -o foo.pdf

In order to render your citations correctly, I would search the Zotero Style Repo and add --csl=foo.csl (put it into the working directory) to the above command. BTW, pandoc will directly render the beamer slides in PDF.

Related Question