Fix an undefined citation warning in Overleaf.
An undefined citation warning usually means your compiler missed a bibliography pass, a key has a typo, or a style file is missing. The output shows a bold question mark or brackets with the raw key instead of your source.
The short answer: check that your citation key matches the .bib file exactly, add a bibliography style if you use classic BibTeX, and recompile. If you use BibLaTeX, verify that your backend is set to biber.
Why citations show as undefined
LaTeX does not resolve citations on the first pass. The main file writes citation keys to an auxiliary file, a bibliography tool reads them and builds the .bbl file, and a final LaTeX pass replaces your \cite commands with numbers or author names. If any link in that chain breaks, the compiler gives up and marks the reference as undefined.
Overleaf handles these passes automatically when configured correctly, but small slips in file names, extensions, or package options stop the bibliography from generating.
Six fixes for undefined citations
1. Check for typos and case sensitivity
BibTeX keys are strictly case-sensitive. If your bibliography lists @article{Smith2023} but your text calls \cite{smith2023}, the compiler cannot find a match.
Open your .bib file, copy the key directly, and paste it into your \cite command to rule out invisible spacing issues or mismatched letters.
2. Add a bibliography style
Classic BibTeX requires both a style command and a bibliography source to output references. Without a style, the compiler produces warnings and leaves citations undefined.
Add a style declaration just before your bibliography command in your main file.
3. Match BibLaTeX file extensions and backends
If you use BibLaTeX, the syntax differs from classic BibTeX. You load resources with \addbibresource rather than \bibliography, and BibLaTeX requires the full file extension.
Ensure your compiler uses biber instead of BibTeX in your Overleaf or project settings, as mixing them causes silent reference failures.
4. Verify file paths and subfolders
When your .bib file lives inside a subdirectory such as references/refs.bib, a plain \bibliography{refs} command fails to locate it.
Provide the correct relative path from your main document folder, or keep your .bib file at the root level alongside your main.tex during troubleshooting.
5. Force a clean recompile
Sometimes auxiliary files become corrupted or fail to update after a bulk import from Zotero or Mendeley. A standard recompile might read stale data from an older build.
Click the menu next to the Recompile button in Overleaf and select Recompile from scratch to clear cached auxiliary files and run every bibliography pass again.
6. Check author field formatting in your `.bib` file
Malformed entries in your bibliography database can prevent the parser from reading an entire record. If an author field has unmatched braces or missing commas, the key becomes unreachable.
Make sure multi-author names are separated by the word and, and corporate authors use an extra set of braces to prevent unwanted name-flipping.
Quick diagnosis table
よくある質問
Why does Overleaf show undefined citations even though the key is in my `.bib` file?
This usually happens because the compiler missed a bibliography pass or the bibliography style is missing. Try running a clean recompile from scratch, and verify that your \bibliographystyle or BibLaTeX backend is set correctly.
Do I need to include the `.bib` extension in my bibliography command?
If you use classic BibTeX (\bibliography), leave the extension off: write \bibliography{references}. If you use BibLaTeX (\addbibresource), include the extension: write \addbibresource{references.bib}.
あなたの論文を Texeno で試してみましょう。
無料で始めて、プロジェクトを .zip でアップロードし、リコンパイルを押すだけ。コンパイル時間を延ばしたくなったらアップグレードしてください。
書き始める