GeneralComment out a whole section?

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
haaj86
Posts: 21
Joined: Mon Apr 06, 2009 11:18 pm

Comment out a whole section?

Post by haaj86 »

Hi, is there a way to comment out a whole section? I tried to google it but as far I can see latex doesn't have the feature that programming softwares have, i.e. by using some command, e.g /*, such as /*asdfasdfasdf*/ where everything in between is commented. Is this correct?
Also, do you know if texniccenter has a tool that will, for example, add the % sign in front of a selected text? The problem is that I have some errors, and I need to select some parts of the text and comment it out so I can track the error, but a tool that will comment out a selected text will be useful anyways.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

haaj86
Posts: 21
Joined: Mon Apr 06, 2009 11:18 pm

Comment out a whole section?

Post by haaj86 »

I found a way,

Code: Select all

\usepackage{comment} 
…
\begin{comment}
  …
\end{comment}
Sorry, I will be more patient next time, and I will make sure that I really can't find the answer before posting a question here. But I'm still curious to see if there is more ways.
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Re: Comment out a whole section?

Post by gmedina »

Hi,

in TeXnicCenter you can select a block of text and then use Ctrl+Q to comment it out. The inverse operation is done with Ctrl+W.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
haaj86
Posts: 21
Joined: Mon Apr 06, 2009 11:18 pm

Re: Comment out a whole section?

Post by haaj86 »

Thank you this is precisely what I was looking for.
Post Reply