LaTeX forum ⇒ GeneralConditional To-Do's

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

Conditional To-Do's

Postby vinp » Fri May 03, 2013 3:42 pm

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

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

Postby cgnieder » Sat May 04, 2013 1:56 pm

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

  1. \documentclass{article}
  3. \newif\ifdraft
  4. \usepackage{ifthen,todo}
  6. \begin{document}
  8. draft=false
  9. \ifthenelse{\boolean{draft}}{\todo{Addressing Comment A from Reviewer 1}}{\hfill}
  10. xxx
  12. \drafttrue
  13. draft=true
  14. \ifthenelse{\boolean{draft}}{\todo{Addressing Comment A from Reviewer 1}}{\hfill}
  15. xxx
  17. \end{document}

ifthentodo.png (5.3 KiB) Viewed 2447 times

site moderator & package author

Return to “General”

Who is online

Users browsing this forum: No registered users and 20 guests