X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;ds=inline;f=src%2FChanges.cpp;h=6e3bf0fff754a7bf24548074f33fe9f4a67d34b8;hb=c293be56bd12c5dc46e5cedd2828e33918fccef7;hp=343af39b1e47c988c26fc55cc43dcd0f9e40720c;hpb=75bfed55079cab6b73fbea6ce4ae3f10d1af3b91;p=lyx.git diff --git a/src/Changes.cpp b/src/Changes.cpp index 343af39b1e..6e3bf0fff7 100644 --- a/src/Changes.cpp +++ b/src/Changes.cpp @@ -382,7 +382,7 @@ docstring getLaTeXMarkup(docstring const & macro, docstring const & author, return ods.str(); } -} //namespace anon +} // namespace int Changes::latexMarkChange(otexstream & os, BufferParams const & bparams, @@ -394,11 +394,16 @@ int Changes::latexMarkChange(otexstream & os, BufferParams const & bparams, int column = 0; + bool const dvipost = LaTeXFeatures::isAvailable("dvipost") && + (runparams.flavor == OutputParams::LATEX + || runparams.flavor == OutputParams::DVILUATEX); + if (oldChange.type != Change::UNCHANGED) { // close \lyxadded or \lyxdeleted os << '}'; column++; - if (oldChange.type == Change::DELETED && !runparams.wasDisplayMath) + if (oldChange.type == Change::DELETED + && !runparams.wasDisplayMath && !dvipost) --runparams.inulemcmd; } @@ -410,7 +415,7 @@ int Changes::latexMarkChange(otexstream & os, BufferParams const & bparams, docstring macro_beg; if (change.type == Change::DELETED) { macro_beg = from_ascii("\\lyxdeleted{"); - if (!runparams.inDisplayMath) + if (!runparams.inDisplayMath && !dvipost) ++runparams.inulemcmd; } else if (change.type == Change::INSERTED) @@ -422,10 +427,8 @@ 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 - && (!LaTeXFeatures::isAvailable("dvipost") - || (runparams.flavor != OutputParams::LATEX - && runparams.flavor != OutputParams::DVILUATEX))) { - if (os.afterParbreak()) + && !dvipost) { + if (os.blankLine()) str += from_ascii("\\\\\\noindent\n"); else str += from_ascii("\\\\\\\\\n");