[LyX/master] Amend 7441172d
Enrico Forestieri
forenr at lyx.org
Fri Dec 29 17:45:11 UTC 2023
commit 9ebc7d95121091e726d52e2c52a1a0032fe9585b
Author: Udi-Fogiel <udifoglle at gmail.com>
Date: Fri Dec 29 20:10:50 2023 +0100
Amend 7441172d
colswitch was checking for oldstyle instead of normalcolor
to see if we need \normalcolor, which lead to appearence
of \color{none} in some cases, but "none" is not a known
color.
---
src/mathed/InsetMathColor.cpp | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/mathed/InsetMathColor.cpp b/src/mathed/InsetMathColor.cpp
index e3be8ff..549ff37 100644
--- a/src/mathed/InsetMathColor.cpp
+++ b/src/mathed/InsetMathColor.cpp
@@ -111,9 +111,9 @@ void InsetMathColor::write(TeXMathStream & os) const
bool adjchk = os.latex() && !os.inMathClass() && (normalcolor(color_) || oldstyle_);
bool adjust_front = frontclass != "mathord" && adjchk;
bool adjust_back = backclass != "mathord" && adjchk;
- docstring const colswitch =
- oldstyle_ ? from_ascii("{\\color{") + color_ + from_ascii("}")
- : from_ascii("{\\normalcolor ");
+ docstring const colswitch = normalcolor(color_)
+ ? from_ascii("{\\normalcolor ")
+ : from_ascii("{\\color{") + color_ + from_ascii("}");
if (adjust_front && adjust_back) {
os << '\\' << frontclass << colswitch << cell(0).front() << '}';
More information about the lyx-cvs
mailing list