0

Edit 2: I should have said, as @egreg says in the comments, that there is no good reason to do this, as

the purpose of the options to \documentclass is precisely of being dispatched to every package.

This is mostly for educational purposes about options.

Consider the following example

\documentclass[color=notexisting]{article}
\usepackage{todonotes}
\begin{document}
~\todo{write something}
\end{document}

Now, I don't think that color is an option to article, but that's not the point.

The question is: How can you make all subsequent packages ignore only certain options to the \documentclass, e.g. ignore color=notexisting, but not e.g draft.

Any help is appreciated. Thanks!


Edit: Just figured out that it seems redefining \@classoptionslist to nothing (\gdef\@classoptionslist{}) after \documentclass removes all options sent to \documentclass.

  • 4
    The purpose of the options to \documentclass is precisely of being dispatched to every package. – egreg Sep 21 '18 at 8:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.