{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

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 ...
3
votes
0answers
62 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
89 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 ...
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
1k 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 \...
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 ...
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 ...
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 ...
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 ...
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
35 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 ...
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
128 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} \...
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 ...
4
votes
2answers
457 views

Commenting out a few words within a paragraph?

Is there anyway by which I can comment out a word within a sentence?
0
votes
1answer
54 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 ...
3
votes
1answer
40 views

Hide indented amsthm environment using comment package

I use amsthm to define a "Solution" environment. I want to be able to hide it. Following this comment I tried using the comment package: \documentclass{article} \usepackage{amsthm} \newtheorem*{...
3
votes
1answer
73 views

When to use % and when to not [duplicate]

I have recently falled into an error because I didn't use % when I was supposed to. My question is now: When do I have to use % at the end of the line and when should I leave it out?
3
votes
0answers
35 views

Unrecognized special character with comment package [duplicate]

Why are the character with accent not recognized ? \documentclass[a4paper]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[french]{babel} \usepackage{comment} \...
4
votes
1answer
51 views

How to nest comment and theorem in one environment?

I'm using comment and amsthm packages for comments and theorems. I'd like to skip some theorems. I've tried to create a new environment with theorem nested in a comment: \documentclass{book} \...
9
votes
2answers
205 views

Ghost environment

I am trying to do the following. I would like a part of my source to be compiled normally by to generate no output. In particlular, I would like references made to the ghosted parts to be produce the ...
0
votes
0answers
48 views

How to fix comment indentation of code using the listings package?

My problem is that the code itself is indented correctly, but the comments (e.g. //comment) are not. In my source file, I aligned comments in one column by using tabs. In the pdf produced by LaTeX, ...
7
votes
1answer
125 views

Problems with comment package when comment contains diacritical characters

I often use comment package to include various comments to have possibility of creating output with omitting various temporarily comments However, recently I found out that I have problems when ...
3
votes
2answers
90 views

Framed minipage and `comments` package

I am preparing a classroom workbook with two versions: one with answers and one without. The student version has big, empty, framed boxes to handwrite their answers. The teacher version has suggested ...
8
votes
2answers
175 views

'Missing \begin{document}' when using the \lowercase trick

Mostly for fun, I'm trying to make % comments manipulatable using the \lowercase trick. For some reason, I'm getting a strange (to me) error: ERROR: LaTeX Error: Missing \begin{document}. --- TeX ...
6
votes
4answers
179 views

Conditional choice of version

I have a document with several sets of questions clustered in different versions. I would like to be able to choose which version to generate with a single parameter. The document is updated ...
3
votes
0answers
31 views

Can I force a pre-process action on all commands or environments without having to redefine them all manually?

I am trying to preserve a history of the latex commands and environment initializations I use in a typeset html or pdf file. Is there a way where I can force a pre-process action on all commands ...
6
votes
1answer
1k views

Are comments discouraged in a BibTeX file?

biber complains about "junk" in what should be seen rather as commented-out lines in a BibTeX file. I was wondering if comments are discouraged in BibTeX at all. \documentclass {article} \...
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 %. ...