dangom / org-thesis

Writing a Ph.D. thesis with Org Mode
498 stars 54 forks source link

empty bibliography #11

Closed friedgreenrepos closed 1 year ago

friedgreenrepos commented 1 year ago

i'm having some problems making the bibliography show up in the export pdf. i've never managed my bibliography in emacs before so i'm not sure what i'm doing wrong. i'm using the exact setup file and thesis.org template from the repository. i have thesis.bib in the same directory as thesis.org and it's included like in the example:

#+latex_header: \bibliography{./thesis}

I've also tried

#+latex_header: \bibliography{./thesis.bib}

with the same results. additionally i have changed my emacs configuration file to include:

-  ox-latex configuration

(use-package ox-latex :after ox :demand t :init (setq org-latex-pdf-process '("latexmk -pdflatex='pdflatex -shell-escape -interaction nonstopmode' -pdf -bibtex -f %f")) :config ;; syntax highlighting in exported pdf with minted (setq org-latex-listings 'minted) (add-to-list 'org-latex-packages-alist '("" "minted"))

;; Mimosis is a class I used to write my Ph.D. thesis. (add-to-list 'org-latex-classes '("mimosis" "\documentclass{mimosis} [NO-DEFAULT-PACKAGES] [PACKAGES] [EXTRA] \newcommand{\mboxparagraph}[1]{\paragraph{#1}\mbox{}\\} \newcommand{\mboxsubparagraph}[1]{\subparagraph{#1}\mbox{}\\}" ("\chapter{%s}" . "\chapter{%s}") ("\section{%s}" . "\section{%s}") ("\subsection{%s}" . "\subsection{%s}") ("\subsubsection{%s}" . "\subsubsection{%s}") ("\mboxparagraph{%s}" . "\mboxparagraph{%s}") ("\mboxsubparagraph{%s}" . "\mboxsubparagraph{%s}")))

(setq org-latex-prefer-user-labels t))


In my Org PDF Latex Ouput buffer i get:

> LaTeX Warning: Empty bibliography on input line 153.

and 

> Latexmk: Missing bbl file 'thesis.bbl' in following:
 No file thesis.bbl.
Latexmk: Getting log file 'thesis.log'
Latexmk: Examining 'thesis.fls'
Latexmk: Examining 'thesis.log'
Latexmk: Log file says output to 'thesis.pdf'
Latexmk: All targets (thesis.pdf) are up-to-date
Collected error summary (may duplicate other messages):
  biber thesis: Could not open biber log file for 'thesis'
dangom commented 1 year ago

Does org ref find your references, i.e., can you click on the links and open the pdfs, etc? Have you tried using absolute filenames just as an extra sanity check? Do you have the \printbibliography statement somewhere? How are you exporting your pdf?

friedgreenrepos commented 1 year ago

thanks for the fast reply. i've tweaked the org-ref configuration a bit because i realized the package wasn't working properly, so that was part of the problem. I also had to use #+latex_header: \addbibresource{./thesis.bib} instead of #+latex_header: \bibliography{./thesis.bib}.

friedgreenrepos commented 1 year ago

quick question: is it normal that only cited references are shown in the bibliography? if i don't cite (C-c ]) anything i don't see any entries in the bibliography...

dangom commented 1 year ago

yes only cited entries will show up