SublimeText / LaTeXTools

LaTeX plugin for Sublime Text
https://latextools.readthedocs.io/
2.01k stars 364 forks source link

builder not working with revtex4-1 citations #501

Open underchemist opened 9 years ago

underchemist commented 9 years ago

I am having issues compiling a file using revtex4-1 class with citations. I am using the traditional builder and have the tex installation path pointing to /usr/local/texlive/2014/. Here is my minimal working example:

\begin{filecontents}{\jobname.bib}
@article{Straney2013,
author = {Straney, Patrick J and Andolina, Christopher M and Millstone, Jill E},
doi = {10.1021/la400227k},
file = {:home/underchemist/Dropbox/Documents/references/Straney, Andolina, Millstone/Langmuir the ACS journal of surfaces and colloids/Straney, Andolina, Millstone - Langmuir the ACS journal of surfaces and colloids - Seedless initiation as an efficient, sustainable rou.pdf:pdf},
issn = {1520-5827},
journal = {Langmuir},
month = apr,
number = {13},
pages = {4396--403},
pmid = {23517186},
title = {{Seedless initiation as an efficient, sustainable route to anisotropic gold nanoparticles.}},
url = {http://www.ncbi.nlm.nih.gov/pubmed/23517186},
volume = {29},
year = {2013}
}
\end{filecontents}

\documentclass[preprint, aps, prl]{revtex4-1}

\begin{document}

\cite{Straney2013}

\bibliography{\jobname.bib}

\end{document}

If I try to compile using ctrl+B I get natbib undefined citation error:

[Compiling /home/underchemist/Dropbox/School/phys 573/project/report/test.tex]

TraditionalBuilder: Invoking latexmk... done.

No errors. Warnings:

./test.tex: LaTeX Warning: File `test.bib' already exists on the system.
./test.tex:23: Package natbib Warning: Citation `Straney2013' on page 1 undefined on input line 23.
./test.tex: Package natbib Warning: There were undefined citations.

[Done!]

If I build the file using

$ pdflatex test.tex
$ biblatex test
$ pdflatex test.tex
$ pdflatex test.tex

it works and I get output as expected. Can anyone add any insight to my troubles?

Thanks

underchemist commented 9 years ago

To give an answer myself, I copied my tex and bib files to another new directory and tried to compile from sublime again and it works... Not sure why but crisis averted?

underchemist commented 9 years ago

The issue is back and is not fixed by deleting all files and pasting the tex file into a new directory.

ig0774 commented 9 years ago

You'd really have to post the log file of a failed build... What happens when you run latexmk test from the terminal? Are there any errors in the log that are not being picked up by the log parser?