131

I wonder which changes are made by the draft option?

That means what will be changed by calling it as global class option (\documentclass[draft]{<class>}) or locally for a single package if it is available (\usepackage[draft]){<package>}.


Note
I know that this depends on the loaded packages and if they react on the draft option or not. But I thought it could be helpful to have a overview which packages do what.

I suggest the answers to be CW and using this layout

Package/Class: `name`  
Changes

- one
- two

Has `final` option too: yes/no

If you like we can discuss the layout in meta …

Tobi
  • 56,353
  • 9
    While I like your question, I don't see a point in adding several CW answers. Why not write a single answer covering everything you know (with appropriate sections) and let other users add their knowledge either in separate answers (provided your answer was non-CW) or by editing your (CW) answer? – lockstep Mar 24 '12 at 18:31
  • 3
    @lockstep: Hm … I though it’s a little more tidy in separate answers. And furthermore the answers can be sorted by importance/relevance by upvoting them. If you comment get’s 5 upvotes (do we call it upvotes for comments too?) I’ll merge the CW answers. – Tobi Mar 24 '12 at 18:38
  • Several packages for setting someting in the page background, e.g draftmark or xwatermark, have a draft and final option, but I was too lazy to search for, what it means in each case. – Speravir Mar 25 '12 at 01:17
  • 3
    @IlmariKaronen: The question shouldn’t explain it. For that we have the answers below. And since it depends on the packages one can’t say what the option does in general ;-) – Tobi Mar 25 '12 at 08:23
  • @lockstep: I decided to make an overview answer and keeping the more detailed single answers. I guess thats a good compromise, isn’t it? I’ll stick the overview to the top by accepting as soon as it is possible to accept my own answer. – Tobi Mar 25 '12 at 09:56
  • @Tobi a) It's at least better than the current situation ;-) b) Self-accepted answers don't flow to the top automatically -- they have to have the highest score, too. – lockstep Mar 25 '12 at 09:59
  • @lockstep: b) OK, than I’ll hope that it get’s the highest votes … Since it’s CW it won’t influence my reputation if we upvote it to make it the top answer … – Tobi Mar 25 '12 at 10:01
  • @lockstep: b) woud’t it be possible that you copy my overview answer in a new CW answer. Then it should be sticked to the top even if it’s not the one with the highest votes …? – Tobi Mar 25 '12 at 10:11
  • @Tobi: I didn't mean you should say what it does, but what it is (as in, an option to \documentclass which can (sometimes?) also be set and/or overridden on a per-package basis). Of course, maybe that really belongs in the [tag:draft] tag wiki; I'd write it if I actually had a clue what to write there. – Ilmari Karonen Mar 25 '12 at 16:21
  • Explaining the draft option to a document class and draftmode to latex or pdflatex may be interesting as well. – kiss my armpit Mar 25 '12 at 18:22
  • @DamienWalters: I think that the draft (class) option and (pdf)latex’s -draftmode are too different to be covered in the same question. I suggest you ask “What does -draftmode do?” or something like that and we can link both questions. – Tobi Mar 26 '12 at 15:07

18 Answers18

76

Overview

Please add your answer here in alphabetical order too

Classes

Print a box at the end of overfull lines.
See this answer below for a list of classes and details.

Packages

