How to Change Reference Number in LaTeX (Step-by-Step)

How to Change Reference Number in LaTeX (Step-by-Step)

When working with academic or technical documents in LaTeX, handling references is both convenient and powerful thanks to in-built referencing systems and packages like BibTeX and biblatex. However, there might be situations where a user wants to manually modify or override the reference numbering, either for custom formatting, non-standard citation styles, or to achieve a specific organizational structure. While LaTeX automates most referencing tasks, it can also support manual changes — if you know the right steps.

TLDR: To change a reference number in LaTeX, you can either manually adjust the label using the \bibitem command, or manipulate reference orders using tools like natbib or bibliographystyle sorting options. In documents using BibTeX, manual renumbering isn’t directly possible but can be simulated through reordering bibliography entries. For even more control, biblatex and biber allow advanced sorting and label manipulation features. Understanding the reference system you’re using is essential.

Understanding Reference Numbering in LaTeX

All Heading

In LaTeX, references are typically managed in two main ways:

  1. Manual entries using the thebibliography environment
  2. Automated citation management through BibTeX or biblatex

Each method has a different approach to numbering. When using the thebibliography environment, the reference numbers correspond to the order of \bibitem entries. In automated styles using BibTeX or biblatex, the LaTeX engine determines numbering based on citation order or sorting rules set by the chosen bibliography style.

Step-by-Step Guide to Changing Reference Number in LaTeX

Method 1: Using thebibliography Environment (Manual References)

This method is useful when you are not using BibTeX and need complete control over your reference numbers.

Steps:

  1. Use the thebibliography environment at the end of your LaTeX document.
  2. Add each reference using the \bibitem command.
  3. To manually set the label (i.e., the number or any symbol), modify the optional argument of the \bibitem.

Example:

\begin{thebibliography}{99}
  \bibitem[10]{firstref} A. Smith, Understanding AI, AI Press, 2023.
  \bibitem[15]{secondref} J. Doe, Deep Learning Simplified, Tech Books, 2022.
\end{thebibliography}

This would make the references appear with labels [10] and [15] instead of [1] and [2].

Method 2: Reordering BibTeX Entries

If you are using a .bib file with BibTeX, directly modifying the reference numbers is a bit more complicated, because BibTeX automatically generates reference numbers based on citation order or sorting rules defined in the bibliography style.

Workaround Approaches:

  • Reorder the citations in your text: The first citation will become [1], the second [2], etc.
  • Switch to a style that sorts the references by author or year, not citation order (e.g., plain, unsrt styles).

Example:

\bibliographystyle{unsrt}
\bibliography{myreferences}

The unsrt style lists references in the order they are cited, enabling you to influence reference numbering by reordering citations in the document body.

Method 3: Using Biblatex for Custom Reference Labels

The biblatex package, in conjunction with the biber backend, offers advanced features for customizing labels — including changing the reference numbering format.

Steps:

  1. Load biblatex in your preamble with the appropriate backend.
  2. Use \printbibliography where you want the bibliography printed.
  3. Customize labels using the labelnumber options or with sorting templates.

Example:

\usepackage[backend=biber,sorting=none,labelnumber=true]{biblatex}
\addbibresource{myreferences.bib}

This setup disables sorting, allowing references to be printed as cited. For even more control, you can define your own sorting scheme to force a specific order.

You can also manually assign labels using \DeclareLabelalphaTemplate or modify the \printbibliography command with options like labelnumberwidth to stylize numbering.

Image not found in postmeta

Method 4: Using Natbib with Custom Entries

Natbib is a popular package that provides flexible citation commands. While it doesn’t let you directly change numbering, combining it with unsrt sorting or custom \bibitem entries gives some control.

Example:

\usepackage[numbers]{natbib}
\bibliographystyle{unsrt}

This combination helps preserve custom numbering through citation order.

Tips for Reliable Reference Management

  • Always use consistent citation styles across all entries.
  • Regenerate bibliography files after each major edit (run pdflatex, biber or bibtex, then pdflatex twice).
  • For manual references, double-check all manually entered labels.

Common Mistakes and How to Avoid Them

  • Manual numbering in BibTeX: Not supported. Use biblatex for this level of control.
  • Inconsistent citation keys: Always refer to the same key in both the citation and bibliography.
  • Forgetting to rerun compilation steps: You must rerun LaTeX and BibTeX/Biber after any bibliography edit.

When Should You Manually Change Reference Numbers?

Manual modification is rarely required but can be helpful in specific cases:

  • Creating sample documents or mockups with predefined references
  • Aligning reference numbering with existing published formats
  • Simulating citation systems for education or presentation purposes

Conclusion

Changing reference numbers in LaTeX can be straightforward or complex, depending on the system you’re using. Manual methods using \bibitem offer the most control, while BibTeX relies on citation order or sort criteria in the bibliography style. When fine-grained customization is needed, using biblatex provides flexibility unmatched by older systems. Regardless of the method, understanding your reference workflow is key to managing citations effectively and accurately.

FAQ

  • Q: Can I directly change reference numbers using BibTeX?
    A: No, BibTeX assigns numbers automatically. Instead, use citation ordering or switch to biblatex for more control.
  • Q: What’s the easiest way to set custom numbers for a short paper?
    A: Use the thebibliography environment and assign numbers manually within \bibitem.
  • Q: Why doesn’t my reference number change even after modifying the order?
    A: It’s likely you’re using a bibliography style that sorts entries differently (like by author). Try unsrt.
  • Q: Can I use symbols instead of numbers in references?
    A: Yes, with manual \bibitem labeling, you