I'm currently working on a document in which I need to indicate things to be done in a draft version, and I'd like to produce a final version where todos are hidden. The todonotes
package features a disable
option which is supposed to achieve this; it does remove todos defined with the \todo
command, but it fails on my custom commands like this one:
\newcommand{\minortodo}[2][]{\todo[color=green, #1]{#2}}
The final PDF's output when using \minortodo[inline]{change this to that}
is exactly [inline]change this to that
. How do I go about telling todonotes
to hide these instances as well? (note: removing inline does not solve the problem).
EDIT: the following minimal working example (thanks for the suggestion) suggests that the problem has another origin; this works as expected (i.e. minor todo's disappear too):
\documentclass{book}
\usepackage[disable]{todonotes}
\newcommand{\minortodo}[2][]{\todo[color=magenta, #1]{#2}}
\begin{document}
Here's some text.
\todo[inline]{this todo goes away}
\minortodo[inline]{this one too}
\end{document}
In my actual document, I use the book
class and load the following packages, but adding them to the MWE still causes no problem. The actual source of my document is a markdown file processed with pandoc with no template of my own, so I guess I'll have to look into what pandoc inserts that yields this behaviour.
\usepackage{minitoc}\dominitoc
\usepackage{dot2texi}
\usepackage{tikz}
\usetikzlibrary{matrix}
\usetikzlibrary{shapes,arrows}
\usepackage{fancyvrb}
\usepackage{tabulary}
\usepackage{todonotes}
\usepackage{varwidth}
\newboolean{boolhidetodonotes} \setboolean{boolhidetodonotes}{false} \ifthenelse{\boolean{boolhidetodonotes}}% {\renewcommand{\minortodo}[2][]{\relax}}%if bool=TRUE: makes \minortodo do nothing {}%else: do nothing
. Change\setboolean{boolhidetodonotes}{false}
into\setboolean{boolhidetodonotes}{true}
to make your\minortodo
notes disappear.\begin{document}text \todo{to do}\par more text \minortodo{more to do}\end{document}