{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

3
votes
0answers
40 views

Is there an easy way to comment out a whole block? [duplicate]

Possible Duplicate: Multi-line (block) comments in LaTeX Is it possible to comment out a whole block in LaTeX source? For example, like in Java: // This is an in-line comment. /* This ...
6
votes
1answer
255 views

ConTeXt: Enumeration, Comments cause undefined control sequence startformula error

I'm a LaTeX user working through some ConTeXt tutorials, and hit a brick wall pretty early. It makes me wonder if something is wrong with my setup, or if I'm not understanding something pretty ...
6
votes
1answer
152 views

Percent signs disappearing from verbatim block (ltxdoc class)

Is the following expected: \documentclass{ltxdoc} \begin{document} \begin{verbatim} % why is my percent sign gone? \relax % not here \end{verbatim} \end{document}
27
votes
4answers
42k views

Multi-line (block) comments in LaTeX

In LaTeX, % can be used for single-line comments. For multi-line comments, the following command is available in the verbatim package. \begin{comment} Commented code \end{comment} But is there a ...
1
vote
0answers
33 views

Hiding and revealing interlaced paragraphs [duplicate]

Possible Duplicate: Commenting out large sections I am writing a document and I want to prepare two versions. Version 1 will contain the 'text'. Version 2 will contain the 'text' as well ...
1
vote
2answers
748 views

Is there are way to annotate pdfs with LaTeX? [duplicate]

Possible Duplicate: How to annotate PDF files generated by pdflatex? Is there a way to annotate pdfs with LaTeX annotations? I mean a pdf that I do not have the source code for (or may not ...
7
votes
1answer
127 views

Environment prints same character at beginning of each output line

I am writing a Latex document with pseudocode interspersed with theorems and discussion. Some of the comments in the pseudocode are long. I would like to automatically start (and end) each output line ...
1
vote
1answer
460 views

listings-package custom language use space as comment-delimiter

I'm creating a custom language definition with the LaTeX listings package that should render Java's Jar-Manifest files (key: value Pairs) so that one can easily distinguish key and value. My approach ...
2
votes
0answers
122 views

The meaning of the percent sign in LaTeX coding [duplicate]

Possible Duplicate: What is the use of percent signs (%) at the end of lines? I know that % is commonly used to uncomment parts of the code, but recently I read that there is another use ...
10
votes
2answers
1k views

Utility to Strip Comments from LaTeX Source

I've a LaTeX source. I'm ready %for submission %But first I would like to strip its comments. So I hope there are 100\% auto ways to get this done. \begin{comment} Because there are subtle ways ...
3
votes
1answer
2k views

Align comments in algorithm with package algorithm2e

I am using the package algorithm2e. When using comments like this \documentclass[11pt,a4paper,twoside,openright]{book} \usepackage[algochapter,linesnumbered,ruled,lined,boxed]{algorithm2e} ...
7
votes
1answer
517 views

Delete comments in tex file with Emacs+Auctex

I am working with other people LaTeX files and sometimes they look very messed up. I am looking for a way to delete all comments without changing the code. The problem is that I want to preserve all ...
25
votes
2answers
1k views

Mouseover events in beamer: hovering on \eqref and a comment containing the original equation popping up

This idea came into my mind while I was listening to a speaker presenting his results in a seminar, he used lots of equation references in his later slides, however I can't remember which equation he ...
1
vote
0answers
74 views

URL with % won't display in bibliography [duplicate]

Possible Duplicate: URL for “article” (and other) entries of the bib file? URL of cited web site in bibliography I am trying to put a long URL into my bibliography. In the preamble I have ...
20
votes
5answers
1k views

Comment out lines without using % and comment enviroment

I would like to ask something which will greatly facilitate my work. But before, I introduce you to the problem I face. In my attempt to gather my notes for my students and give them something more ...
2
votes
0answers
41 views

Aligning comments that break in several lines? [duplicate]

Possible Duplicate: How to align comments with lstlistings? I want to include Matlab code with long comments. The next MWE shows that it is achieved by using the listings package. However I ...
7
votes
3answers
3k views

Percent signs - “comment” and “active” both at once?

I convert documents from Word a lot, and I often forget to escape %, which leads to pieces of text missing. So I would like the following to happen in the main document body: escaped \% working as ...
53
votes
3answers
2k views

When and why should I use % !TEX TS-program and % !TEX encoding?

Occasionally, I see other people's documents starting with two lines like that: % !TEX TS-program = xelatex % !TEX encoding = UTF-8 Unicode It's clear to me that the first line declares the engine ...
4
votes
1answer
353 views

comment package - \excludecomment{} gives error

I'm trying to generate a pdf file without the pictures for draft revision, and as seen here and here the \excludecomment{} is not working for me. Here is my error: line 31: Extra }, or forgotten ...
9
votes
1answer
2k views

Vertical spacing before and after equation environment: empty line or not?

The vertical spacing in front of and behind the amsmath equation environment is different whether I insert a blank line or not (im using KOMA-Script with parskip=half if this is important). I'd like ...
1
vote
0answers
40 views

Hidden environment [duplicate]

Possible Duplicate: Suppressing remarks when not needed Is there a way that I can define a new environment in my manuscript which will only be typeset when a flag is activated? Otherwise ...
7
votes
2answers
1k views

Add comments to bibliography

In chemistry journals one often notices bibliography entries which contain a comment, cf. attachment. How to get such results using BibTeX/LaTeX?
3
votes
1answer
324 views

Colorboxes that break across pages

I am trying to build an environment/command that allows me to place comments in the text. The idea is to have colored box that can break across pages and use the \ttfamily font with hyphenation. I ...
2
votes
0answers
356 views

Insert a block comment title in Kile [closed]

I would like to know whether it is possible in Kile to define a script to insert a centered commented block. I often mark different parts of my code with those kind of titles: ...
3
votes
1answer
225 views

Problems with nested comments and figures

Now this problem is probably too localized, but I do not see anywhere else to get help solving it. I have a large amount of important files, and these stopped compiling after switching from MikTex to ...
3
votes
1answer
242 views

cleanest way to part answers from questions

I am still typesetting old exams, and I turn to you lads and lassies for help. At the moment I have most of the actual exams typed in, and is currently typing in answers for them. The problem I run ...
27
votes
2answers
768 views

Are comments safely hidden once the document is compiled?

This is kind of similar to some of the pdf to latex questions but from a different angle. I'm not looking for a complete LaTeX reconstruction method, I want to know if the comments are safely hidden. ...
6
votes
6answers
1k views

How to comment in an R-chunk?

I'm quite new to both R and LaTeX, but I'm trying to work with both, using Sweave. I know you can comment in R using # and in LaTeX by using %. However, when I write a #comment in an R-chunk (between ...
9
votes
2answers
320 views

How to manage comments in lecture notes?

In the university I'm currently attending a lecture where no lecture notes exist. I want to tex what the professor has written on the blackboard. I'm gonna include comments (things that my professor ...
4
votes
1answer
501 views

Avoid comment style for URLs in code listings

I using the following settings for code listings. \usepackage{listings} \usepackage{textcomp} \lstset{language=Java, keywordstyle=\color{RoyalBlue}, basicstyle=\scriptsize\ttfamily, ...
4
votes
1answer
508 views

Compile only outline and comments/ Synopsis view

Since I am about to quit using orgmode for my PHD I am wondering whether something like a synopsis package exists (google didn't give me an answer about that). What I need: I have a short synopsis of ...
26
votes
1answer
12k views

Personal notes when preparing a talk with LaTeX-beamer class

Suppose I prepare a talk using the beamer class. To each slides I want to take personal notes (what I exactly want to say, frequently asked questions etc.). So is there a smart way to write those ...
9
votes
1answer
130 views

Add area for readers to write comments on a page

I would expect this question to have already been answered, but I could not find an answer on point, so I am looking for thoughts and suggestions. The problem is as follows: I have a document which I ...
4
votes
1answer
219 views

Comment Multi-line Text on Counter Condition

I have a document which I want to print in several (let's say 10) different versions. Some parts are just a draft, others are more or less finished, some are ready for publication and so on. I would ...
3
votes
2answers
278 views

Problem with \specialcomment-command and equation/align-environments

I'm using the specialcomment-command from the comment package around equation and align environments. This leads to an unwanted blank line after the math environment. When just using the simple ...
5
votes
1answer
258 views

Suppressing remarks when not needed

I have written some remarks in some of my works that are somewhat informal and repetitive in nature (mainly for my own clarification). I was wondering if there is a way of suppressing them when I ...
7
votes
1answer
537 views

hide proof environment for restructuring

I am writing my thesis, and i am in restructuring phase - sorting theorems where they should belong thematically. And it would be helpful to have all the proofs hidden so i am not laden with the ...
0
votes
1answer
3k views

Comment package not working

I have added the package \usepackage{comment} in my .tex file. But when I am adding \begin{comment} and \end{comment} it is not commenting the text I want to comment. What to do?
28
votes
3answers
21k views

Multiline comment

In tex there is a way to do a comment multiline like in C, C++ /* comment */ or in HTML <!-- comment -->? I'm currently using \ifx \ifx true false My multiline comment that will not be in the ...
5
votes
1answer
177 views

Can latexmk be told to ignore specific intermediate files completely?

One latex run suffices to generate the DVI/PDF version of the LaTeX document \documentclass{article} \usepackage{comment} \includecomment{comment} \begin{document} \begin{comment} \noindent ...
35
votes
2answers
642 views

When or why should I use %% as opposed to %?

I've noticed that many (all?) style and class files have "documentation blocks" with a double comment character at the beginning of the line, %% like so instead of the usual style of comments, % ...
17
votes
2answers
8k views

Block comments with *% and %*

I know the package comment which allows to use : \begin{comment} Lines to comment \end{comment} This is not very friendly to use. I would like to have the following possibility: *% Lines to ...
4
votes
4answers
7k views

How do you add a comment to pseudocode in LaTeX?

Is there a special formatting to add comments to code? I mean I want to show comments in pseudocode that I write in LaTeX. this is code // this is comment part (the part that I want) Edit: To be ...
9
votes
3answers
1k views

Skip compilation of parts of a document [duplicate]

Possible Duplicate: Commenting out large sections I have a long document where sometimes I need to omit some parts for the compilation, and sometimes other parts. I do it by just commenting ...
0
votes
1answer
176 views

convention for marking LaTeX in programming comments?

Is there a convention for marking the beginning of LaTeX-based material placed inside the comments of (say) a C++ or Python program? Or does one simply jump into LaTeX syntax?
9
votes
5answers
1k views

\newenvironment issues with environment comment

I am trying to setup the formatting for a LaTeX document (it's got the class memoir), so that it would be fairly simple to add to it in the future. Two of the features I'd like are: Be able to mark ...
3
votes
1answer
910 views

Enable PDF commenting with TexShop

I'm using TexShop (Mac OS 10.5) to typeset a manuscript and I would like to share the generated PDF with some colleagues. In the process, I would like to add some comments to the generated PDF and ...
48
votes
1answer
17k views

Comments in BibTex

Basic question (though I haven't found it here): How do I comment out parts (some lines within an entry which I would like to save for later) of a BibTex file? Apparently, @ can be used to comment ...
24
votes
3answers
735 views

Seeking review on a document with people unfamiliar with TeX

I am a great fan of TeX, LaTeX and LyX, but recently I wrote some minutes and then tried to send them off for other people to review. There was no way I could send a TeX file; no-one would know what ...
38
votes
3answers
994 views

Where are the necessary places to be appended with % to remove unwanted spaces?

I have experience where empty spaces cause unwanted effects. It is not easy to trace the cause of these unwanted effects. In order to eliminate any doubt, I often overuse % as follows. \usepackage% ...