TransWikia.com

Disable the outlining package in final mode

TeX - LaTeX Asked on April 8, 2021

I am using the outlining package to keep track of what I still need to write in my documents, but I would like it to produce output only in draft mode. The package comes with a disable option, but it ignores the global draft option.

Since I am using the memoir class, which conveniently defines the conditional ifdraftdoc, a possible ugly hack is to put something like this in the preamble:

ifdraftdoc
  usepackage{outlining}
else
  usepackage[disable]{outlining}
fi

However, I would like to know if there is a more elegant solution (aside from hacking the outlining package to support the draft option).

One Answer

A possibility is to test whether you're in draft mode and if you aren't pass the disable option to the outlining package. This can be done with

unlessifdraftdoc
  PassOptionsToPackage{disable}{outlining}
fi
usepackage{outlining}

The unless primitive was added by eTeX and inverts the following TeX if, so the result is pretty much the same as directly putting else after ifdraftdoc to negate it, but unless is a bit faster.

Correct answer by Skillmon on April 8, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP