Home > English, Linux & Programming > Conditional Commenting in LaTeX

Conditional Commenting in LaTeX

In my Ph.D. thesis are quite a lot of comments/reminders for myself. I defined two commands for this, one for a red footnote and one for red bold text. But if someone else is to read parts of the document, he shouldn’t necessarily see all my comments, so I was searching for a method to suppress all comments with a single flag. I found the package ifthen and it’s exactly what I was looking for. If you need to use comments for yourself in a document you’re writing, consider using the following:

\usepackage{ifthen}
\usepackage{color}
...
\newboolean{showComments}
% If set to true, comments will be inserted, otherwise ignored
\setboolean{showComments}{true}
...
% Internal command
\newcommand{\todocmd}[1]{{\bf\textcolor{red}{#1}}}
 
% use \todo{text} for a comment within your page/section
\newcommand{\todo}[1]{\ifthenelse {\boolean{showComments}} {\todocmd{#1}} {}}
 
% use todof{text} for a footnote
\newcommand{\todof}[1]{\ifthenelse {\boolean{showComments}} {\footnote{\todocmd{#1}}} {}}
Categories: English, Linux & Programming Tags:
  1. Wayneved
    January 27th, 2020 at 08:47 | #1

    Exceptionally alcohol amicable website. Astounding details close by on few clicks on. karine testosteron

  2. January 27th, 2020 at 14:44 | #2

    prwppn viagra online without prescription drugs medications
    buy viagra online without prescription there generic cialis

  3. Wayneved
    January 27th, 2020 at 17:21 | #3

    I like this place – its so usefull and helpfull. http://nl.musclemass.space/spiermassa-kuur/

  4. Wayneved
    January 27th, 2020 at 21:42 | #4

    Thanks bloody valuable. Wish certainly portion website with my friends. okoubaka entgiftung

  5. January 28th, 2020 at 03:21 | #5

    vfonpn no prescription viagra cialis online canada
    canadian viagra pharmacy cialis viagra

  6. Wayneved
    January 28th, 2020 at 03:47 | #6

    Provide for up the stunning agitate !! Lovin’ it! http://bkproma.it/balanite-da-sfregamento/

  7. January 28th, 2020 at 04:01 | #7

    Just be positive that the those that you interview pertain to your market of one’s blog. It is simply that if something can be searched, very useful searched. You can use trivia questions if you want.

  8. Wayneved
    January 28th, 2020 at 08:08 | #8

    The info is incredibly absorbing. http://azizapublishing.com/gemiddelde-penis-lengte/

  9. Wayneved
    January 28th, 2020 at 12:30 | #9

    Uncommonly distinctive amicable placement. Tremendous info available on connect of clicks on. http://ko21.fr/methode-pecunia-avis/

  10. Wayneved
    January 28th, 2020 at 16:53 | #10

    Sustain the super job and bringing in the claque! http://ko21.fr/le-deseo-un-buen-dia/

  11. Wayneved
    January 28th, 2020 at 21:15 | #11

    Thanks meant as a replacement for giving these types of unreal info.
    http://fr.musclemass.space/aliments-proteines-pour-musculation/

  12. Wayneved
    January 29th, 2020 at 01:38 | #12

    You’re a completely advantageous website; could not make it without ya! http://publica-pr.de/ginseng-als-potenzmittel/

  13. WayneSpign
    January 29th, 2020 at 02:43 | #13
  14. Wayneved
    January 29th, 2020 at 06:02 | #14
  15. Wayneved
    January 29th, 2020 at 10:30 | #15

    Really wanted to emphasize Now i am delighted that i came onto your website age! aliment booster testosterone

  16. Wayneved
    January 29th, 2020 at 14:57 | #16

    I bent this website – its so usefull and helpfull. how to increase testosterone level

  17. January 29th, 2020 at 18:03 | #17
  18. Wayneved
    January 29th, 2020 at 19:26 | #18

    Delight the locate– extraordinarily separate friendly and predominantly lots to envision! meilleure testosterone

Comment pages
1 21 22 23 209
  1. No trackbacks yet.

*