Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latexrun+biber works incorrectly with \nocite{*} #57

Open
philip-bl opened this issue Apr 18, 2018 · 5 comments
Open

Latexrun+biber works incorrectly with \nocite{*} #57

philip-bl opened this issue Apr 18, 2018 · 5 comments

Comments

@philip-bl
Copy link

Here goes minimal example.

blah.tex:

\documentclass{article}
\usepackage[backend=biber]{biblatex}
\addbibresource{refs.bib}

\begin{document}

Hello world.

\nocite{*}
\printbibliography

\end{document}

refs.bib:

@inproceedings{ref01,
  author={M. Pie},
  title={A Bug in Latexrun},
  booktitle={Github},
  year={2018}
}

I do latexrun --bibtex-cmd biber blah and I get a pdf file with no references section. This is wrong.

If I do pdflatex blah; biber blah; pdflatex blah, the references section is there. This is how it's supposed to be.

@maddiemort
Copy link

I also have this problem.

@xqms
Copy link

xqms commented May 24, 2019

Interestingly, just running latexrun again fixes the problem for me - even though it does not execute latex again (--verbose-cmds does not print anything)

@xqms
Copy link

xqms commented May 24, 2019

After running latexrun once, latex.out/xyz.pdf is correct, but xyz.pdf is some intermediate version, not the final one...

I uploaded a log here:
https://gist.github.com/xqms/610a018e95251bcbc9b80c5927a900f5

The command I used was
latexrun --debug --verbose-cmds --latex-cmd "xelatex" --bibtex-cmd "biber" talk.tex

Note that "commiting latex.out/talk.pdf to talk.pdf" occurs only once after the first latex run, which seems wrong to me...

@banbh
Copy link

banbh commented Oct 13, 2019

I also have this problem. Unlike @xqms running latexrun again does not cause biber to run, and hence does not fix the problem. From skimming the code I think the problem is that latexrun tries to parse the aux file in order to determine whether biber needs to be run. Use of \nocite{*} messes up this logic. In my opinion, just like parsing of tex files should be left to latex, parsing of biber files should be left to biber (even if that requires running biber "unnecessarily").

(Mind you, I see the attraction of trying to avoid running biber. A common pattern is to have all your latex files reference the same bib file. A minor tweak to that bib file will then result in biber needing to be run for all latex files in the repository. However I suspect avoiding this is hard.)

Ferdi265 added a commit to Ferdi265/latexrun that referenced this issue Oct 10, 2023
@Ferdi265
Copy link

Ferdi265 commented Oct 10, 2023

I found a fix for this. When using \nocite{*}, an entry is generated in the .bcf file. If latexrun is extended to also look there before concluding that no biber run is needed, then it correctly identifies that it needs to run another pass of biber.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants