Giter Site home page Giter Site logo

Comments (4)

pdehne avatar pdehne commented on June 13, 2024 1

Just like you suggested, this works perfectly:

pandoc example.md -s --natbib --pdf-engine=latexmk -o example.pdf

There is a strange error message from latexmk, but it can be ignored. The PDF is rendered correctly, including citations.

Latexmk: Missing bbl file '/tmp/tex2pdf.-d487ff2e850c87fc/input.bbl' in following:
 No file input.bbl.

from pandoc.

jgm avatar jgm commented on June 13, 2024

Yes. Because when you go straight to pdf with --natbib, pandoc doesn't run bibtex for you.
If you use --natbib, you need to go to standalone latex and run the latex and bibtex commands yourself.

As the manual says:

--natbib
Use natbib for citations in LaTeX output. This option is not for use with the --citeproc option or with PDF output. It is intended for use in producing a LaTeX file that can be processed with bibtex.

from pandoc.

pdehne avatar pdehne commented on June 13, 2024

I see, I overlooked that it explicetely says natbib is not for PDF, sorry about that. Just as an idea, if the system already provides the latexmk command, using it would make it possible to render directly to PDF.

from pandoc.

jgm avatar jgm commented on June 13, 2024

Yes, you can use --pdf-engine=latexmk, and then it might take care of the bibtex step for you. (You might need some additional --pdf-engine-opt)

from pandoc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.