I've been giving the changes package a try, but have been unable to figure out how to change the default color for changes. There does not seem any obvious way to do so. I'm using version 5.2 in TeX Live 2009. The current version is 5.4 but not much has changed. For example, the default for added text is blue, but I don't see any way to change this to something other than blue. I see there is some option to add author-specific colorcoding (using \definechangesauthor
), but I don't want that. I just want to change the default. At first glance, it looks like passing a color option to xcolor might work (something like \usepackage[xcolor=orange]{changes}
), but it doesn't do anything.
5 Answers
Just a short explanation: you have to change AuthorColor too, otherwise the authorname is still blue in the list of changes.
Greetings, Ekkart.
-
If you want to post the full answer as in your quoted email, please do so, and I will delete the answer I posted. Aug 12, 2011 at 23:21
-
No, I just wanted to explain the code you posted but I obviously hit the wrong button so my text was not beneath yours. Sorry for disturbing you.– etgAug 13, 2011 at 17:48
-
For anyone who might come across this question later, Ekkart's full answer (sent to me by email) appears here posted by me. Dec 21, 2011 at 20:54
-
@FaheemMitha I think you should delete your own answer and propose an edit to this post instead. Or accept your own answer. It took me a while to scroll down… the currently accepted answer is not really helpful.– slhckApr 7, 2017 at 9:58
Originally, changes.sty
calls
\definechangesauthor{\@empty}{blue}
This command calls \colorlet{Changes@Color#2}{#3}
with these two values. You could do the same just with another color, so you don't need to add an author. Just write in your preamble for example:
\colorlet{Changes@Color}{red}
You can do this on a per author basis with the \definechangesauthor
command. Changing Changes@Color
(with \colorlet
) will change the color for remarks with no associated author. A little example:
\documentclass{book}
\usepackage{changes}
\usepackage{lipsum}
\definechangesauthor[name={Gonzalo Medina}, color=orange]{GM}
\definechangesauthor[name={John Doe}, color=blue]{JD}
\colorlet{Changes@Color}{green}
\begin{document}
Some \added[id=GM]{new text} added in the example by GM. Some \added[id=JD]{new text} added in the example by JD. Some \added{new text} added in the example.
\end{document}
When you load the change
package you can assign several arguments, one of that is defaultcolor
, see the code below
\usepackage[markup=underlined, defaultcolor=red]{changes}
For more information, review the package documentation.
Ekkart Kleinod, one of the authors of this package, responded to this question by email, so I'm posting it here on his behalf with his permission.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Hi Faheem,
I was trying to use your package "changes". Maybe I'm missing something,
but there does not seem to be an obvious way to change the default color
for changes.
You are right, I did not think of this. In order to change the default
color e.g. to magenta, please write the following code before
\begin{document}
:
\makeatletter
\@namedef{Changes@AuthorColor}{magenta}
\colorlet{Changes@Color}{magenta}
\makeatother
I made an entry for this in the open discussion and a bug report, so I
can change this in future releases to a real option.
http://sourceforge.net/projects/changes/forums/forum/960823/topic/4653653
You can see an example in my test file:
http://changes.svn.sourceforge.net/viewvc/changes/trunk/texmf/source/latex/changes/test.tex?revision=34&view=markup
I hope I was able to help,
keep TeXing,
Regards, Ekkart.
-
1How do I have color depend not on author but on whether something is added, replaced or deleted? Say, green, blue or red? May 9, 2020 at 2:46