GeneralConditional To-Do's

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

Conditional To-Do's

Post by vinp »

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.

Code: Select all

\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.

Code: Select all

\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

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Conditional To-Do's

Post by cgnieder »

Please provide us with a Infominimal working example that reproduces your problems. The following works fine (except for given an undefined reference):

Code: Select all

\documentclass{article}

\newif\ifdraft
\usepackage{ifthen,todo}

\begin{document}

draft=false
\ifthenelse{\boolean{draft}}{\todo{Addressing Comment A from Reviewer 1}}{\hfill}
xxx

\drafttrue
draft=true
\ifthenelse{\boolean{draft}}{\todo{Addressing Comment A from Reviewer 1}}{\hfill}
xxx

\end{document}
ifthentodo.png
ifthentodo.png (5.3 KiB) Viewed 3364 times
Regards
site moderator & package author
Post Reply