Is it possible to set the draft mode of a document AFTER documentclass

Is it possible to set the draft mode of a document AFTER documentclass



I am using a precompiled preamble with the documentclass inside. However, I sometimes want to change the document to 'draftmode'. Recompile the preamble everytime I am doing this is not so comfortable. So it is somehow possible to activate the draftmode even after the command documentclass in the preamble?





Yes, this is possible, but it may depend on what you mean by "recompile the preamble". Can you provide some code that explains your setup and how you change things to switch between draft and non-draft mode at the moment?
– Werner
Aug 27 at 22:54


draft


draft





Try PassOptionsToClassdraftarticle before the precompiled preamble
– blub
Aug 27 at 23:01


PassOptionsToClassdraftarticle





My code looks overall 'normal' I just use Mylatexformat which creates a .fmt file which consits of the preloaded preamble (so loading all the usepackages etc.) I also added the documentclass in this precompiling so everytimt I have to change something inside documentclass I can do so but then recompile it again to make changes take effect. Besides this my code is completely normal I can still disable the function and run the code in the normal way
– SRel
Aug 27 at 23:02





Since you have some responses below that seem to answer your question, please consider marking one of them as ‘Accepted’ by clicking on the tickmark below their vote count (see How do you accept an answer?). This shows which answer helped you most, and it assigns reputation points to the author of the answer (and to you!). It's part of this site's idea to identify good questions and answers through upvotes and acceptance of answers.
– samcarter
Sep 13 at 9:32




1 Answer
1



The full definition of the draft option in the standard classes is


draft


DeclareOptiondraftsetlengthoverfullrule5pt



so you can get the equivalent effect by doing


setlengthoverfullrule5pt



at any point.



However using [draft] on document class makes it a global option so it may have had an effect on packages you have loaded (but you have not given any information on which packages).


[draft]



Most packages will ignore it, some may just set a flag to true for draft mode, in which case you may be able to set that flag to false, but some packages may alter the code loading and so not load the "normal" code at all in draft mode. The behaviour is all specific to each packages handling of any draft option that it has.


draft






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Edmonton

Crossroads (UK TV series)