I can't find the place where math comments appearance was discussed
recently, so here is is.
This trivial patch uses a yellow (Note) background to mark comments.
While the result is not the same as Notes (the output actually goes to
LaTeX) it seems to me that this conveys the intent of the comment.
Another possibility would be to prepend a % on screen and maybe output
with a different color (or a more explicit 'comment: ' label?).
What would you prefer? Comments are not understandable on screen right now.
JMarc
From a4e34a34288e7834c575e75e454c886879d7b672 Mon Sep 17 00:00:00 2001
From: Jean-Marc Lasgouttes <lasgout...@lyx.org>
Date: Wed, 5 Jun 2024 10:41:47 +0200
Subject: [PATCH] Use background to make math comments more visible
---
src/mathed/InsetMathComment.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/mathed/InsetMathComment.cpp b/src/mathed/InsetMathComment.cpp
index 273253ec0e..2fdcde369e 100644
--- a/src/mathed/InsetMathComment.cpp
+++ b/src/mathed/InsetMathComment.cpp
@@ -16,6 +16,10 @@
#include "MathStream.h"
#include "MathSupport.h"
+#include "frontends/Painter.h"
+
+#include "MetricsInfo.h"
+
#include <ostream>
@@ -55,6 +59,8 @@ void InsetMathComment::metrics(MetricsInfo & mi, Dimension & dim) const
void InsetMathComment::draw(PainterInfo & pi, int x, int y) const
{
+ Dimension const & dim = dimension(*pi.base.bv);
+ pi.pain.fillRectangle(x, y - dim.asc, dim.wid, dim.height(), Color_notebg);
cell(0).draw(pi, x, y);
}
--
2.43.0
--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel