跳到内容

This error is related to cross-referencing. It appears when you use the same label multiple times for different objects, causing LaTeX to get confused when \ref{...} is used.

Common Causes

Same label used multiple times:

The most basic example of such an error is simply giving the same label to different objects as shown below

\section{Section 1}
\label{algebra}

\includegraphics{image.jpg}
\label{algebra}

Here, both the image (image.jpg) and the section (Section 1) have been labelled as algebra, causing LaTeX to get confused as to which one to reference when \ref{algebra} is used. This will lead to an error as shown below

main.tex

There were multiply-defined labels.

To resolve this, rename one of the labels to something else.

Overleaf guides

LaTeX Basics

Mathematics

Figures and tables

References and Citations

Languages

Document structure

Formatting

Fonts

Presentations

Commands

Field specific

Class files

Advanced TeX/LaTeX