5

I'm trying to write my thesis in org-mode, and so far it feels amazing. The integration with my todo system, the easy markup language, integration with latex. Wow.

But recently (since I upgraded to the latest latex version on my Arch system, and installed biber from the separate package) the export to pdf cannot find my references anymore.

If I export to .tex first and then run latexmk -f -pdf minimal.tex from the command line everything does work correctly. Here are the relevant settings in my init file:

(setq org-latex-pdf-process
      (list "latexmk -f -pdf %f"))

Because it uses so many files, I made a small git repo with all the files.

  • minimal.org is the source file. note that some of the lines start with # +, and are thus comments.
  • minimal.bib is a tiny bibliography file.
  • minimal.tex is the auto-generated .tex file.
  • fromlatexmk.pdf is the pdf file generated from the command line with the .tex file as input.
  • fromorgmode.pdf is the pdf generated from org's C-c C-e l p (or o), with the failed references.

I hope somebody can help me solve this mystery!

Japhir
  • 215
  • 1
  • 6
  • I would recommend `org-ref`. – Saddle Point Dec 29 '16 at 11:21
  • Shouldn't you add a -bibtex flag to latexmk? – John Kitchin Feb 28 '17 at 00:36
  • @JohnKitchin latexmk was working correctly, but the command from emacs wasn't. In the end I made a small shells cript that calls the correct latexmk command and also performs some sed commands for cleanup. – Japhir Mar 01 '17 at 12:04
  • That doesn't make sense to me. I have used this before and it worked fine. I need the shell-escape because of the minted package that is default for me. (setq org-latex-pdf-process (list "latexmk -shell-escape -bibtex -f -pdf %f")) – John Kitchin Apr 29 '17 at 12:16

1 Answers1

2

So a rather unsatisfying answer that works out, is to run the commands in from the command line to generate all the required auto files with latexmk. From then on the export commands from emacs work correctly.

Japhir
  • 215
  • 1
  • 6