{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
1answer
40 views

Insert a Comment as a special footnote, marked by author and with the option to hide

Well, I am writing my PhD. In this phase I am passing the nearly finished text for revision. I want to give it with certain comments aimed to the tutor, and hide them and show another corpus of ...
0
votes
0answers
13 views

Is it possible to change the output for each \excludecomment or \includecomment (comments package)?

I am trying to avoid modularizing a document into separate files (because it gets translated into 10 languages!) Instead, I am trying my luck with the comments package. Let's say I have three ...
4
votes
1answer
62 views

Instructor student version

I have a student manual for a set of chemistry labs. Over the years the instructors have made their own annotations and other pointers/observations. I have now collated these and wish to produce an ...
4
votes
2answers
7k 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} \begin{...
3
votes
0answers
63 views

Shrink student's book page to add comment to teacher in textbook

we are writing a school textbook and the corresponding teacher's book. The student's book template is good already, so let me explain what I would like to have for the teacher's book. Each page of ...
1
vote
2answers
90 views

How to comment part of a line? [duplicate]

I am writing a text which I will review later again and want to comment out only a part of a line (in between), something like this: Once upon a time, there was %in some galaxy far away% a nice and ...
4
votes
2answers
461 views

Commenting out a few words within a paragraph?

Is there anyway by which I can comment out a word within a sentence?
3
votes
1answer
85 views

Comment Package: Problem when using German Special Character “ß” (Similar to “ss”) [duplicate]

I am preparing a bilingual document and using the comment package to distinguish between the two languages. When I use the special character ß in a comment environment then I get an error message (...
1
vote
1answer
30 views

pdfcomment highlight doesn't work

I am using MikTex 2.9. I would like my text to be highlighted and I would like a comment to it. But my MWE below doesnot work.PLease help \documentclass{report} \usepackage{graphicx} \usepackage[...
1
vote
1answer
15 views

How to create simple comments in a margin next to the Document?

I've been digging through tons of SE-sites, package documentations for reledmac and parallel and many other pages, but I couldn't find the simple answer to this question. So, in hopes that it might ...
40
votes
1answer
2k views

Handwritten comments and annotations in margin

Is it possible to typeset handritten comments and annotations in the margins around a parapgaph like in this example? What would be the closest approximation of this done in LaTeX?
2
votes
1answer
38 views

Use \(end)comment instead of \begin/\end{comment}

In my document, the comment environment works fine, but \comment and \endcomment stop processing of what comes next in the document: \documentclass{article} \usepackage{verbatim} \begin{document} X \...
2
votes
1answer
45 views

Multiline Matlab comments in package Listings

I am using the package listings to include some Matlab code in my report. It works well with comments beginning by % but does not recognise multiline comments %{ ... %}: \usepackage{listings} \lstset{...
1
vote
2answers
36 views

Out-of-slide comment environment in Beamer

I've just read Comment package does not work in beamer explaining how, for \begin{comment} etc. \end{comment} to work, it needs to go inside a 'Fragile' frame. But what if I want an out-of-frame ...
1
vote
1answer
92 views

Any way to color in gray/red the text between \iffalse and \fi (like comments)?

Is there a way to change the color of the text between \iffalse.. and \fi, so to make it more (or less) visible? I mean something like the gray color which is given to comments when using %. ...
23
votes
7answers
4k 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 ...
2
votes
0answers
29 views

How to put on and off comments while publishing latex documents into PDF [duplicate]

I created a file using TeXstudio, I have lots of comments in the document. I want publish the document one version with the comments and the other without it. Is three a way to put on and off comments ...
14
votes
2answers
40k 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?
0
votes
0answers
32 views

Beginner method to learn LaTeX [duplicate]

I start practice on LaTeX for mathematics text and I want to know what would recommend me some that get it learn easy.
4
votes
1answer
27 views

Place comment after while statement in algorithmic

I am having some trouble placing plain text in my algorithm using the algorithmic package. The problem only seems to occur after a '\WHILE' command. I need to start my 'while' loop, then immediately ...
1
vote
1answer
29 views

Include optional text versions within one file [closed]

I'm still new to LaTeX and I'm not sure if this can be done, so here goes: I've got two .tex files, there pretty similar and instead of updating them individually, which as got to be a pain. I want ...
177
votes
10answers
231k 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 % ...
0
votes
1answer
23 views

Why should I escape my line endings? [duplicate]

I've seen many LaTeX Code Snippets like this one here \AddToShipoutPictureBG{% \AtPageUpperLeft{% {\color{red}% \rule[-1cm]%offset PageBorder {\paperwidth}%{14....
2
votes
0answers
48 views

Ignoring part of text between command

I'm trying to write a custom class similar to exam but I want to add the following fonctionality : a question can be hidden depending on some boolean value. When using an environment, it works, but I ...
2
votes
2answers
36 views

How can I make the symbol \\ tiny in algorithm2e? [closed]

I would like to write a tiny comment in algorithm2e. I typed \tcp*[l]{ {\tiny Here is my comment.} } My problem is that the symbol // right before the comment is large. I tried to make it tiny but ...
1
vote
0answers
22 views

texmaker commenting in math mode colors

Can you set the color of comments in math mode to be grey like normal comments? For instance \begin{array}{cl} \min & \tr XBX^T \\ \text{s.t.} & |Xe-2e|^2=0, \\ & ...
0
votes
0answers
8 views

How do I tell Kile to keep hidden comments hidden after reopening the file?

I have written a long comment in Kile, and I have hidden it from the source by clicking on the arrowhead on the left side of the text. Whenever I reopen Kile, however, the comment appears again, and ...
7
votes
2answers
145 views

Comments/tips on a (non Latex) pdf including mathematical formulas

My goal : I correct copies from students that I scan to pdf. I wish I could make the annotations on the scanned copies rather than on the physical paper. Today, I have to scan the copies again to have ...
86
votes
6answers
117k 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?
15
votes
1answer
1k 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 ...
79
votes
4answers
6k 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 ...
2
votes
1answer
58 views

Multiple Space Hacks Generate More Space

This is a follow-up to a recent post: Creating removable comment command without extra space. I'm trying to do a common thing: make a removable comment command so contributors to a document can leave ...
3
votes
1answer
61 views

Creating removable comment command without extra space

I'm trying to create a command we can use for comments in our document. During development, we want the comments to appear; for production, we want them to disappear. This is a common enough problem ...
1
vote
0answers
39 views

Can I supply multiple compilation flags to the ConTeXt binary?

I can only provide one (1) compilation flag to ConTeXt binary via a commented line at the top of a ConTeXt input file. input.tex % engine=luatex \starttext hello, world \stoptext compile input.tex ...
2
votes
3answers
48 views

Right-justifying a comment for an equation that uses leqno

I'm unable to get the formatting correct when attempting to add a comment to an equation that uses leqno. Ideally, I'd like the equation to remain centered regardless of whether or not it is numbered. ...
2
votes
0answers
44 views

pdf annotations

There is a package pdfcomments to place annotations in the pdf. However, when producing DVI output, yap gives errors. I do not mind not seeing the annotations in the DVI, but I do mind seeing the ...
5
votes
2answers
128 views

Comment-like environments and spacing

I often need to "turn off" environments. One way I do this is below in my minimal working example: \documentclass{article} \newenvironment{nothing}{\setbox0\vbox\bgroup} {\egroup} \begin{document} ...
0
votes
0answers
78 views

Percent sign in URL without hyperref

Suppose you want to create a URL that has embedded % signs. One option is to just use \%, but you don't get the benefit of nice line breaks. Another option is to use the hyperref package and its \...
1
vote
1answer
26 views

How to disable pdfmarkupcomment?

I filled my thesis with lot of pdfmarkupcomments which come as a part of the package pdfcomment. Is there a way to disable this comments globally. Or should I go manually to every place I made it and ...
4
votes
1answer
129 views

Setting style for Python docstrings in lstinputlisting environment

I am using the listings package for source code in my LaTeX document. I am trying to set the style for docstrings in the Python programming language: \documentclass{article} \usepackage{listings} \...
2
votes
2answers
129 views

Is there an in-line comment system, convention or program?

When writing papers such as this one https://github.com/geneura-papers/2015-Evostar/blob/b9474f66cd45aee316136831c4a9b4acaef4e89f/GPbot/GPbot-evostar2015.tex, we use LaTeX comments for, well, ...
13
votes
1answer
230 views

What kind of data can be gleaned from a PDF created in LaTeX?

As I use LaTeX for the creation of many of my business instruments, and since I send these all over the world to different clients I just wanted to know if there are any data embedded in a PDF that ...
47
votes
1answer
25k views

Personal notes when preparing a talk with LaTeX-beamer class

Suppose I prepare a talk using the beamer class. To each slide I want to add personal notes (detailing what I exactly want to say, frequently asked questions etc.). So is there a smart way to write ...
5
votes
1answer
7k 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?
0
votes
1answer
59 views

How to enable unicode within comment section? (package “comment”) [duplicate]

In following MWE, letters with an accent that are within the personalized comment environment are generating following errors while compiling with pdflatex: ! Package inputenc Error: Unicode char �...
0
votes
0answers
25 views

Changing footnotes/endnotes into hidden comments or annotations

So I have a rather large dissertation that currently contains footnotes and endnotes (using \makepagenote). The final document can only contain footnotes. Some of the \pagenote{ ... } material will ...
2
votes
0answers
53 views

Knitr Plot Tooltips for ADA Compliance

I would like to use Knitr to generate plots in R that have hover-over tooltips. Here is a working example without an R tooltip: \documentclass{article} \usepackage{pdfcomment} \begin{...
16
votes
2answers
490 views

Does the comment symbol % remove the carriage return at the end of the line?

I find LaTeX a little bit inconsistent on this. Do the following experiments: The code a.% b will produce a.b, while the code a. b will produce a. b. Looks like the comment symbol % has ...
2
votes
0answers
45 views

Listings - Getting the colors right for custom language

I have lots of bookkeeping transactions that I would like to typeset in a color coded format. I am using the listings package to accomplish what I want. I tried the following code. \documentclass[...
0
votes
1answer
55 views

How to use the comment package within a footnote?

The comment package provides for different comment environments which one can selectively in- or exclude via a switch in the preamble. I haven't found out yet how to get it to work in footnotes yet ...