How to Check Citations and References in a LaTeX Paper

BlogEasyLaTeXPublished

Check Both Directions: Body Citations and the .bib Database

A citation whose key is absent from .bib can produce Citation 'key' undefined and [?] in the PDF. The reverse is quieter: a database entry never cited in the body normally stays out of the bibliography without a warning.

Here, the database contains two books but the main file cites only one:

@book{knuth1984,
  author = {Donald E. Knuth},
  title = {The TeXbook},
  publisher = {Addison-Wesley},
  year = {1984}
}
@book{lamport1994,
  author = {Leslie Lamport},
  title = {LaTeX: A Document Preparation System},
  edition = {2},
  publisher = {Addison-Wesley},
  year = {1994}
}
\documentclass[11pt]{article}
\usepackage[backend=biber]{biblatex}
\addbibresource{refs.bib}
\begin{document}
\cite{knuth1984}
\printbibliography
\end{document}

Use the Log to Identify an Unresolved Key

In Citation 'kingma2015' on page 3 undefined, the page refers to the citation in the body, not a location in .bib. Search the database for the key and check:

  1. Exact spelling and capitalization. Keep the citation and database key identical.
  2. Whether the database is loaded. biblatex uses \addbibresource{refs.bib}; traditional BibTeX uses \bibliography{refs}. A wrong filename can affect every citation.
  3. Whether the apparent citation is commented out. % \cite{...} is searchable text, but does not create a citation.

An unresolved citation can also reflect an incomplete bibliography-processing pass. In EasyLaTeX, compile again and wait for the entire job. If it remains unresolved, inspect the bibliography-related errors in the log.

Find Database Entries That Are Never Cited

There is usually no warning for this direction. List the keys in .bib and search the body for each one. An unused entry may be an omitted citation or simply an old record; decide which it is.

In a project copy, \nocite{key} can test one record and \nocite{*} can display all records. Keeping the latter in the final manuscript prevents the bibliography from showing which entries were actually cited.

Check Fields According to Entry Type

Missing fields often leave blank or style-dependent output rather than stopping LaTeX. Bibliography tools may warn about them.

TypeFields commonly checkedPossible symptom
@articleauthor, title, journal, year; volume and pages where applicableIncomplete publication details
@inproceedingsauthor, title, booktitle, yearMissing proceedings title
@bookauthor, title, publisher, yearIncomplete publisher details
@misc / @onlineauthor or organization, title, year/date, URLMissing web details; access dates also require an appropriate field and style

A misspelled field such as journals instead of journal may be ignored just like a missing field. Check the fields your bibliography system and style actually use.

Remove Chapter Restrictions Before the Final Check

With \includeonly, excluded chapters are not processed in the current run. Their citations depend on available auxiliary information and may be absent from the resulting list. \input is not restricted by \includeonly. Remove chapter restrictions and compile everything before comparing citations and bibliography entries.

Common Messages

MessageCauseAction
Citation 'x' undefinedMissing/mismatched key or unloaded databaseSearch .bib and check its filename
There were undefined references.Unresolved references or incomplete processingLet the full job finish, then inspect individual keys
Please (re)run Biber on the file: mainBibliography processing needs an updateRecompile on the platform and inspect bibliography processing
I didn't find a database entry for "x"BibTeX cannot find the recordVerify the key and loaded database
empty year in xMissing publication fieldComplete it; the record may otherwise still print

Related: managing a large project and compilation troubleshooting.

Takeaways

  • Check missing records and unused records separately.
  • The log does not identify every unused bibliography entry.
  • Use \nocite{*} for inspection in a copy, not as evidence of citation completeness.
  • Run a complete compilation after chapter previews.

Keep refs.bib with the project in EasyLaTeX and compile the correct main file.