GeneralChange options of loaded package

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
jaykemper
Posts: 22
Joined: Wed Apr 15, 2009 12:11 am

Change options of loaded package

Post by jaykemper »

If a package is already loaded with a set of options, is there a way to "reload" it with new options? Here's the scenario:

I've created a class that requires the package "eso-pic", which requires "color", with no options loaded.

In class file:
\RequirePackage{eso-pic}

In document:
\usepackage[usenames,dvipsnames]{color}

This creates an options clash. MWE is

Code: Select all

\documentclass{article}

\usepackage{eso-pic}
\usepackage[usenames]{color}

\begin{document}

\end{document}
I know I can load the "color" package first, but this requires me to know what options are needed before-hand in my class. If I guess wrong, how does a user activate an option I've forgotten?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

josephwright
Site Moderator
Posts: 814
Joined: Tue Jul 01, 2008 2:19 pm

Re: Change options of loaded package

Post by josephwright »

Usually, this is handled by the class passing options through to the underlying package. See \PassOptionsToPackage, for example.
Joseph Wright
Post Reply