0

I'm writing a class file which is supposed to have a global "draft" option. However, this option is inherited by all imported packages and causes e.g. graphicx to replace all images with boxes.

Is there a way, except renaming the option, to change that? E.g. by somehow unsetting the option after it has been processed by my class?

  • this may be helpful http://tex.stackexchange.com/questions/223280/passoptionstoclass-vs-global-options – touhami Aug 03 '15 at 09:36
  • 3
    you can of course (the list of class options is just stored in a macro which you could redefine) but probably you shouldn't: the fact that all packages see all document class options is a documented feature of the latex language. It would be better to name the class option something else if it is specific to the class. – David Carlisle Aug 03 '15 at 09:53
  • If you design a draft option, I don't see why this should conflict with graphicx draft -- if it is draft, then it's very convenient to drop the images as well –  Aug 03 '15 at 10:06
  • @DavidCarlisle Do you want to take any action here? – Johannes_B Mar 05 '17 at 15:22
  • @Johannes_B not really but as no one else answered I'll make my comment an answer, to get it off the list. – David Carlisle Mar 05 '17 at 15:33

1 Answers1

1

You can of course (the list of class options is just stored in a macro which you could redefine) but probably you shouldn't: the fact that all packages see all document class options is a documented feature of the latex language. It would be better to name the class option something else if it is specific to the class.

David Carlisle
  • 757,742