LaTeX definitions of greyedout and lyxdeleted
Udicoudco
udifoglle at gmail.com
Wed Jun 12 18:15:35 UTC 2024
Hello all,
lyxdeleted is a macro used to
mark deleted parts of text when
using "show changes in output"
in track changes. Instead of directly
using \sout there is another helper
macro, \mklyxsout, which is defined as
\DeclareRobustCommand{\mklyxsout}[1]{\ifx\\#1\else\sout{#1}\fi}
If I'm understanding correctly, this macro should test if the argument
#1 is empty, if so it does nothing, otherwise it is feeding the argument
to \sout.
Why is this needed? from testing it appears \sout is just fine
with empty arguments. In addition, I don't think this test is
really robust, I attached an example where the output is wrong.
Since the first object in the deleted part is \\ the comparison
result with the true branch, so \sout is not applied and the \\
is not used.
Now for greyedout. When I tried to add a space at the beginning
of a greyedout inset, LyX complained that I cannot add space
at the beginning of a paragraph, although it is not the start of
a paragraph. Then I tried to forcefully add that space in an ERT
but couldn't as I discovered later that greyedout use \ignorespaces
in its definition. Is this really needed? That feels really restrictive and
non intuitive to me.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: newfile1.lyx
Type: application/x-lyx
Size: 2380 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20240612/c18d43a6/attachment-0001.lyx>
More information about the lyx-devel
mailing list