I have some documents using a same custom package. That "header" package loads by default the package fullpage. But I would like to write a new LaTeX document, using the same header, but without loading fullpage, and I don't want to change old files.
Is there a way to add an "if false" condition about options? I mean. I have currently:
\DeclareOption{fullpage}{
\usepackage{fullpage}
}
But that implies to change all of my old documents to add the fullpage option to my package. I want however to make something like:
if-not-nofullpage {%
\usepackage{fullpage}
}
And in my new document:
\usepackage[nofullpage]{my-header}
Or perhaps a way to "unload" a previously loaded package:
\usepackage{fullpage} % inconditionally
\DeclareOption{nofullpage} {%
unload-or-revert-the-fullpage-inclusion
}
How can I do that? (if plain TeX macros are used in your answers, please, with little explanations).
\RequirePackageshould be used. It's mostly a tradition, but having two separate command names can be used by the LaTeX developers for adding functionality to one of the commands without changing the meaning of the other. – egreg Sep 26 '13 at 18:19