How to Cite References in LaTeX: From \cite to Cross-References

Explain the complete approach to bibliographies and citation markup in LaTeX, including how \cite works with BibTeX, cross-referencing equations and subfigures, citation-merging settings, and how to manage the reference list with Zotero.

Key Points of This Article

  • Use \cite{key} to mark citations in the body text. The keys must correspond one-to-one with the entries in the .bib file, and the reference list is complete only after compiling two to three times.
  • Equations are referenced with \label and \eqref, and figures with \label and \ref. Subfigures require the subcaption package and are referenced with \subref.
  • To display consecutive citations [1,2,3] as [1–3], load the cite package in the preamble and keep the arguments of \cite in order.
  • Collecting references with Zotero and exporting a .bib file avoids formatting errors when writing entries by hand and makes repeated later revisions easier.
  • After compiling, check each citation number, cross-reference, and reference-list format item by item. Question marks usually indicate inconsistent keys or that the document has not been recompiled.

When writing a LaTeX paper, many people get stuck at the citation step: where the [1] in the body text comes from, how to reference an equation number elsewhere, why references to subfigures labeled (a) and (b) still come out wrong, and why the reference list keeps showing question marks. This article is written for readers who are writing a LaTeX paper, thesis, or technical report, and it explains the basic structure and common usage of citations and bibliography markup.

After reading this, you should be able to cite references with \cite, generate a bibliography list, use \label and the \ref family of commands to reference equations, figures, and subfigures, and display consecutive citations in a merged form. The text also explains how to manage bibliographic entries with Zotero and import them into a LaTeX project.

How do I cite references in LaTeX? One-line conclusion with \cite and BibTeX

LaTeX citations have two parts: the citation commands in the body text, and the bibliography list generated by BibTeX or biblatex. In the body, you write \cite{key}, where the key is the identifier of an entry in the .bib file. During compilation, the tool generates the numbers and the list automatically. The table below gives recommended practices for your situation.

Your situationRecommended PracticesCause
The reference list is short; numbered citations alone are sufficient.Use BibTeX with \cite, choosing the numeric style classSimple to write; the templates are usually already set up.
Journal or conference requires author-year formatUsing the natbib package, with \citep and \citetCan you output both the bracketed form and the body-text form separately?
Need more flexible styling and sortingCompile with biblatex and biberSupports custom styles and multiple sorting methods
The paper has many references and they often change.Centrally manage in Zotero, then export a .bib file for citationEntries are maintained centrally; a single change takes effect throughout the entire document.
Just online writing, I want instant previewUsing an online LaTeX editing environment, likewise with \cite and .bibNo need to install the full environment locally; the structure stays consistent with the local one.

Before You Begin: Confirm These Points First

Before you start, check the journal's or school's formatting requirements. Many templates already specify the citation style, such as numbered or author-year, and whether the references should be listed in order of appearance. Commands and packages specified by the template should be used first; otherwise, style conflicts are likely to occur.

Next, confirm the compilation toolchain. The usual BibTeX sequence is latex, bibtex, latex, latex, while biblatex requires biber. Mixing the two leads to an empty bibliography or question marks in citations, so first determine which one the template uses.

Third, unify the naming rule for citation keys. A citation key is the correspondence between \cite and the .bib entry. It is recommended to use "author's surname + year + keyword", for example wang2021graph. Once a key is referenced in multiple places, changes must be made through a global find-and-replace across the whole document; the more standardized the naming, the less trouble later on.

Fourth, check whether the bibliographic metadata is complete. If the author, year, title, or journal or publisher is missing, the reference entry will be garbled in formatting. Verifying before importing is faster than troubleshooting after compilation.

Finally, prepare labels for equations, figures, and tables. Cross-references depend on \label, and if label names are duplicated or spelled inconsistently, the references will display question marks. It is recommended to use the prefix eq for equations, fig for figures, and tab for tables.

Steps to Cite Sources and Generate a Bibliography in LaTeX

There is a general workflow below, applicable to local LaTeX environments as well as online editors.

  1. Collect the required references in Zotero, check each entry's fields such as author, year, and title one by one, and select these items once you have confirmed they are correct.
  2. Use Zotero's export function, choose the BibTeX format, and save the entries as a .bib file in the same directory as the main LaTeX file of your paper.
  3. In the preamble, load a citation package, such as \usepackage{natbib} or biblatex, and specify the style so that it matches the template requirements.
  4. Where you need a citation, write \cite{key}; separate multiple works with English commas, for example \cite{wang2021graph,li2020survey}.
  5. At the end of the document, write \bibliographystyle{style name} and \bibliography{file name} (without the .bib extension) to tell the compiler where the bibliography is and how it should be formatted.
  6. Compile in sequence: run LaTeX once, then run BibTeX (or biber), then run LaTeX twice more so that citation numbers and cross-references all take effect.
  7. Open the generated PDF and check whether the in-text citations display as numbers or as author-year, and whether the reference list is complete.
  8. When you need to modify a reference, edit only the corresponding entry in the .bib file and recompile; there is no need to correct each occurrence in the body text.

