[Emacs] Run bibtex when exporting org to latex

This commit is contained in:
Lucien Cartier-Tilet 2020-12-27 17:02:18 +01:00
parent 7692337dc0
commit 4ccab5440a
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA

View File

@ -2914,11 +2914,12 @@ By the way, reference links in LaTeX should be written in this format:
(setq org-export-latex-hyperref-format "\\ref{%s}") (setq org-export-latex-hyperref-format "\\ref{%s}")
#+END_SRC #+END_SRC
When it comes to the export itself, the latex file needs to be processed several times through XeLaTeX. When it comes to the export itself, the latex file needs to be processed several times through XeLaTeX in order to get some references right. Dont forget to also run bibtex!
#+NAME: org-latex-pdf-process #+NAME: org-latex-pdf-process
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(setq org-latex-pdf-process (setq org-latex-pdf-process
'("xelatex -8bit -shell-escape -interaction nonstopmode -output-directory %o %f" '("xelatex -8bit -shell-escape -interaction nonstopmode -output-directory %o %f"
"bibtex %b"
"xelatex -8bit -shell-escape -interaction nonstopmode -output-directory %o %f" "xelatex -8bit -shell-escape -interaction nonstopmode -output-directory %o %f"
"xelatex -8bit -shell-escape -interaction nonstopmode -output-directory %o %f")) "xelatex -8bit -shell-escape -interaction nonstopmode -output-directory %o %f"))
#+END_SRC #+END_SRC