LaTeX forum ⇒ General ⇒ Conditional To-Do's

LaTeX specific issues not fitting into one of the other forums of this category.
vinp
Posts: 12
Joined: Thu Dec 30, 2010 10:25 am

Conditional To-Do's

Hello board,

I am reworking on my research proposal based on feedback from the review panel. In order to make internal reviewing of the consequent changes (between me and my supervisor) easier, I wish to make use of the ifthen package with the todo package and do something like this.
\ifthenelse{\boolean{draft}}{\todo{Addressing Comment A from Reviewer 1}}{\hfill}

In this way, we could remove all the internal notes by setting the Boolean variable "draft" to false once we have satisfactorily addressed all the reviewer comments, and thus directly generate the final version from the draft.

But the above does not compile. I were to replace the above with this.
\ifthenelse{\boolean{draft}}{\vfill}{\hfill}

But then the compilation goes through.

So I presume that \todo{Addressing Comment A from Reviewer 1} is not allowed in the "then" clause. Any idea why this is so? Can anyone point out what I am doing wrong and possibly a solution to my requirement? I would also ideally not have anything in the else clause and leave it blank, instead of inserting \hfill, which is a mere placeholder. Would really appreciate it if anyone could confirm the appropriateness of this usage.

Many thanks
Vinod

Tags:

cgnieder
Site Moderator
Posts: 1993
Joined: Sat Apr 16, 2011 7:27 pm
Please provide us with a minimal working example that reproduces your problems. The following works fine (except for given an undefined reference):

\documentclass{article} \newif\ifdraft\usepackage{ifthen,todo} \begin{document} draft=false\ifthenelse{\boolean{draft}}{\todo{Addressing Comment A from Reviewer 1}}{\hfill}xxx \drafttruedraft=true\ifthenelse{\boolean{draft}}{\todo{Addressing Comment A from Reviewer 1}}{\hfill}xxx \end{document}

ifthentodo.png (5.3 KiB) Viewed 2286 times

Regards
site moderator & package author