×

[edit] ShareLaTeX guides

[edit] LaTeX Basics

[edit] Mathematics

[edit] Figures and tables

[edit] References and Citations

[edit] Languages

[edit] Document structure

[edit] Formatting

[edit] Fonts

[edit] Presentations

[edit] Commands

[edit] Field specific

[edit] Class files

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.

[edit] 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.