public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
To: per.review-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org,
	pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: Pandoc doesn't define references in PDF output with --biblatex (or --natbib)
Date: Tue, 12 Jun 2018 09:01:59 -0700	[thread overview]
Message-ID: <yh480ktvq8ngco.fsf@johnmacfarlane.net> (raw)
In-Reply-To: <20180612145052.GA8444-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org>


Pandoc doesn't run bibtex/biber for you when producing
a PDF.  If you use pandoc-citeproc, you can get a nice
bibliography in PDF output (and maybe that's what you
were doing when it worked before), but if you want to use
native biblatex, you'll have to produce a .tex file
and run latex and biber yourself.

Note:  it's helpful to search closed issues before
submitting a report.  You would have found #4105,
#1193, #681, #2795, ...

But perhaps pandoc should issue a warning when you
use --natbib or --biblatex with output to a PDF file.

per.review-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org writes:

> I want to create a PDF file with a bibliography, e.g. `echo "See @test."
> | pandoc -o min.pdf --bibliography=min.bib --biblatex`
>
> With `min.bib`:
>
> ~~~
> @article{test,
>    author = "Tester, T.",
>    title = "Test",
>    journal = "Testing",
>    year = "2018",
> }
> ~~~
>
> With the `--verbose` option I can see that Pandoc generates a LaTeX
> document with
>
> ~~~
> \usepackage[]{biblatex}
> \addbibresource{min.bib}
>
> \date{}
>
> \begin{document}
>
> See \textcite{test}.
>
> \printbibliography
>
> \end{document}
> ~~~
>
> It runs makePDF three times, and every time it says (some empty lines
> removed):
>
> ~~~
> No file input.bbl.
>
> LaTeX Warning: Citation 'test' on page 1 undefined on input line 61.
>
> LaTeX Warning: Empty bibliography on input line 63.
>
> [1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]
> (./tex2pdf.4369/input.aux)
>
> LaTeX Warning: There were undefined references.
>
> Package biblatex Warning: Please (re)run Biber on the file:
> (biblatex)                input
> (biblatex)                and rerun LaTeX afterwards.
> ~~~
>
> Unsurprisingly, the citation remains undefined. Biber doesn't run. The
> same happens when I run Pandoc with `--natbib` instead of `--biblatex`,
> or with `--pdf-engine=xelatex`. (With pandoc-citeproc it works, since
> the bibliography is already generated in the .tex code makePDF starts
> out with.)
>
> What is going on?
>
> Having pandoc output a .tex file instead of a PDF document, then running
> xelatex, biber and xelatex works as expected. (This is not an option for
> my more complicated real-world example, which also depends on pandoc to
> convert figures for the PDF output and on pandoc-crossref, among other
> things.)
>
> I'm pretty sure this wasn't a problem until recently, but I don't know
> when it arose. I'm using the TeX Live distribution with Linux, but the
> problem is identical with MiKTeX in Windows.
>
> ~~~
> $ pandoc -v
> pandoc 2.2.1
> Compiled with pandoc-types 1.17.4.2, texmath 0.10.1.1, skylighting 0.6
> $ biber -v
> biber version: 2.11
> ~~~
>
> If this warrants a bug report on Github, feel free to make it into one.
> I can't get rid of my suspicion that it's simply a basic human error on
> my side.
>
> -- 
> Per
>
> -- 
> 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 pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/20180612145052.GA8444%40mailbox.org.
> For more options, visit https://groups.google.com/d/optout.


  parent reply	other threads:[~2018-06-12 16:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-12 14:50 per.review-cl+VPiYnx/1AfugRpC6u6w
     [not found] ` <20180612145052.GA8444-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org>
2018-06-12 16:01   ` John MacFarlane [this message]
     [not found]     ` <yh480ktvq8ngco.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2018-06-12 16:05       ` John MacFarlane
2018-06-12 21:46       ` per.review-cl+VPiYnx/1AfugRpC6u6w
     [not found]         ` <20180612214644.GB8444-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org>
2018-06-13 17:28           ` John MacFarlane
     [not found]             ` <m2fu1qzjdf.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2018-06-14  9:24               ` 'Nick Bart' via pandoc-discuss

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yh480ktvq8ngco.fsf@johnmacfarlane.net \
    --to=jgm-tvlzxgkolnx2fbvcvol8/a@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    --cc=per.review-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).