FormaTeX
FatalCommands & Packages

Unknown Package Option

! LaTeX Error: Unknown option 'XXX' for package 'YYY'.

What this error means

You passed an option to \usepackage that the package doesn't recognise. Options are package-specific — not all packages accept the same set.

Common causes

  • Typo in the option name
  • Option belongs to a different package
  • Option was removed in a newer version of the package
  • Passing a document-class option to \usepackage instead of \documentclass

How to fix it

Check the package documentation (run texdoc packagename in a terminal) to see the list of valid options. Some options like a4paper belong to \documentclass, not \usepackage.

Code examples

Causes the error
\documentclass{article}
\usepackage[a4paper]{amsmath}  % a4paper is not an amsmath option
\begin{document}
Hello
\end{document}
Fixed
\documentclass[a4paper]{article}  % a4paper goes on documentclass
\usepackage{amsmath}
\begin{document}
Hello
\end{document}

Related errors

Test the fix live

Paste your LaTeX into the playground and compile instantly.

One quick thing

We track anonymous usage — page views, feature usage, compilation events — to understand what works and what doesn't. No ads, no personal data, no third-party sharing.

Cookie policy