{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

8
votes
1answer
108 views

Why do I have to place % at the end of line preceding \pstVerb?

Please consider the position of the red dots. First Case When I don't activate \pstVerb{/xxx 1 def}, the red dot is properly positioned. \documentclass[border=12pt]{standalone} ...
3
votes
1answer
99 views

how to comment text depending on a number

I have a latex document with 24 questions labeled with numbers from 1 to 8. I want to give a number x between 1 and 8 to latex in the preamble so that all the questions become commented except the ...
5
votes
1answer
924 views

About autoindent and postbreak in the package listings [closed]

I am using the package listings to show my Matlab code. The code was pre-typed in a file and everything will be loaded from the file and a .tex file will be generated automatically to show the code ...
10
votes
2answers
583 views

macro that defines a comment

The Wikibooks book on LaTeX mentions the following way of defining a macro for (possibly multi-line) comments: \newcommand{\comment}[2]{#2} with the argument that \newcommand{\comment}[1]{} can ...
28
votes
2answers
13k views

Comment out sections of text in bib file

What's the correct way to comment out sections of explanatory text (included for humans to read) in a .bib file? I would like biber/biblatex to simply ignore this text. When I put in text like ...
9
votes
2answers
24k views

How can I comment out a block of text in texmaker?

I use texmaker and some time ago I found, by chance, a way to comment many lines at once, but I can't remember it now. Can somebody remind me of that?
2
votes
4answers
676 views

Problems with % percent sign in fancyvrb inline \Verb

I have some programming language code examples in a fancyvrb \Verb!...! expression. This includes the modulus operator which happens to be a percent sign, e.g. \Verb!(1..100) select: { arg i; i % 7 ...
14
votes
2answers
751 views

Remove everything that is in math mode

The package comment.sty allows one to typeset \begin{comment} stuff that will be suppressed from output file \end{comment} or \begin{myCustomEnv} stuff that will be suppressed from output file ...
3
votes
0answers
45 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
361 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
242 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}
72
votes
5answers
139k 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
35 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 ...
5
votes
2answers
2k 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
152 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
858 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
130 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 ...
17
votes
5answers
3k 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 ...
4
votes
2answers
5k 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} ...
9
votes
1answer
1k 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 ...
26
votes
2answers
2k 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
89 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
2k 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
45 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 ...
8
votes
3answers
16k 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 ...
66
votes
4answers
4k 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 ...
6
votes
1answer
641 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 ...
11
votes
1answer
5k 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
43 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
3k 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
458 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
558 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
327 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
293 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 ...
29
votes
2answers
1k 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
2k 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 ...
10
votes
2answers
420 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
849 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
678 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 ...
40
votes
1answer
20k 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
136 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
274 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
412 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
322 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 ...
8
votes
1answer
851 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 ...
2
votes
1answer
5k 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?
38
votes
3answers
40k views

Multiline comment [duplicate]

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
239 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 ...
36
votes
2answers
684 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, % ...
18
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 ...