Go to the previous, next section.

Commenting

It is often necessary to comment out temporarily a region of TeX or LaTeX code. This can be done with the commands C-c ; and C-c %. C-c ; will comment out all lines in the current region, while C-c % will comment out the current paragraph. To uncomment, simply type C-u - C-c ; to uncomment all lines in the region, or C-u - C-c % uncomment all comment lines around point.

By default, these commands will insert or remove a single `%'. To insert more than one, give an argument. C-u 5 C-c % will add five `%' to each line, while C-u - 5 C-c % will remove up to 5 `%' from each line.

Command: TeX-comment-region count

(C-c ;) Add or remove `%' from the beginning of each line in the current region, as specified by count.

Command: TeX-comment-paragraph count

(C-c %) Add or remove `%' from the beginning of each line in the current paragraph, as specified by count. When removing `%''s the paragraph is considered to consist of all preceding and succeeding lines starting with a `%', until the first non-comment line.

Go to the previous, next section.