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:

% If set to true, comments will be inserted, otherwise ignored
% Internal command
% 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. April 9th, 2020 at 04:10 | #1
  2. April 9th, 2020 at 09:03 | #2

    Incredible a lot of wonderful knowledge. canada pharmacy

  3. April 9th, 2020 at 13:03 | #3
  4. April 9th, 2020 at 20:44 | #4
Comment pages
1 32 33 34 209
  1. No trackbacks yet.