commit 617fd2d4a05d04d3388b2f191b08c23897dc1b6f
Author: Juergen Spitzmueller <[email protected]>
Date: Fri Jul 11 10:58:34 2025 +0200
Fix color definition with empty notefontcolor or boxbgcolor bparam (#13194)
---
src/LaTeXFeatures.cpp | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp
index 6212d562a4..79acab87eb 100644
--- a/src/LaTeXFeatures.cpp
+++ b/src/LaTeXFeatures.cpp
@@ -1249,18 +1249,23 @@ string const LaTeXFeatures::getColorOptions() const
colors << "\\color{document_fontcolor}\n";
}
- if (mustProvide("lyxgreyedout") &&
!getColorValue(params_.notefontcolor).empty()) {
+ if (mustProvide("lyxgreyedout")) {
colors << "\\colorlet{note_fontcolor}{";
- colors << getColorValue(params_.notefontcolor) << "}\n";
+ if (getColorValue(params_.notefontcolor).empty())
+ colors << "lightgray}\n";
+ else
+ colors << getColorValue(params_.notefontcolor) << "}\n";
// the color will be set together with the definition of
// the lyxgreyedout environment (see lyxgreyedout_def)
}
// color for shaded boxes
- if (isRequired("framed") && mustProvide("xcolor")
- && !getColorValue(params_.boxbgcolor).empty()) {
+ if (isRequired("framed") && mustProvide("xcolor")) {
colors << "\\colorlet{shadecolor}{";
- colors << getColorValue(params_.boxbgcolor) << "}\n";
+ if (getColorValue(params_.boxbgcolor).empty())
+ colors << "red}\n";
+ else
+ colors << getColorValue(params_.boxbgcolor) << "}\n";
// this color is automatically used by the LaTeX-package
"framed"
}
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs