mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-23 16:52:02 +00:00
parent
117e63b01b
commit
7c63896c60
@ -299,10 +299,13 @@ static docstring const changetracking_tikz_object_sout_def = from_ascii(
|
||||
"\\usepackage{tikz}\n"
|
||||
"\\usetikzlibrary{calc}\n"
|
||||
"\\newcommand{\\lyxobjectsout}[1]{%\n"
|
||||
" \\bgroup%\n"
|
||||
" \\color{lyxdeleted}%\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"
|
||||
" \\egroup%\n"
|
||||
"}\n");
|
||||
|
||||
static docstring const changetracking_none_def = from_ascii(
|
||||
|
@ -322,6 +322,9 @@ void InsetFloat::validate(LaTeXFeatures & features) const
|
||||
if (features.inFloat())
|
||||
features.require("subfig");
|
||||
|
||||
if (features.inDeletedInset())
|
||||
features.require("ct-tikz-object-sout");
|
||||
|
||||
features.useFloat(params_.type, features.inFloat());
|
||||
features.inFloat(true);
|
||||
InsetCaptionable::validate(features);
|
||||
@ -435,6 +438,11 @@ void InsetFloat::latex(otexstream & os, OutputParams const & runparams_in) const
|
||||
os << '[' << from_ascii(placement) << ']';
|
||||
os << '\n';
|
||||
|
||||
if (runparams.inDeletedInset) {
|
||||
os << "\\lyxobjectsout{%" << breakln;
|
||||
os << "\\parbox{\\linewidth}{%" << breakln;
|
||||
}
|
||||
|
||||
string alignment = getAlignment();
|
||||
if (alignment == "left")
|
||||
os << "\\raggedright" << breakln;
|
||||
@ -445,6 +453,9 @@ void InsetFloat::latex(otexstream & os, OutputParams const & runparams_in) const
|
||||
|
||||
InsetText::latex(os, runparams);
|
||||
|
||||
if (runparams.inDeletedInset)
|
||||
os << "}}";
|
||||
|
||||
// Force \end{<floatname>} to appear in a new line.
|
||||
os << breakln << "\\end{" << from_ascii(tmptype) << "}\n";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user