When deciding how to strike out deleted math in change-tracking
mode, differentiate only on begin-of-line or not, and not on
after-paragraph-break or not.

The assumption that a new paragraph is always started after a
float seems to be not true and was causing this bug.

(cherry picked from commit bd21aa99d2)
This commit is contained in:
Enrico Forestieri 2018-12-02 18:27:38 +01:00
parent 0e7d9b0dc6
commit 8d7b66e209
2 changed files with 1 additions and 5 deletions

View File

@ -428,7 +428,7 @@ int Changes::latexMarkChange(otexstream & os, BufferParams const & bparams,
// signature needed by \lyxsout to correctly strike out display math
if (change.type == Change::DELETED && runparams.inDisplayMath
&& !dvipost) {
if (os.afterParbreak())
if (os.lastChar() == '\n')
str += from_ascii("\\\\\\noindent\n");
else
str += from_ascii("\\\\\\\\\n");

View File

@ -402,10 +402,6 @@ void InsetFloat::latex(otexstream & os, OutputParams const & runparams_in) const
// Force \end{<floatname>} to appear in a new line.
os << breakln << "\\end{" << from_ascii(tmptype) << "}\n";
// A new paragraph is always started after a float. Hence, simulate a
// blank line so that os.afterParbreak() returns true (see bug 11174).
os.lastChar('\n');
}