X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetFloat.cpp;h=5e1dd3d7fcfd18780258026dc386fe9b26e47e6a;hb=9176e60b7bcab3e355521a86ddb4c2778cd9b29e;hp=7093541c93ea19081463db937e77a80796fd46f8;hpb=7c63896c601f43ced313b74e04336235ff09212e;p=lyx.git diff --git a/src/insets/InsetFloat.cpp b/src/insets/InsetFloat.cpp index 7093541c93..5e1dd3d7fc 100644 --- a/src/insets/InsetFloat.cpp +++ b/src/insets/InsetFloat.cpp @@ -322,8 +322,10 @@ void InsetFloat::validate(LaTeXFeatures & features) const if (features.inFloat()) features.require("subfig"); - if (features.inDeletedInset()) + if (features.inDeletedInset()) { + features.require("tikz"); features.require("ct-tikz-object-sout"); + } features.useFloat(params_.type, features.inFloat()); features.inFloat(true); @@ -439,8 +441,12 @@ void InsetFloat::latex(otexstream & os, OutputParams const & runparams_in) const os << '\n'; if (runparams.inDeletedInset) { - os << "\\lyxobjectsout{%" << breakln; - os << "\\parbox{\\linewidth}{%" << breakln; + // This has to be done manually since we need it inside the float + OutputParams::CtObject ctobject = runparams.ctObject; + runparams.ctObject = OutputParams::CT_DISPLAYOBJECT; + Changes::latexMarkChange(os, buffer().params(), Change(Change::UNCHANGED), + Change(Change::DELETED), runparams); + runparams.ctObject = ctobject; } string alignment = getAlignment(); @@ -454,7 +460,7 @@ void InsetFloat::latex(otexstream & os, OutputParams const & runparams_in) const InsetText::latex(os, runparams); if (runparams.inDeletedInset) - os << "}}"; + os << "}"; // Force \end{} to appear in a new line. os << breakln << "\\end{" << from_ascii(tmptype) << "}\n";