I use org-mode to write journal papers, cite with org-ref, and export to latex. I used to specify individual bibliography in every org document in the bibliography: section, then use C-c C-e l o to export to latex pdf, and it worked all fine.
Now I want to use a default bibliography that is not specified in the bibliography:". But when I export the file, there is not inline citation or reference list in the pdf.
Specifically, this is how I configured in the init.el file (almost the same as in the manual...):
(setq org-latex-pdf-process
'("pdflatex -interaction nonstopmode -output-directory %o %f"
"bibtex %b"
"pdflatex -interaction nonstopmode -output-directory %o %f"
"pdflatex -interaction nonstopmode -output-directory %o %f"))
;; ;; set default library
(setq reftex-default-bibliography '("~/Dropbox/bibliography/papers3.bib")
org-ref-default-bibliography '("~/Dropbox/EntResearch/bibliography/papers3.bib"))
I did use the code from https://stackoverflow.com/questions/2266905/emacs-is-ignoring-my-path-when-it-runs-a-compile-command/2566945#2566945 to solve the issue when the error about not finding pdflatex was thrown out. I'm not sure if it has anything to do with my current issue.
(defun set-exec-path-from-shell-PATH ()
(let ((path-from-shell
(replace-regexp-in-string "[[:space:]\n]*$" ""
(shell-command-to-string "$SHELL -l -c 'echo $PATH'"))))
(setenv "PATH" path-from-shell)
(setq exec-path (split-string path-from-shell path-separator))))
(when (equal system-type 'darwin) (set-exec-path-from-shell-PATH))
In my document body, there is no "bibliography:" line, but the bibliographystyle is specified and works fine. In fact, if I use C-c ], I can locate and cite any reference in the default bibliography file. The problem is that they all disappear when exported to pdf. So is it always required to indicate the path of default bibliography in the text, or is there something I missed?