tags:

views:

174

answers:

3

In Latex, I've created a new command 'changedtext' to mark specifics parts in my document and make it appear blue:

\newcommand{\changedtext}[1]{\textcolor{blue}{#1} }

Is there any easy way to alter the command to have change bars appear next to the text in the resulting PDF? If not possible, any other suggestion for a visual markup (other than change bars) that would be clear on a black & white printout would be useful as well.

+2  A: 

Use one of the changebar macro packages in your command.

Aaron Digulla
Hmm, this solution has quite some restrictions. I've tried the changebar package, and inserted a \cbstart and \cbend in my command, by this creates problems when I use my command for example in formulas.
Rabarberski
A: 

Some half-baked solution (not satisfactory) I just came up with myself, is the use of \marginpar to have some arbitrary indication in the margin, e.g.:

\newcommand{\changedtext}[1]{\textcolor{blue}{#1 \marginpar{r1}} }

will put the text 'r1' (from revision 1) in the margin.

However, when using this, the \changedtext command can not be used everywhere (e.g. in formulas, captions) because LateX will complain (in my case) about 'float(s) lost'.

Still,it might be useful to some people...

Rabarberski
+1  A: 

One other way which would be very clear in B&W would be highlight (shows as gray background).

Use packages soul and color and define your highlight color:

\usepackage{soul}
\usepackage{color}
\definecolor{lightgray}{rgb}{.92,.92,.92}
\sethlcolor{lightgray}

Now you can use \hl{highlighted text} in text to highlight.

Cloudanger
Hadn't thought of that, nice idea !
Rabarberski