0

I have a simple file looking like this,

#+TITLE: Title Here
#+AUTHOR: Author Name


Citation here [[cite:key_name]]

#+BIBLIOGRAPHY: refs plain

In the same directory I have refs.bib,

@MISC {key_name,
    TITLE = {Informal derivation (and interpretation) of Substitution Rule from Chain Rule?},
    AUTHOR = {user1180576 (https://math.stackexchange.com/users/629687/user1180576)},
    HOWPUBLISHED = {Mathematics Stack Exchange},
    NOTE = {URL:https://math.stackexchange.com/q/3354744 (version: 2019-09-13)},
    EPRINT = {https://math.stackexchange.com/q/3354744},
    URL = {https://math.stackexchange.com/q/3354744}
}

Now when I run org-latex-export-to-pdf, I don't get the references and looking at the Tex file produced,

% Created 2020-06-23 Tue 02:55
% Intended LaTeX compiler: xelatex
\documentclass[11pt]{article}
[snip]
\begin{document}

\maketitle
Citation here \cite{key_name}
\end{document}

The \bibliographystyle{plain} and \bibliography{refs} are missing. What am I doing wrong?

If I put \bibliographystyle{plain} and \bibliography{refs} in my org file than everything works fine.

Edit: Following are my org-ref configurations,

;; org-ref
(use-package org-ref
  :ensure t
  :custom
  (org-ref-completion-library 'org-ref-ivy-cite))

And my org-latex-pdf-process is indeed set to (list "latexmk -xelatex -shell-escape -bibtex -f -pdf %f").

  • Just to clarify: you are using John Kitchin's org-ref package, correct? And two comments: 1) I'm not sure that underscores can be used in keys and 2) you need to modify your org-latex-pdf-process to invoke bibtex. See the link for more details – NickD Jun 23 at 16:14
  • If you are not using org-ref, you probably need to (require 'ox-bibtex). – NickD Jun 23 at 17:02
  • I am using org-ref. Though, I thought it's invocation was optional (when the bibliography style and file links are defined). I did not install ox-bibtex, does it not come by default like ox-latex/html? I will edit my question with my org-ref configs. – scribe Jun 23 at 20:59
  • 1
    I may be completely wrong (I know next to nothing about org-ref), but I don't think org-ref uses #+BIBLIOGRAPHY: at all. It's only ox-bibtex that uses it I think. See org Emacs Lisp Package Archive for the org-plus-contrib package or get ox-bibtex.el from the Org mode git repo. – NickD Jun 24 at 2:38
  • Yeah my issue actually was not having the org-plus-contrib. I was assuming that ox-bibtex.el comes with the default emacs' org. – scribe Jun 24 at 2:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.