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

comments

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

\begin{comment}
Commented code
\end{comment}

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
#endif

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

\iffalse
I don't want this to happen
\fi

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