"}}\n"
"\\DeclareRobustCommand{\\lyxsout}[1]{\\ifx\\\\#1\\else\\sout{#1}\\fi}\n");
-static docstring const changetracking_tikz_math_sout_def = from_ascii(
- "%% Strike out display math with tikz\n"
+static docstring const changetracking_tikz_object_sout_def = from_ascii(
+ "%% Strike out display math and text objects with tikz\n"
"\\usepackage{tikz}\n"
"\\usetikzlibrary{calc}\n"
- "\\newcommand{\\lyxmathsout}[1]{%\n"
- " \\tikz[baseline=(math.base)]{\n"
- " \\node[inner sep=0pt,outer sep=0pt](math){#1};\n"
- " \\draw($(math.south west)+(2em,.5em)$)--($(math.north east)-(2em,.5em)$);\n"
+ "\\newcommand{\\lyxobjectsout}[1]{%\n"
+ " \\tikz[baseline=(obj.base)]{\n"
+ " \\node[inner sep=0pt,outer sep=0pt](obj){#1};\n"
+ " \\draw($(obj.south west)+(2em,.5em)$)--($(obj.north east)-(2em,.5em)$);\n"
" }\n"
"}\n");
}
}
- if (mustProvide("ct-tikz-math-sout"))
- macros << changetracking_tikz_math_sout_def;
+ if (mustProvide("ct-tikz-object-sout"))
+ macros << changetracking_tikz_object_sout_def;
if (mustProvide("ct-none"))
macros << changetracking_none_def;
if (runparams.moving_arg)
before += "\\protect";
+ if (runparams.inDeletedInset) {
+ before += "\\lyxobjectsout{";
+ after += "}";
+ }
+
// We never use the starred form, we use the "clip" option instead.
before += "\\includegraphics";
if (contains(rel_file, "."))
features.require("lyxdot");
}
+ if (features.inDeletedInset())
+ features.require("ct-tikz-object-sout");
}
if (os.strikeoutMath()) {
if (os.ulemCmd() == WriteStream::UNDERLINE)
os << "\\raisebox{-\\belowdisplayshortskip}{"
- "\\lyxmathsout{\\parbox[b]{\\linewidth}{";
+ "\\lyxobjectsout{\\parbox[b]{\\linewidth}{";
else
- os << "\\lyxmathsout{\\parbox{\\linewidth}{";
+ os << "\\lyxobjectsout{\\parbox{\\linewidth}{";
} else if (os.ulemCmd() == WriteStream::UNDERLINE)
os << "\\raisebox{-\\belowdisplayshortskip}{"
"\\parbox[b]{\\linewidth}{";
from_ascii("\\newcommand{\\endregexp}{}"));
} else if (outerDisplay() && features.inDeletedInset()
&& !features.mustProvide("ct-dvipost")) {
- features.require("ct-tikz-math-sout");
+ features.require("ct-tikz-object-sout");
}
// Validation is necessary only if not using AMS math.