Empty bibliography in pdf using biblio module

What happened?

I want to write texts with citations in org mode. I followed these instructions and went through a bunch of posts here, on reddit and on stackoverflow.

When I export to HTML (spc m e h o), everything works. However, when I export to pdf (spc m e l) there is no bibliography, and all citations are unknown.

What did you expect to happen?

Exporting to pdf should include the bibliography and know the citations.

Steps to reproduce

  1. Install vanilla doom, and enable the ‘biblio’ module.
  2. Set citar paths in config.el:
(after! citar
    (setq! citar-bibliography '("~Notes/references.bib"))
    (setq! citar-library-paths '("~/Notes/library/files"))
    (setq! citar-notes-paths '("~/Notes/references/notes")))

  1. Create file references.bib with a reference in it:
@book{de2012bestrijdingsmiddelen,
  title={Bestrijdingsmiddelen en waterkwaliteit},
  author={de Snoo, Geert R and Vijver, Martha Gerdina},
  year={2012},
  institution={Universiteit Leiden, Centrum voor Milieuwetenschappen (CML)}
}
  1. create minimal org file, inserting the citation with M-x org-cite-insert (this works)
#+title: Test
#+bibliography: references.bib

Test [cite:@de2012bestrijdingsmiddelen]

#+print_bibliography:
  1. export to pdf with spc m e l o

  2. output looks like this

System information


Loading data dump...

Doing some more digging, especially helpful was this post. I have the same issue: if export to tex, and then run the exact value of org-latex-pdf-process, ("latexmk -f -pdf -%latex -interaction=nonstopmode -output-directory=%o test.tex") in the command line, the compilation works.

However, it seems that biber somehow does not run from the emacs export dispatcher.

Alright. I figured it out. Hopefully this will help someone in the future.

Specifically in macOS, just like in the stackoverflow post I linked to before, the emacs shell does not properly inherit the PATH. In my situation, this meant that biber was not in path, but latexmk was. latexmk just builds the pdf anyway, with no viewable error message anywhere except ‘empty bibliography’ or ‘unknown citation’. My solution:

Set org-latex-pdf-process to "export PATH=\"/Library/TeX/texbin/:$PATH\"; latexmk -f -pdf -%latex -interaction=nonstopmode -output-directory=%o %f"

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.