Documentation/Packages/How to Fix LaTeX Package Conflicts
Packages

How to Fix LaTeX Package Conflicts

Sometimes LaTeX packages conflict with each other. Here's how to diagnose and fix common package issues.

Option Clash Error

Same package loaded with different options:

% ERROR:
\usepackage[colorlinks]{hyperref}
\usepackage[hidelinks]{hyperref}  % Clash!

% SOLUTION - load once with all options:
\usepackage[colorlinks,hidelinks]{hyperref}

% Or use PassOptionsToPackage before loading:
\PassOptionsToPackage{colorlinks}{hyperref}

Loading Order Issues

Some packages must load in specific order:

% General rule: hyperref loads LAST
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{biblatex}
\usepackage{hyperref}  % Last!

% Exceptions - these load AFTER hyperref:
\usepackage{cleveref}  % Must be after hyperref
\usepackage{glossaries}

Common Conflicts

Known problematic combinations:

% subfigure + subcaption: use only one
\usepackage{subcaption}  % Modern choice

% fixltx2e: no longer needed (LaTeX 2015+)
% Don't load it anymore

% times font package conflicts:
% Use newtx packages instead:
\usepackage{newtxtext}
\usepackage{newtxmath}

Debugging Strategy

How to find the problem:

% 1. Comment out packages one by one
% 2. Compile after each to find culprit
% 3. Google "[package1] [package2] conflict"
% 4. Check package documentation for known issues

% Read the log file for hints:
Package X Warning: ...

💡 Tips

  • •Update your LaTeX distribution - fixes many bugs
  • •Package documentation lists known conflicts
  • •Less is more - only load packages you actually use

Try This in Bibby AI

Write LaTeX faster with AI auto-complete and instant compilation.

Start Writing Free

Related Tutorials

How to Fix LaTeX Package Conflicts | Bibby AI