% starts an end-of-line comment in LaTeX. Is there any way I comment an entire paragraph without putting a % in front of each individual line?
Note: I write my LaTeX code in texmaker.
% starts an end-of-line comment in LaTeX. Is there any way I comment an entire paragraph without putting a % in front of each individual line?
Note: I write my LaTeX code in texmaker.
The verbatim package provides a comment environment for dealing with chunks of the input:

\documentclass{article}
\usepackage{verbatim}
\begin{document}
Normal text that will be printed.
\begin{comment}
Text and other input \( x^2 \) that will be ignored.
\section{Heading}
\label{sec:heading}
Even this heading.
\end{comment}
Further material that will be printed.
\end{document}
verbatim is part the standard distributions. What error do you get?
– Andrew Swann
Jan 14 '14 at 13:47
comment as it is really easy to miss that this is commented out (unless your editor is good a coloring the contents of the comment env). Most LaTeX friendly editors mark outcommented lines very visually and is thus prefered
– daleif
Jan 14 '14 at 13:47
If the question is how to comment a block of text without manually adding a % at the beginning of each line, you can do the following in texmaker.
Select the block of text you want to comment and hit
Cmd + T to comment, and
Cmd + U to uncomment.
Select the block of text you want to comment and hit
Ctrl + T to comment, and
Ctrl + U to uncomment.
Ctrl-t to react in my virtual Win7 either. You will have to choose comment from the Edit menu using the mouse. Might also be an idea to report this to the developers. (Though this may be an effect of the virtualizaition software I use)
– daleif
Jan 14 '14 at 14:11
There is a comment package for this exact functionality and more.
\documentclass{article}
\usepackage{comment}
\begin{document}
A
\begin{comment}
XYZ
\end{comment}
\end{document}
Ctrl+{(=Ctrl+Shift+[on English keyboard). – yo' Jan 14 '14 at 13:36OutcommentorComment out– daleif Jan 14 '14 at 13:37texmakerthe comment and uncomment are in theEditmenu. Comment out isCtrl-tand uncomment isCtrl-u, just highlight the reqion to be commented and hitCtrl-t. – daleif Jan 14 '14 at 14:04