Many (all?) document classes have a draft option. Some packages, such as microtype and hyperref, can detect whether or not the class is in draft mode, and take action accordingly.
How do packages know whether or not the document is in draft mode? I see that the memoir class has a draftdoc boolean that is set in draft mode, but this does not appear to be standard among other document classes.
For example:
\documentclass[draft]{article} % or any other class
\begin{document}
\ifdraftmode % pseudo-code. This I what I seek.
yes
\else
no
fi
\end{document}
So, what I want to know is, what would I really test, rather than the fictitious ifdraftmode?
ifdraftpackage that provides the macro\ifdraft{draft mode}{final mode}. – Peter Grill Dec 04 '17 at 05:00ifdraftpackage. Seems pertinent. In my own case, draft mode does more than set an overflow rule, but that's beside the point. – Dec 04 '17 at 15:44ifdraftpackage does what I need, and actually does more than I need, by addressing certain situations. – Dec 04 '17 at 15:49