Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

If I insert a couple of new paragraphs in my long text I want to mark the new section somehow so that others can see I edited this part and it is not yet corrected.

I also want to be able to remove the "this is new text" markings very easily. Ideally they should show up with one or two lines in a diff or so.

Currently I use a text color that spans several paragraphs. That works quite well with \begingroup and \endgroup:

\begingroup \color{tcolortodo}

    More the none paragraph, ... lists, tables, etc.

\endgroup

But I often print my stuff on a black-and-white printer. So, the only other possibility that comes to mind would be a black line or bar alongside the new paragraphs. How do I do that?

share|improve this question
    
tex.ac.uk/cgi-bin/texfaq2html?label=changebars may be useful. –  Ant Sep 24 '11 at 18:27
add comment

1 Answer

up vote 6 down vote accepted

You can do this using the changebar package. In the following minimal example, the use of colour (red) merely highlights the changes as reflected by the contents between \cbstart and \cbend:

\documentclass{article}
\usepackage[pdftex]{changebar}% http://ctan.org/pkg/changebar
\usepackage{xcolor}% http://ctan.org/pkg/xcolor
\begin{document}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam et urna odio. 
Suspendisse vitae lacus orci. Morbi neque metus, sollicitudin eget varius 
at, malesuada a urna. Integer bibendum quam ultrices est interdum a 
placerat sem aliquet. Sed ipsum tellus, hendrerit eu iaculis eget, 
facilisis a purus. Mauris id justo ligula, sed facilisis neque. Praesent 
mauris mi, ultrices nec sodales ut, mollis at quam. Cras a est a mauris 
ullamcorper aliquet. Nunc risus turpis, iaculis vel fermentum id, gravida 
at nulla. Nam condimentum semper lectus. In et sollicitudin sem. Nunc nunc 
ante, dapibus non luctus nec, laoreet vel leo. Fusce lorem risus, 
fermentum in aliquet sed, pellentesque at est. Nam nec tempor eros.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam et urna odio. 
Suspendisse vitae lacus orci. Morbi neque metus, sollicitudin eget varius 
at, malesuada a urna. \cbstart{\color{red}In magna erat, suscipit vitae rutrum sit 
amet, condimentum at velit. Aenean semper quam sed dolor malesuada id 
aliquet mi fringilla.}\cbend\ Mauris id justo ligula, sed facilisis neque. 
Praesent mauris mi, ultrices nec sodales ut, mollis at quam. Cras a est a 
mauris ullamcorper aliquet. Nunc risus turpis, iaculis vel fermentum id, 
gravida at nulla. Nam condimentum semper lectus. In et sollicitudin sem. 
Nunc nunc ante, dapibus non luctus nec, laoreet vel leo. Fusce lorem risus, 
fermentum in aliquet sed, pellentesque at est. Nam nec tempor eros.

\end{document}

Changebars used to identify changes in text

The package also provides a changebar environment if needed. See the package documentation for more information on this, as well as changing the colour of the bar:

\usepackage[pdftex,color]{changebar}% http://ctan.org/pkg/changebar
\cbcolor{black}% Change bar colour is black

If you want to remove the changes, you can modify the commands \cbstart and \cbend in your document by means of (say)

\let\cbstart\relax % Void \cbstart
\let\cbend\relax % Void \cbend

or by using the provided \nochangebars.

PS. I specified the driver as pdftex. You need to modify this depending on your compiling sequence. Again, this is contained in the package documentation.

share|improve this answer
    
Yes, seemed to work for a moment with the option dvips. But I happen to try it for a whole chapter, that seems to make some trouble. I will play around with it and leave my colors in, to be on the safe side. –  towi Sep 24 '11 at 21:07
    
tsss... got it now. If I add \cbstart[1cm] I get a slim gray bar in the whole chapter, but the footnotes have a 1cm bar. strange, but serves the purpose. (more curiosity: the footnotes get the given setting, but the text bar get the setting from the last run, when I chnage the \cbstart[width] option. anyway, its perfect.) –  towi Sep 24 '11 at 21:09
    
The bar is not placed correctly when multiple paragraphs and/or page-breaks are involved. –  SabreWolfy Oct 2 '12 at 7:47
add comment

Your Answer

 
discard

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.