The links lead to the answers below.

  • changes (final disables markup of changes, and list of changes)

  • cryptocode (disables syntax highlighting to reduce compilation time)

  • flowfram (show frame, typeblock and margin bounding boxes)

  • graphics (draw frames instead of including images)

  • graphicx (draw frames instead of including images)

  • hyperref (disable all linking features)

  • listings (don’t include external files)

  • listofsymbols (final suppresses printing of macro names and unused symbols)

  • mfpic (assume every latex run to be the first one)

  • pdfcomment (final suppresses the comments)

  • pdfpages (don’t include external file but print a frame box)

  • pgf (similar to graphics/x: all images will be replaced by empty rectangles)

  • pstricks (no native support, but a workaround)

  • showkeys (draft shows the labels, the default option)

  • showlabels (draft shows the labels, the default option)

  • thumbs (thumbs' width=2pt, thumbs' text=black, thumbs' color=grey)

  • todonotes (with obeyDraft package only enabled in draft mode)

  • varioref (turn warnings in error messages)

Related questions:

Robert
  • 14,181
  • 1
  • 52
  • 77
Tobi
  • 56,353
21

Package: microtype

  • The draft option no longer exists, but can be emulated by loading the package with disable=ifdraft:

    If the disable option is passed to the package, all micro-typographic extensions will be disabled, which may lead to different line, and hence even page, breaks. This option replaces the draft option from earlier versions, which could be inherited from the class options; to restore the previous behaviour, you may pass the value ifdraft: in this case, the disable option will be set to true if and only if the document class has been loaded with the draft option.

Has final option: no

Robert
  • 14,181
  • 1
  • 52
  • 77
egreg
  • 1,121,712
13

Document classes

Standard: article, book, report
AMS: amsart, amsbook, amsproc
KOMA-Script: scrartcl, scrbook, scrreprt, scrlttr2
Other: proc, memoir

Changes:

  • Print a mark for overfull lines

    overfull rule

Have final option too: yes

Related questions:

Tobi
  • 56,353
11

Package: graphicx
Changes

  • Prints frames containing the file name instead of including the images

    draft final

Has final option too: yes

Tobi
  • 56,353
  • 3
    While it wasn't asked for directly, I think the demo option should also be mention where you don't need the actual figure and you get a black box. – StrongBad Mar 25 '12 at 18:58
9

Package: showkeys

  • draft is the default setting

Has final option: yes, it disables all package functionality.

yo'
  • 51,322
8

Package: varioref
Changes:

  • Turn error messages into warnings.

Has final option: yes

yo'
  • 51,322
7

Package: hyperref

Changes:

  • Turns all hypertext options off

final option: yes

Tobi
  • 56,353
Speravir
  • 19,491
6

Package: listings
Changes

  • Doesn’t include external file but prints their caption and makes their labels.

    draft

    final

Has final option too: yes

Tobi
  • 56,353
  • 2
    How can I suppress this behaviour, or have it render a box of the SAME size as the listing, so that my DRAFT documents layout isn't heavily modified when the input listings disappear... – Nicholas Hamilton Nov 12 '13 at 12:31
  • 2
    You can pass the final option directly to a package, while the draft class option stays active for the class and other packages without the explicit option. I.e. \documentclass[draft]{article} ... \usepackage[final]{listings} ... – Tobi Nov 12 '13 at 12:47
  • My experience is that draft mode even inhibits the display of regular lstlisting environment listings; i.e., not only code from external files. – Jim Ratliff Sep 30 '18 at 20:07
5

Package: pdfcomment

  • Option draft is the default.

Changes with final option:

“PDF annotations will not be typeset and will not influence line breaking.”

(In other words: The lines will change, if inline annotations have been used.)

Speravir
  • 19,491
4

Package: listofsymbols
Changes:

  • Option draft is default with this package.
  • Option final removes the macronames from the lists. Symbols that are not used in the document are omitted from the List of Symbols and from the List of Subscripts.

Has final option too: yes (see above)

yo'
  • 51,322
3

Package: pdfpages
Changes

  • Does not insert pages, but prints a box and the filename instead.

Has final option too: yes

yo'
  • 51,322
3

Package pgf (but not TikZ)

Changes:

  • All images will be replaced by empty rectangles.

final option: yes

L. F.
  • 796
Speravir
  • 19,491
2

Package: changes

  • Option draft is the default.

Changes with final option:

The final-option disables markup of changes, only the correct text will be shown. The list of changes is disabled, too.

Speravir
  • 19,491
2

Package: flowfram

Changes:

  • Shows the bounding boxes with identifying tags for each frame, the typeblock and the margins.

Example:

\documentclass{article}

\usepackage{lipsum}
\usepackage[draft]{flowfram}

\twocolumntop{static}{1in}

\setstaticcontents{1}{Top Area}

\begin{document}

\marginpar{Marginal Note}\lipsum*[1]

\lipsum*[2-3]\marginpar{Margin Note 2}

\end{document}

image of document

Has final option:

image of document in final mode

Nicola Talbot
  • 41,153
2

Package: mfpic
Changes:

  • Treats any pdflatex run as the first run, pretending figure files have not been created.

Has final option too: yes

Dan
  • 6,899
yo'
  • 51,322
2

package: thumbs

Changes:

Option draft (not the default) sets the thumb mark width to 2 pt, thumb mark text colour to black and thumb mark background colour to grey (gray). Either do not use this option with the thumbs package at all, or use draft=false, or final, or final=true to get the original appearance of the thumb marks.

final option: yes

Stephen
  • 14,890
1

Package: todonotes

Note: there are no changes while using draft or final unless changes are made to the todonotes package options.

  • option obeyDraft: will display the to do notes (only output the todos/todolist if in "draft mode")

Changes using final:

  • option obeyFinal: will not display the to do notes (suppress output of the todos/todolist if in "final mode")
1

Package: pstricks

While the package pstricks does not support the class option draft, it is possible to add this behaviour:

  • All pspicture environments will be replaced by white space. PSTricks commands will be ignored.

To do so use LaTeX's internal test for document class options \@ifclasswith (c.f. stackexchange question here):

\usepackage{pstricks}
\makeatletter
\@ifclasswith{article}{draft}{\PSTricksOff}{}
\makeatother

Change the article in line 3 to whatever class you have in use.

fborchers
  • 465
  • 2
  • 13