I'm trying to load draft mode as an option for my class. Overfull lines are highlighted, but unfortunately images are loaded normally (not just as frame). Can someone please tell me why?

Class file:



% Declare class options         

% if draft mode is enabled (true) pass option "draft" to class


% Basics


    draftmode=true ,        


1 Answer 1


This issue is that in your custom class you load scrbook with \LoadClass and pass the options there, but you load graphicx using \RequirePackage in your own class. This causes the package loading to be outside the scope of \LoadClass and therefore the option is not passed.

You can check this when you uncomment \RequirePackage{graphicx} (and \RequirePackage{pdfpages} as well, because that package loads graphicx internally) and put \usepackage{graphicx} in your document, then the draft option is respected.

A workaround is to pass the option to graphicx explicitly (and to other required packages) using \PassOptionsToPackage.


% if draft mode is enabled (true) pass option "draft" to class
  • Thanks, I already thought that the graphicx package is responsible for that issue. Are there other limitations of the draft mode if I do not change my code?
    – joni
    Oct 12, 2020 at 17:21
  • @joni the pdfpages package also has a draft setting (to print an empty box instead of the included pdf). Microtype has a draft setting that disables the functionality of the package. So also for these two packages that you require you need separate \PassOptionsToPackage statements. The other packages that you require don't have a draft setting as far as I know.
    – Marijn
    Oct 12, 2020 at 20:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .