6

What is the difference between

% arara: pdflatex: { draft : yes }
\documentclass{book}

and

% arara: pdflatex
\documentclass[draft]{book}

?

Which one is better?

And when I need to run a more complex compilation command list, for example:

% arara: pdflatex
% arara: frontespizio
% arara: biber
% arara: pdflatex
% arara: pdflatex

where should I put the draft option?

  • 1
    They're very different “draft” modes. The command line option produces no PDF output. – egreg Jan 28 '17 at 15:06
  • @egreg Hence if I want the .pdf I always have to use the documentclass option, have I? What is the arara option used for? Only for debugging? – CarLaTeX Jan 28 '17 at 15:21
5

The draft: yes option for arara is the same as calling

pdflatex -draftmode file

which has the effect of doing everything (macro expansion, command execution, writing to auxiliary files) except producing the final PDF file. This saves some time (not much, actually) because it reduces the number of I/O calls.

The draft option for \documentclass has a very different nature. For the document class itself it doesn't do much, because for the standard classes it just sets \overfullrule to 5pt:

\DeclareOption{draft}{\setlength\overfullrule{5pt}}

but it is passed to every subsequently loaded package; if a package understands it, it will take the appropriate action. For instance, graphicx will disable graphic file inclusion; it will just look at the bounding box and will produce a rectangle with the file name inside. Similarly, microtype will be completely disabled.

Note that the -draftmode command line has nothing to do with the class option. So if you run pdflatex -draft file (the command line option can be abbreviated) and the document loads microtype, it will not be disabled.

Note also that issuing the draft class option for better seeing the overfull boxes should be accompanied by the final option to microtype, lest you don't want different line breaks, which would make draft completely ineffective for its purpose.

When to add draft: yes? Never, but if you'd like to save a few seconds, on all calls to pdflatex except the last one.

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.