[LyX/master] Fix some regressions with ct-struckout underlined display math

Juergen Spitzmueller spitz at lyx.org
Mon Dec 30 11:44:00 UTC 2019


commit adc90a557005ee94c1d6a4068dfb5d0715932439
Author: Juergen Spitzmueller <spitz at lyx.org>
Date:   Mon Dec 30 13:00:03 2019 +0100

    Fix some regressions with ct-struckout underlined display math
---
 src/LaTeXFeatures.cpp |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp
index 9f65ed4..8ef793c 100644
--- a/src/LaTeXFeatures.cpp
+++ b/src/LaTeXFeatures.cpp
@@ -313,13 +313,18 @@ static docstring const changetracking_xcolor_ulem_object_def = from_ascii(
 	"%% Change tracking with ulem and xcolor: ct markup for complex objects\n"
 	"\\DeclareRobustCommand{\\lyxobjdeleted}[4][]{\\lyxobjectsout{#4}}\n"
 	"\\DeclareRobustCommand{\\lyxdisplayobjdeleted}[4][]{%\n"
+	"  \\ifx#4\\empty\\else%\n"
 	"     \\leavevmode\\\\%\n"
 	"     \\lyxobjectsout{\\parbox{\\linewidth}{#4}}%\n"
+	"  \\fi%\n"
 	"}\n"
 	"\\DeclareRobustCommand{\\lyxudisplayobjdeleted}[4][]{%\n"
+	"  \\ifx#4\\empty\\else%\n"
 	"     \\leavevmode\\\\%\n"
 	"     \\raisebox{-\\belowdisplayshortskip}{%\n"
 	"                \\lyxobjectsout{\\parbox[b]{\\linewidth}{#4}}}%\n"
+	"     \\leavevmode\\\\%\n"
+	"  \\fi%\n"
 	"}\n");
 
 static docstring const changetracking_xcolor_ulem_cb_object_def = from_ascii(
@@ -329,28 +334,38 @@ static docstring const changetracking_xcolor_ulem_cb_object_def = from_ascii(
 	"    \\protect\\cbend%\n"
 	"}\n"
 	"\\DeclareRobustCommand{\\lyxdisplayobjdeleted}[4][]{%\n"
+	"  \\ifx#4\\empty\\else%\n"
 	"    \\leavevmode\\\\%\n"
 	"    \\protect\\cbstart%\n"
 	"    \\lyxobjectsout{\\parbox{\\linewidth}{#4}}%\n"
 	"    \\protect\\cbend%\n"
+	"  \\fi%\n"
 	"}\n"
 	"\\DeclareRobustCommand{\\lyxudisplayobjdeleted}[4][]{%\n"
+	"  \\ifx#4\\empty\\else%\n"
 	"    \\leavevmode\\\\%\n"
 	"    \\raisebox{-\\belowdisplayshortskip}{%\n"
 	"               \\protect\\cbstart%\n"
 	"               \\lyxobjectsout{\\parbox[b]{\\linewidth}{#4}}}%\n"
 	"               \\protect\\cbend%\n"
+	"     \\leavevmode\\\\%\n"
+	"  \\fi%\n"
 	"}\n");
 
 static docstring const changetracking_xcolor_ulem_hyperref_object_def = from_ascii(
 	"%% Change tracking with ulem, xcolor, and hyperref: ct markup for complex objects\n"
 	"\\DeclareRobustCommand{\\lyxobjdeleted}[4][]{\\texorpdfstring{\\lyxobjectsout{#4}}{}}\n"
 	"\\DeclareRobustCommand{\\lyxdisplayobjdeleted}[4][]{%\n"
+	"  \\ifx#4\\empty\\else%\n"
 	"     \\texorpdfstring{\\leavevmode\\\\\\lyxobjectsout{\\parbox{\\linewidth}{#4}}}{}%\n"
+	"  \\fi%\n"
 	"}\n"
 	"\\DeclareRobustCommand{\\lyxudisplayobjdeleted}[4][]{%\n"
+	"  \\ifx#4\\empty\\else%\n"
 	"     \\texorpdfstring{\\leavevmode\\\\\\raisebox{-\\belowdisplayshortskip}{%\n"
 	"                \\lyxobjectsout{\\parbox[b]{\\linewidth}{#4}}}}{}%\n"
+	"     \\leavevmode\\\\%\n"
+	"  \\fi%\n"
 	"}\n");
 
 static docstring const changetracking_xcolor_ulem_hyperref_cb_object_def = from_ascii(
@@ -361,17 +376,22 @@ static docstring const changetracking_xcolor_ulem_hyperref_cb_object_def = from_
 	"    \\protect\\cbend}{}%\n"
 	"}\n"
 	"\\DeclareRobustCommand{\\lyxdisplayobjdeleted}[4][]{%\n"
+	"  \\ifx#4\\empty\\else%\n"
 	"     \\texorpdfstring{\\leavevmode\\\\\\protect\\cbstart%\n"
 	"        \\lyxobjectsout{\\parbox{\\linewidth}{#4}}%\n"
 	"        \\protect\\cbend%\n"
 	"      }{}%\n"
+	"  \\fi%\n"
 	"}\n"
 	"\\DeclareRobustCommand{\\lyxudisplayobjdeleted}[4][]{%\n"
+	"  \\ifx#4\\empty\\else%\n"
 	"     \\texorpdfstring{\\leavevmode\\\\\\protect\\cbstart%\n"
 	"        \\raisebox{-\\belowdisplayshortskip}{%\n"
 	"                   \\lyxobjectsout{\\parbox[b]{\\linewidth}{#4}}%\n"
 	"        }%\n"
+	"      \\leavevmode\\\\%\n"
 	"     }{}%\n"
+	"  \\fi%\n"
 	"}\n");
 
 static docstring const changetracking_none_def = from_ascii(


More information about the lyx-cvs mailing list