If your thesis is submitted as a LaTeX source package and you need a bilingual version, you can upload the source package to omnidoc.top, choose either bilingual side-by-side or translation-only output, and then download the result. After translation, you should still check terminology and citations against the original text, since machine translation may alter specialized expressions.

Verify item by item after completion

After compiling, don't submit directly; first check against the table below.

Inspection itemHow do you see it?What should I do if I have a problem?
Are all in-text citations in the main body numbered?Check whether each [number] or author-year citation in the PDF displays correctlyWhen [?] or (?) appears, check whether the citation key spelling matches the .bib file, then recompile.
Is the reference list complete?Go to the end of the document and check whether the number of entries roughly matches the references in the body text.When the list is empty, check whether BibTeX or biber has been run, and whether the file name in \bibliography is correct.
Are the cross-references correct?Check whether the numbers of formulas, figures, and tables are consistent with their references in the text.When ?? is displayed, check whether the \label exists and whether the number of compilation runs is sufficient.
Does the reference format meet the requirements?Check author order, title capitalization, and journal abbreviations against the templateReturn to Zotero to correct the metadata, then re-export the .bib file
Does the Chinese literature display normally?Check whether the Chinese author names and titles display garbled charactersConfirm that the .bib file is UTF-8 encoded, and use a compilation engine that supports Chinese.

If the revised PDF differs significantly from the previous version, you can use the PDF comparison feature in the OmniDoc desktop client to compare the two versions side by side and quickly locate the pages that have changed.

📊 Core Comparison: How to Cite Different Types of Sources

In LaTeX, the objects that need labels are not limited to bibliography entries; they also include equations, figures, and subfigures. Their commands differ from one another, so mixing them up often leads to errors.

Quoted objectLabel syntaxCitation formatExplanation
ReferencesDefining the key name in .bib\cite{key name}Generated list from BibTeX or biber
FormulaWrite \label{eq:x} inside the equation environment\eqref{eq:x}The result automatically gets brackets; the amsmath package is needed.
Regular graph or tableWrite \label{fig:x} inside a figure or table environment\ref{fig:x}Output the number, without automatically adding the character "图" (figure).
SubgraphEach subfigure should have its own \label written inside the subfigure environment.\subref{fig:a} cites the subfigure, \ref{fig:main} cites the whole figureThe subcaption package is needed.

🎯 Which Approach Suits You?

If I only write a short report with no more than twenty references, I can handwrite the .bib file directly and use \cite with the numeric style.

If you are writing a thesis with a large number of references and many chapters, it is advisable to manage everything in Zotero from the very beginning. Export the .bib file and keep it synchronized with the thesis as it is updated, so that when you add or remove references partway through, you do not need to repeatedly search the body text for citation keys.

If a thesis needs to be edited on multiple devices, or the reference list needs to be maintained jointly with classmates, you can use the UniDoc web editor (app.unidoc.top), which supports conversion between Word and LaTeX, making it easy to switch between different tools.

❓ Frequently Asked Questions (FAQ)

1. How do I merge citations in LaTeX so that [1,2,3] displays as [1–3]?

Yes. Load the cite package in the preamble, and consecutive citation numbers will automatically be compressed into range form. Note that the arguments of \cite should be listed in numerical order; otherwise the compression will not be noticeable. When using natbib, combining of citations is already supported by default.

2. How do I cite subfigures in LaTeX? What should I do if references to subfigures (a), (b) are wrong?

Subfigures require the subcaption package. Write each subfigure inside a subfigure environment and add a separate \label to each. Refer to a subfigure in the text with \subref, and refer to the whole figure with \ref. If a reference displays the overall figure number, the \label is usually misplaced; it should be placed after the caption of the corresponding subfigure.

3. What citation tools are available for LaTeX, and which one should I choose?

A common practice is to manage references with Zotero and export a BibTeX file, or to insert citations directly using a LaTeX editor that supports .bib files. When choosing, focus on three points: whether it can import an existing .bib file, whether it can correctly handle Chinese entries, and whether it is compatible with the template of the journal you are submitting to.

4. Chinese References Garbled or Misformatted in LaTeX — How to Fix?

First confirm that the .bib file is saved in UTF-8 encoding, then check whether the template supports Chinese. The sorting and punctuation of Chinese author names often differ from English ones, so it is advisable to complete the Chinese fields in Zotero, or manually adjust the format of that entry according to the template's example.

📝 Summary

LaTeX citation and bibliography handling comes down to two things: in the body text, mark objects with \cite, \eqref, \ref, and \subref, and let BibTeX or biber generate the list when you compile. If you keep the keys, labels, and .bib file well managed and compile a few more times, most problems can be solved.

Open OmniDoc and translate your entire document.

Updated 2026-11-29