[LyX/master] Fix #11827

Juergen Spitzmueller spitz at lyx.org
Thu Jul 30 14:05:57 UTC 2020


commit b521d36bfbedce9f89b48510409c32860f99559d
Author: Daniel Ramoeller <d.lyx at web.de>
Date:   Thu Jul 30 13:14:51 2020 +0200

    Fix #11827
    
    Keep spacing of math intact.
---
 src/mathed/InsetMathColor.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mathed/InsetMathColor.cpp b/src/mathed/InsetMathColor.cpp
index d665734..2d6eb2d 100644
--- a/src/mathed/InsetMathColor.cpp
+++ b/src/mathed/InsetMathColor.cpp
@@ -100,7 +100,7 @@ void InsetMathColor::write(WriteStream & os) const
 		// reset to default color inside another color inset
 		os << "{\\normalcolor " << cell(0) << '}';
 	else if (oldstyle_)
-		os << "{\\color{" << color_ << '}' << cell(0) << '}';
+		os << "\\begingroup\\color{" << color_ << '}' << cell(0) << "\\endgroup ";
 	else
 		os << "\\textcolor{" << color_ << "}{" << cell(0) << '}';
 }


More information about the lyx-cvs mailing list