FormaTeX
WarningDocument Structure

Label Multiply Defined

LaTeX Warning: Label 'XXX' multiply defined.

What this error means

Two \label{} commands in your document use the same identifier. LaTeX will use the value from the second definition, which may cause wrong cross-references. This is a warning, not an error, but the output will likely be incorrect.

Common causes

  • The same label string used in two different \label{} calls
  • Copying a section and forgetting to rename its label
  • Multiple included files each defining a label with the same name

How to fix it

Give each \label{} a unique name. Use a naming scheme like fig:plot1, tab:results, sec:intro to avoid collisions. Run LaTeX twice after renaming to clear the stale .aux file reference.

Code examples

Causes the error
\documentclass{article}
\begin{document}

\section{Introduction}\label{sec:intro}
% ...
\section{Background}\label{sec:intro}  % Duplicate!

\end{document}
Fixed
\documentclass{article}
\begin{document}

\section{Introduction}\label{sec:intro}
% ...
\section{Background}\label{sec:background}  % Unique label

\end{document}

Related errors

Test the fix live

Paste your LaTeX into the playground and compile instantly.

ملاحظة سريعة

نتتبع الاستخدام المجهول — مشاهدات الصفحات واستخدام الميزات وأحداث الترجمة — لفهم ما يعمل وما لا يعمل. بدون إعلانات، بدون بيانات شخصية، بدون مشاركة مع أطراف ثالثة.