99真人注册平台|欢迎注册

LaTeX multiline comments

I often have a need to create LaTeX comments that span multiple lines. You can create single line comments in LaTeX using the percent character like this:

% this is a comment

But I want to be able to create LaTeX comments that go on for multiple lines. Fortunately, once you know that you’re supposed to include the verbatim package, this is pretty easy.

LaTeX multiline comments example

The first step is to include the LaTex verbatim package, like this:

\usepackage{verbatim} 

Do that in the LaTeX document preamble. Then when you want to create a multiline comment, just do this:

\begin{comment}
This is my comment.
Note that it can span multiple lines.
This is very useful.
\end{comment}

That's all you need to do. Feel free to sprinkle your LaTeX documents with all the multiline comments you need now.

99真人注册平台