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

Bibliography doesn't get printed when using biblatex and \nocite{*} #1565

Open
jlvermeulen opened this issue Aug 17, 2022 · 3 comments
Open

Comments

@jlvermeulen
Copy link

I have a document which doesn't use any citations, but has a list of references that should be printed. However, even when using \nocite{*}, biber does not get run by the basic builder. Here's a MWE:

test.tex

\documentclass{article}

\usepackage{biblatex}

\addbibresource{test.bib}

\begin{document}
Test. \nocite{*}

\printbibliography
\end{document}

test.bib

@inproceedings{test1,
    author="Last, First and Aaa, Aa",
    title="Test 1",
    booktitle={Some Proceedings},
    year={2022},
}

@inproceedings{test2,
    author="Last, F. and Zzz, Z.",
    title="Test 2",
    booktitle={Some Other Proceedings},
    year={2022},
}

Running it with the basic builder generates a pdf that only contains the text "Test." with the warning "LaTeX Warning: Empty bibliography on input line 10." It doesn't seem to matter where I put the \nocite{*} (biblatex lets you put it in the preamble, that also doesn't work).

A workaround is to insert an actual \cite{}, compile, remove the \cite{} and compile again, but it would be nice if this just worked.

@HKervadec
Copy link

I suppose you would need to add another elif in there?

        if CITATIONS_REGEX.search(self.out):
            run_bibtex = True
            # are we using biblatex?
            m = BIBLATEX_REGEX.search(self.out)
            if m:
                bibtex = m.group(1).lower()
                if bibtex == 'biber':
                    use_bibtex = False
        # check for natbib as well
        elif (
            'Package natbib Warning: There were undefined citations'
                in self.out):
            run_bibtex = True

The .log contains:

LaTeX Warning: Empty bibliography on input line 9.

[1

{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] (./test.aux)

LaTeX Warning: There were undefined references.


Package biblatex Warning: Please (re)run Biber on the file:
(biblatex)                test
(biblatex)                and rerun LaTeX afterwards.

So perhaps matching either "LaTeX Warning: There were undefined references." or "Package biblatex Warning: Please (re)run Biber on the file:" would do the trick?

@merchantrayyan
Copy link

Doesn't look like anyone's tried their hand at this yet. If there's anyone assigning issues still, I'd like to take this. If not, I suppose I'll just take it on anyways.

@vinograd0v
Copy link

I had the same problem, "\nocite{}" doesnt work properly, i find a solution doing \nocite{"some of your reference"}
before the \nocite{
}, that solve the problem for me and its a quickly solution

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

4 participants