TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 would like to share with a number of individuals for them to write in their comments. I would like to shrink the width of the page or text line, and then add an area on the right. An example would be:

Phasellus tempor! Scelerisque          ________________________
platea mattis sit, lorem sed.          ________________________
Pid, cursus sit platea quis eu,        ________________________
sociis urna turpis adipiscing?         ________________________

In ac, habitasse, vel lundium.         ________________________
Porttitor? Tincidunt sociis, ut        ________________________
dapibus ultricies a. Mid duis cum      ________________________
in pid! Lacus. Parturient cum          ________________________

Elementum tincidunt! Dolor urna,       ________________________
sed eu, nascetur ut! Ultrices auctor,  ________________________
cras pellentesque parturient placerat  ________________________
rhoncus ac turpis hac, placerat vut.   ________________________

My first inclination is to use marginpar, but I wanted to see if there were other, preferable options.

As seen in the example, my preference would be to have comment lines corresponding to paragraphs i.e. where there is no text on the left, there needn't be space for comments on the right.

I would also like to be able to turn off this area for leaving comment at the flip of a switch, so to speak i.e. return the margin widths/etc to normal and not add the lines. I do not expect this would be too difficult.

Incidentally, I am using the todonotes and lineno packages with memoir, so I would like a solution that does not break their functionality.

share|improve this question
I am not sure the "comments" tag means in this question what it generally means on this forum. :) – Brian M. Hunt Mar 15 '12 at 18:14
up vote 5 down vote accepted

Since you use lineno package anyways, I made a solution based on this package. You have to have the numbers on and placed on the left to make it work, as in the following example. We introduce a command \PrintCommentLine which prints the line and we add this macro to the macro \makeLineNumberLeft that takes care of line number printing. You can as well easily switch it off.



\iftrue % change to \iffalse to switch it off
  \hbox to 0pt{\PrintCommentLine\hss}}



share|improve this answer
This is an excellent solution. – Yiannis Lazarides Mar 15 '12 at 22:17
@YiannisLazarides Thanks. Such solutions are just about recognizing who have done the snippet you need ;) – yo' Mar 15 '12 at 22:25
Sure and a lot of reading:) – Yiannis Lazarides Mar 15 '12 at 22:26
yes, and a lot of shell commands like locate lineno.sty | xargs gedit ;) – yo' Mar 15 '12 at 22:40
This is elegant. Thank you. – Brian M. Hunt Mar 15 '12 at 22:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.