I have added the package \usepackage{comment}
in my .tex file. But when I am adding \begin{comment}
and \end{comment}
it is not commenting the text I want to comment. What to do?
[Tex/LaTex] Comment package not working
comments
comments
I have added the package \usepackage{comment}
in my .tex file. But when I am adding \begin{comment}
and \end{comment}
it is not commenting the text I want to comment. What to do?
Best Answer
I have attempted to reproduce this problem, and have only been able to come up with only one way to do that. And that is to have the following after the
comment
package is included:So, if you un-comment this line the MWE below, you get the behavior you describe. With it commented, the text in red and blue does NOT show up in the output. So, check your preamble add see if there is something else that is redefining the behavior of the
comment
environment.If you have another way of reproducing this behaviour, please add a MWE.
Note:
As @Ignasi commented, the
\begin{comment}
and\end{comment}
need to be their own line with nothing else on that line (except for possibly trailing white space such as tabs). No space before the\end{comment}
is allowed. Even a comment%
character seems to results in:Code: