Skip to main content
v2026.11,772 entries · CC-BY 4.0

Fixing Undefined Citations and BibTeX Errors

Citations showing as [?] usually means the compile sequence, not a broken bibliography: LaTeX writes .aux, BibTeX writes .bbl, and only the third pass substitutes the labels.

Ask CASRAI · included with Regulatory Radar

Ask about Fixing Undefined Citations and BibTeX Errors

Ask CASRAI answers research-administration questions and cites the passages behind every claim — and says so when the corpus does not cover something, instead of guessing. It comes with a Regulatory Radar subscription at $29 a month, alongside the daily digest of regulatory changes and the dashboard of what changed.

150 questions a day, on this site, over the API, or inside your own tools through the CASRAI MCP server.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays free to read, with no account and no card.

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.

  1. First LaTeX run. LaTeX sees your bibliography style and .bib declarations 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 .bib file name and every citation occurrence into the .aux file.
  2. BibTeX run. BibTeX reads the .aux file, 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 .bbl file.
  3. Second LaTeX run. LaTeX still warns that citations are undefined — but when it reaches the bibliography command it reads the .bbl and records a definition from each bibitem.
  4. 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 one bibliography{...} to work. Omitting either — or having the bibliography command inside a conditional that did not fire — produces the same symptom as a wrong key.
  • A syntax error in the .bib file. If BibTeX cannot parse the file, it cannot match anything in it. The warnings it emits identify the problem, which is why the .blg log 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 .bib entry 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 .aux file 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 .blg file 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

  1. Run the full sequence once, deliberately, before diagnosing anything.
  2. Is it every citation or one? Every → sequence or declarations. One → that key.
  3. Open the .blg. Fix anything it reports before touching the document.
  4. Confirm you are using the right backend for your package — bibtex with bibliography, biber with biblatex.
  5. 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

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →

Regulatory Radar

Stop finding out after the fact

$29/month, cancel anytime. Daily digest updates from our analysis, a dashboard holding the same items, and a cited assistant for everything they raise.

  • Federal Register, Federal Register+, Grants.gov, Regulations.gov, NSF News, UKRI, plus CASRAI’s own published content.
  • 72,264 indexed passages, and every answer cites the ones it drew on.