{comments} are annotations written by a user to document their code. A common package used for comments in code, apart from the traditional use of %, is the comment package.

learn more… | top users | synonyms

1
vote
1answer
137 views

matching comment environments, no longer able to comment out text

I have a long LaTeX document and I am trying to comment out lines of text using \begin{comment} text \end{comment} and while compiling the document I have the interpreter giving out: <recently ...
75
votes
9answers
50k views

Commenting out large sections

So to "comment out" a line, I need to insert a % at the beginning of the line (so that line will not be compiled). Is there way to comment out a large section without having to manually putting a % ...
7
votes
1answer
783 views

Source Code Margin Comments

In the paper "Beautiful Code Compelling Evidence", by J.R. Heard -- Code is formated in a particular way which includes margin comments. I am looking for a way to do this as I think it is a very clear ...
0
votes
0answers
128 views

Environment for NOT compiling things [duplicate]

Possible Duplicate: 'Dummy' LaTeX environment Since the explanation why on earth I need this is longer than the actual question, I begin with the latter. I would like to define an ...
1
vote
2answers
859 views

In Lyx turn greyed out text into comments

In Lyx I would like to convert greyed out text into comments. The Lyx environment is lyxgreyedout. I have considered switching to another IDE already and it is not an acceptable solution. The ...
6
votes
1answer
3k views

How can I escape % in a lstlisting?

I have a little lstlisting to show a snippet of code but since the code has % in it for modulo calculation the listing breaks down. How can I escape it? I have tried the backslash, verbatim and \text ...
8
votes
1answer
1k views

Inline comments in LaTeX

Is it possible to make inline comments in LaTeX that do not extend until the end of the line? The actual problem I'm trying to solve is vim's annoying highlighting of the non-curly end-bracket here: ...
5
votes
1answer
2k views

\excludecomment and \newcommand using it

I have a problem with \excludecomment from comment package and a \newcommand. The following codes work good, which means, it can generate the desired pdf output. \documentclass{article} ...
38
votes
4answers
32k views

How to write hidden notes in a LaTeX file?

How can I write notes in a LaTeX file, that don't appear in the PDF file?
11
votes
1answer
5k views

LaTeX Listings Package, No Line Number for Comments

I am trying to get only the actual code to be line numbered rather than both code and comments. Example: \lstset{basicstyle=\footnotesize, xleftmargin=40pt, frame = single, numbers = left,caption = ...
118
votes
4answers
5k views

What is the use of percent signs (%) at the end of lines?

I see that the code in many packages and examples contains percent signs % at the end of (many) lines. What are they used for? Do they affect the parsing of those lines?
11
votes
2answers
632 views

Create an annotation for table text on the page border

I have a table with 2 columns (for vocables, but also complete sentences) and for one of these 2 columns I want to add annotations on the page border. It must however be possible to associate the ...
28
votes
7answers
2k views

What is a good strategy for obtaining comments on a LaTeX document from non-LaTeX using collaborators?

Context: I prepare my scientific documents using LaTeX and compile to a PDF. I often need to seek comments on drafts from collaborators who do not use LaTeX. Most of these collaborators use Windows ...
13
votes
5answers
1k views

Including parts of a LaTeX document in another document WITHOUT splitting up original document

I'm working on a paper with some collaborators. At the same time, I'm writing my dissertation for my defense next month. I need to include the paper in the dissertation, but it doesn't just become a ...
7
votes
4answers
2k views

Latex tag for making a comment appear or disappear in pdf?

Is it possible to tag sections of your .tex file so that you can make text appear or not? I have a long document and would like to be able to comment a certain section in each chapter, and produce ...
9
votes
2answers
1k views

'Dummy' LaTeX environment

I have a big LaTeX file which I would like to compile so that certain environments like figure are not shown. To that end I wanted to make use of the renewenvironment command. But the facilities of ...
1
vote
1answer
632 views

In WinEdt 6, how do I highlight a block of just typed text with no effect on the compiled document? [closed]

I hope WinEdt6 is recognised as one of the best LaTeX's friends. I write my latex stuff, and when a para is considered done, I want to \done{the completed para text} so that it differ from what I ...