On Mon, Sep 28, 2015 at 05:27:44PM +0200, Jean-Marc Lasgouttes wrote: > Le 27/09/2015 08:47, Scott Kostyshak a écrit : > >If there are changes from multiple authors in a LyX file, the LyX > >display shows different colors for each author. But when "Show changes > >in output" is checked, the PDF only uses one color to show changes. > >Attached is an example file. > > > >The LaTeX shows that this is expected: > >\DeclareRobustCommand{\lyxadded}[3]{{\color{lyxadded}{}#3}} > > > >In other words, the color does not depend on the author. We do call > >\lyxadded with the name of the author though. > > The author name and the date are output for tex2lyx' sake IIRC.
Ah good to know. > >If we want to improve this, I see a few possibilities: > > > >1. Because \lyxadded passes the author name, we could have the color > >depend on the name. I'm not sure of the best way to do this. > > The color associated to an author could be defined in preamble > > \lyxchangescolor{scott}{blue} > > It might be that the color should be passed using some other form (rgb?) > > I can write the requested macros once we know what the interface is. > > >2. \lyxadded could pass a color as an additional argument. > > For backwards compatibility, it could be an optional argument > \lyxadded[blue]{author}{date}{text} Good idea. I catch myself postponing thinking about backwards compatibility until a later stage. I hope that someday I will learn to think about it immediately, as I should. > It would be nice also if the author and date were put to use at least in PDF > form. Is there a way to define a tooltip with hyperref? Yes this would indeed be nice. > After searching a bit, I founf pdfcomment.sty, but it seems that only > acrobat reader shows these. Maybe a subset of the features are cross-platform? I compiled the PDF-comment.lyx file and in Okular I could see some of the annotations. I suppose we just need one to work, and that if it doesn't work the PDF still displays correctly, just without the feature. Scott > > JMarc