comment latex code example
Example 1: latex long comments
\documentclass{article}
\usepackage{verbatim} %You can use long comments from this package
\begin{document}
This text will be displayed
\begin{comment}
This text will not be displayed.
\end{comment}
\end{document}
Example 2: comment in latex
%this is a comment (use percent sign %)
Example 3: latex math comment formula
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
3+x &=4 && \text{we are trying to solve for } x\\
x &=4-3 && \text{Subtract 3 from both sides}\\
x &=1 && x \text{ must be one}
\end{align*}
\end{document}