I am trying to setup a Knitr workflow in EMACS ESS.
I can get a pdf to compile using pdflatex and knitr-ess, but the bibliography is not generated.
I am using zotxt to insert citations from zotero, but I am not sure if that is relevant.
In my search to find a solution I found this https://tex.stackexchange.com/a/73779/287729 saying I should do the following:
- Run LaTeX
- Run BibTex
- Run LaTeX
- Run LaTeX
But when I try to compile the pdf with LaTeX (via Command -> LaTeX in EMACS) I get an error:
! I can't find file `myfile.rnw.tex'.
<*> myfile.Rnw.tex
(Press Enter to retry, or Control-Z to exit)
Please type another input file name
! Emergency stop.
<*> myfile.Rnw.tex
And the pdf is not compiled.
I tried the following:
- Run pdflatex
- Run Bibtex
but when I try to run pdflatex again it fails because of the error
Not re-weaving as input file ’myfile.rnw’ hasn’t changed
Not re-exporting as input file ’myfile-woven.tex’ hasn’t changed
Here is an MRE:
\documentclass{article}
\usepackage[backend=bibtex]{biblatex}
\bibliography{sample}
\title{ETemplate}
\author{Your name goes here}
\begin{document}
\maketitle
\section*{Abstract}
This is my abstract. It is not abstract.
@hilbornQuantitativeFisheriesStock1992
\printbibliography
\end{document}
I am open to other approaches as just want to get this functional.
Interestingly, I can get the following to compile with citations in Rstudio
\documentclass{article}
\usepackage[backend=bibtex]{biblatex}
\bibliography{sample.bib}
\begin{document}
<<setup, include=FALSE, cache=FALSE, echo=FALSE>>=
Sys.setenv(TEXINPUTS=getwd(),
BIBINPUTS=getwd(),
BSTINPUTS=getwd())
@
this doc
\parencite{nefsc62ndNortheastRegional2017}
\parencite{hilbornMeasuringFisheriesManagement2020}
\printbibliography
\end{document}
So clearly this is an EMACS issue.
rnwandwovenfiles, but your workflow only involvespdflatexandbibtex. I don't know knitr, but I'm confused. Is this how it's supposed to work? – Teepeemm Apr 13 '23 at 14:18