Remove underline from tracked changes?

Rasmus K. Rendsvig rendsvig at gmail.com
Fri Sep 24 08:59:38 UTC 2021


On Thu, 23 Sep 2021, 19:52 Scott Kostyshak, <skostysh at lyx.org> wrote:

> On Thu, Sep 23, 2021 at 06:45:51PM +0200, Rasmus K. Rendsvig wrote:
> > >
> > > On Thu, Sep 23, 2021 at 02:32:55PM +0200, Rasmus K. Rendsvig wrote:
> > > > Hi LyX devs,
> > > >
> > > > I tried asking this on the users' list a few weeks ago, but perhaps I
> > > > should have asked here instead:
> > > >
> > > > I find that the underlining of added text when tracking changes is a
> bit
> > > > distracting. I would like to disable just the underlining.
> > > >
> > > > Is there any way I can do that? I will happily attempt to edit the
> source
> > > > and compile myself.
> > > >
> > > > Kind regards,
> > > > Rasmus
> > >
> > > Hi Rasmus,
> > >
> > > Thanks for following up and sorry you didn't get a response on
> lyx-users.
> > >
> > > In LyX 2.4.0 (not yet released), there will be a preference to control
> > > whether added text is underlined in LyX's display. You can see how it
> will
> > > look in the attached screenshot.
> > >
> > > In case you're curious, here was the feature request that was
> implemented:
> > > https://www.lyx.org/trac/ticket/10102
> > >
> > > If this issue is annoying enough that you would like to test a
> pre-release
> > > of 2.4.0, we can give you information on that. The main problem is
> that any
> > > LyX file you save with a 2.4.0 pre-release could not be opened in LyX
> > > 2.3.x, meaning that if you are working with someone else, they would
> also
> > > have to use a 2.4.0 pre-release. So it's best to wait until 2.4.0 is
> > > officially released if you can.
> > >
> > > Best,
> > > Scott
> > >
> >
> > Hi Scott,
> >
> > Thank you for the quick reply, and I apologize if I now reply in an
> > incorrect format: I was digest subscribed.
>
> Your reply went to the list so that worked well.
>
> > Also thank you for the information. I'm torn on using 2.4.0, as most of
> the
> > work I that involves track changes also involves collaborators. I am
> > curious to try it for fun, though, and see packages listed in the
> > development ppa.
> >
> > Since you do not mention five lines of code that I could possibly edit in
> > the source code of 2.3.6, I suppose the matter is not as easily as that.
> >
> > Again, thank you for the quick reply.
> > As with every new release, I will look forward to 2.4.0.
>
> Actually it might take even less than 5 lines of code to change it. You
> can see the fix here:
>
>
> https://git.lyx.org/?p=lyx.git;a=commitdiff;h=8e62dcc20fc226deb7fb48a9934391d2f9a0c712;hp=7c63896c601f43ced313b74e04336235ff09212e
>
> On a quick look, my guess is that it would be feasible to modify 2.3.x.
> Are you on Linux? If you can compile LyX, then we can take a look to see
> how difficult it would be to backport the relevant code. Most of the diff
> above is about adding a preference, but you just wanted "no underline"
> hardcoded so you don't need to actually have the code about the preference.
>
> Best,
> Scott
>

That would be great! I'd be very happy with a hardcoded solution until
2.4.0!

I'm on Linux, yes. Pop!_OS 21.04, which is Ubuntu-based. I run Wayland, if
that matters. I am in no way an experienced source code editor and have
zero experience with C++, so I hope that you will bear with me.

LyX 2.3.6 now compiles and runs on my machine.
In a bit of detail, then I git checkout'ed the 2.3.6 branch, and configured
it with `.autogen.sh` and then `./configure --enable-qt5
--with-qt-dir=/usr/share/qt5/`, and ran `make`. `src/lyx` runs, but prints
`QSocketNotifier: Can only be used with threads started with QThread`.

To get to the point of compiling and running, I installed the following
packages, following advice found when searching for the errors I encoutered:
`automake gettext libice-dev libqt5svg5-dev libqt5x11extras5-dev
qtbase5-dev qtwayland5`

I looked at the fix you linked, and tried to make sense of it. In
`/src/Changes.cpp`, I tried commenting out lines 564--566 to render the
INSERTED case empty like the UNCHANGED case:

     case UNCHANGED:
         return;
     case INSERTED:
     //pi.pain.line(int(x1), int(y2) + 1, int(x2), int(y2) + 1,
     //             color(), Painter::line_solid,
     //             pi.base.solidLineThickness());
         return;
     case DELETED: ...

Running `make clean && make && src/lyx`, and that did *not* do it. That may
of course be because that code has nothing to do with the issue, or because
I re-compile in the wrong way.

In any case, then I would appreciate a word of advice at this juncture.

Best,
Rasmus

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20210924/87dc4b59/attachment.html>


More information about the lyx-devel mailing list