[Tex/LaTex] Multi-line (block) comments in LaTeX


In LaTeX, % can be used for single-line comments. For multi-line comments, the following command is available in the verbatim package.

Commented code

But is there a simple command like /* code */ in C?

Best Answer

Following the C code paradigm, where one can use the preprocessor directives

#if 0
junk code

something similar can be done in TeX (and descendants):

I don't want this to happen

The commented parts can be easily activated by replacing \iffalse with \iftrue.