1

Writing a document with quite a few figures (50+) so when it complies, it can take 3-5 minutes. When I want to run it in draft mode, it reduces the compile time to about 5 seconds which is loads better so I'm doing it a lot. I'm using:

\usepackage{graphicx}

and

\usepackage[draft]{graphicx}

for normal and draft mode respectively on texmaker. My question is: is there some kind of macro or command I can write so I can change between modes without having to navigate to line 163 in my document master and write or delete '[draft]' each time I switch? I'd love to be able to build either using 'f1' for build and 'ctrl+f1' for draft build for example.

I know it sounds lazy, but if it can be done, I'd like to.

Cheers.

  • \usepackage[draft]{graphicx}? – egreg May 1 '16 at 14:51
  • Your preamble is sufficiently long so that the loading of the graphicx package doesn't occur until line 163 of the master tex file? – Mico May 1 '16 at 15:00
  • Indeed. It's a Phd thesis for materials science so it's full of a ton of science-y packages, title pages, authors declaration crap bla bla. – Slappy May 1 '16 at 15:09
4

You may want to specify the draft option at the \documentclass level rather than at the level of individual packages. That way, the option will be passed to all packages that recognize it, further speeding up the compilation process. The hyperref package, for one, recognizes the option draft as well; if the option is specified, all hypertext options are turned off and no hyperlinking is performed.

Oh, the opposite of "draft" is "final".

  • Thanks Mico, that helps just for the sake of locating the relevant line. – Slappy May 1 '16 at 15:14

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.