From f8d3a8860b05ec29f5e13e7c9737bdce64a3da20 Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Thu, 27 Oct 2016 03:18:29 +0200 Subject: [PATCH] In mathed, require xcolor instead of color when appropriate Fixes bug #10417. --- src/mathed/InsetMathColor.cpp | 22 ++++++++++++++++++++-- status.22x | 2 ++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/mathed/InsetMathColor.cpp b/src/mathed/InsetMathColor.cpp index c50f613609..0a6d0aa6b9 100644 --- a/src/mathed/InsetMathColor.cpp +++ b/src/mathed/InsetMathColor.cpp @@ -74,8 +74,26 @@ static bool normalcolor(docstring const & color) void InsetMathColor::validate(LaTeXFeatures & features) const { InsetMathNest::validate(features); - if (!normalcolor(color_)) - features.require("color"); + if (!normalcolor(color_)) { + switch (lcolor.getFromLaTeXName(to_utf8(color_))) { + case Color_brown: + case Color_darkgray: + case Color_gray: + case Color_lightgray: + case Color_lime: + case Color_olive: + case Color_orange: + case Color_pink: + case Color_purple: + case Color_teal: + case Color_violet: + features.require("xcolor"); + break; + default: + features.require("color"); + break; + } + } } diff --git a/status.22x b/status.22x index c10ae233dc..294480a036 100644 --- a/status.22x +++ b/status.22x @@ -97,6 +97,8 @@ What's new - Fix display of Arabic text when compiling with Qt5 (bug 10436). +- Allow using colors supported by xcolor inside mathed (bug 10417). + * INTERNALS -- 2.39.5