Rules / Build

LaTeX Error: Option clash for package natbib — Package loaded twice with different options

A package was loaded again with options it was not first loaded with.

Fix

Load it once with all options, or use \PassOptionsToPackage before \documentclass.

Example

Reproduced on TeX Live 2026 by CI · pdflatex · corpus/option-clash

Fails: main.tex
\documentclass{article}
\usepackage{natbib}
\usepackage[numbers]{natbib}
\begin{document}
Hello.
\end{document}
Fixed
\documentclass{article}
\usepackage[numbers]{natbib}
\begin{document}
Hello.
\end{document}
What TeX prints in main.log
! LaTeX Error: Option clash for package natbib.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.4 \begin
          {document}
The package natbib has already been loaded with options:
  []
There has now been an attempt to load it with options
  [numbers]
…