2

I've seen this question: Loading bibtex file in org-mode file as well as this one: https://tex.stackexchange.com/questions/114864/how-to-get-bibtex-to-work-with-org-mode-latex-export

I've tried adding #+BIBLIOGRAPHY: sources plain to my Org document, this allowed org-reflex-cite to find the reference I'm citing, but the generated tex file has no mentions of bibliography. If I add LaTeX headers such as:

#+LATEX_HEADER: \bibliographystyle{plain}
#+LATEX_HEADER: \bibliography{sources}

They are copied as is into the document, but that has no effect.

Org mode always generates an empty bbl file.

I've tried all of these commands for generating tex / pdf files:

(setq org-latex-pdf-process
        ;; ("texi2dvi -p -b -V %f")
        '("texi2dvi --pdf --clean --verbose --batch %f"
          "bibtex %b" "texi2dvi --pdf --clean --verbose --batch %f"
          "texi2dvi --pdf --clean --verbose --batch %f")

        ;; '("latexmk -pdflatex='pdflatex -shell-escape -interaction nonstopmode' -pdf -bibtex -f %f"))

with the result being the same.

Below is the sources.bib I'm using:

                  @Preamble{"\def\germ{\frak} \def\scr{\cal}
 \ifx\documentclass\undefinedcs
      \def\bf{\fam\bffam\tenbf}\def\rm{\fam0\tenrm}\fi
                          % f**k-amstex!
 \def\defaultdefine#1#2{\expandafter\ifx\csname#1\endcsname\relax
 \expandafter\def\csname#1\endcsname{#2}\fi}
 \defaultdefine{Bbb}{\bf}   \defaultdefine{frak}{\bf}
  \defaultdefine{=}{\B}   % doublef**k-amstex!!
  \defaultdefine{mathfrak}{\frak}
       \defaultdefine{mathbb}{\bf}
       \defaultdefine{mathcal}{\cal}
      \defaultdefine{beth}{BETH}\defaultdefine{cal}{\bf}
     \def\bbfI{{\Bbb I}}   \def\mbox{\hbox}  \def\text{\hbox}
   \def\om{\omega}    \def\Cal#1{{\bf #1}} \def\pcf{pcf}
        \defaultdefine{cf}{cf}
    \defaultdefine{reals}{{\Bbb R}} \defaultdefine{real}{{\Bbb R}}
   \def\restriction{{|}}  \def\club{CLUB}
   \def\w{\omega} \def\exist{\exists}
   \def\se{{\germ se}}     \def\bb{{\bf b}}
   \def\equivalence{\equiv}
   \let\lt<  \let\gt>
           "}

@article{Secil,
author = {Mustafa Seçil, Obuz, Funda, Altay, Canan, Ömür Gencel, Igci, Enis, et al.},
title = {{The role of dynamic subtraction MRI in detection of hepatocellular carcinoma}},
journal = {Diagnostic and Interventional Radiology; Ankara},
volume = {14, Iss. 4}
pages = {200--204},
year = {Dec 2008},
}

I copied the preamble from an example here: http://shelah.logic.at/eindex.html (I don't really know how bibtex works, and was hoping to skip learning this part for now...)

  • I voted to close as unclear, as based on a comment by OP, the problem wasn't with Emacs at all, but rather a badly formatted bib file. – Tyler Mar 14 '18 at 19:25
0

Does it work with this command?. As far I as I remember you need to run texi2dvi 3 times. Besides as far as I know you need to put \bibliography{sources} in the body where you want the bibliography not in the preamble.

(setq org-latex-pdf-process (quote ("texi2dvi --pdf --build=local --verbose     --batch %f"
                    "bibtex %b"
                    "texi2dvi --pdf  --verbose --batch %f"
                    "texi2dvi --pdf  --verbose --batch %f")))

You can try running the generated tex file to see if it runs.

  • I also tried biblatex rather than bibtex, but the culprit wasn't either. The problem was that my sources.bib file had minor problem with its format: the commas in the authors, which I had to replace with and. This made bibtex generate empty sources.bbl... – wvxvw Jan 14 '18 at 11:54

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.