Written and maintained by CASRAI Editorial Board
Last updated
Citations rendering as [?], a missing reference list, or “There were undefined citations” at the end of a log — these almost always mean the same thing, and it is usually not a broken bibliography. It is a compile-sequence problem.
Why one run is never enough
LaTeX and BibTeX pass information to each other through files, and each pass only knows what the previous one wrote down.
- First LaTeX run. LaTeX sees your bibliography style and
.bibdeclarations but does not yet know what the citation commands refer to. Every citation renders as[?]and no reference list appears. It writes the bibliography style, the.bibfile name and every citation occurrence into the.auxfile. - BibTeX run. BibTeX reads the
.auxfile, finds the style to use, notes which citations were requested, locates the bibliography files, matches citations to entries, sorts them if the style calls for it, and writes the result to a.bblfile. - Second LaTeX run. LaTeX still warns that citations are undefined — but when it reaches the bibliography command it reads the
.bbland records a definition from eachbibitem. - Third LaTeX run. Now the citation commands are replaced with their real labels in the output.
So the canonical sequence is latex → bibtex → latex → latex. A warning after run two is expected, not a failure. If you are compiling once and concluding the bibliography is broken, nothing is broken yet.
When rerunning does not fix it
If citations are still undefined after the full sequence, the cause is one of a short list.
- Missing declarations. BibTeX needs exactly one
bibliographystyle{...}and onebibliography{...}to work. Omitting either — or having thebibliographycommand inside a conditional that did not fire — produces the same symptom as a wrong key. - A syntax error in the
.bibfile. If BibTeX cannot parse the file, it cannot match anything in it. The warnings it emits identify the problem, which is why the.blglog is the file to read — not the LaTeX log. A missing closing brace or a stray comma in one entry can take out entries after it. - A citation key that does not exist. Keys are case-sensitive and must match the
.bibentry exactly. A single mistyped key stays undefined while everything else resolves — which is the useful diagnostic: all citations failing points at sequence or declarations, one failing points at the key. - A stale
.auxfile from an earlier state of the document, particularly after renaming files or changing the bibliography command. Deleting the generated files and running the full sequence again resolves it. - Backend mismatch. If you use
biblatex, the processor is normally biber, not BibTeX. The package says so directly — it asks you to “(re)run Biber on the file” and then rerun LaTeX. Running bibtex against a biblatex document, or the reverse, leaves the bibliography unresolved no matter how many passes you do.
Reading the right log
Two different logs report two different things, and the common mistake is reading only the first.
- The LaTeX log reports that citations are undefined. It tells you that something is wrong.
- The
.blgfile is BibTeX’s own log. It tells you why — a database file it could not open, an entry it could not parse, a style it could not find.
If the LaTeX log says citations are undefined and the .blg is clean, the problem is on the LaTeX side (declarations, keys, sequence). If the .blg carries errors, fix those first; nothing downstream can succeed until BibTeX parses the database.
A diagnostic order that saves time
- Run the full sequence once, deliberately, before diagnosing anything.
- Is it every citation or one? Every → sequence or declarations. One → that key.
- Open the
.blg. Fix anything it reports before touching the document. - Confirm you are using the right backend for your package — bibtex with
bibliography, biber withbiblatex. - Delete the generated files and rerun cleanly. This is what clears a stale
.aux.
Automated build tools that run the sequence to convergence remove most of this class of problem, which is why editors that manage compilation rarely surface it — the sequence is handled for you.
Related
For getting a bibliography working in the first place, see adding citations and a bibliography in Overleaf. Markdown-based workflows route citations through a different processor entirely — see citations in Quarto, R Markdown and Pandoc. If the problem is not that citations are missing but that they are formatted wrongly for a journal, that is a style question: see editing a CSL citation style.
Frequently asked questions
Why do my citations show as [?]
Because the first LaTeX run has not yet had a .bbl to read. That is the expected output of run one. Complete the latex → bibtex → latex → latex sequence.
How many times do I have to compile?
LaTeX, then BibTeX, then LaTeX twice more. The warning after the second LaTeX run is normal; the third run is what substitutes the labels.
One citation is undefined and the rest are fine. Why?
That pattern points at the key rather than the setup. Keys are case-sensitive and must match the .bib entry exactly.
What is the .blg file?
BibTeX’s log. It is where parse errors in your .bib file and missing-database messages appear, and it is the file to read when the LaTeX log only says “undefined”.
Should I run bibtex or biber?
Biber with biblatex; BibTeX with the traditional bibliographystyle and bibliography commands. Mixing them leaves citations unresolved regardless of how many passes you run.
I fixed the .bib file and it still fails.
Likely a stale .aux. Delete the generated files and run the full sequence from a clean state.
References
- Normal use of BibTeX from LaTeX — The TeX FAQ
- Bibliography management with BibTeX — Overleaf
- Citation undefined on input line — Overleaf
- BibTeX isn’t working; my cite are showing up as question marks — Overleaf








