commit ff5e08f61d527ce0dd887cd35350ddc8009286e7
Author: Enrico Forestieri <[email protected]>
Date:   Sun Oct 19 15:10:28 2025 +0200

    Fix bug #13239
    
    Size commands have no effect in math mode, so avoid introducing
    spurious insets and avoid harmless compilation warnings such as
    "Command \huge invalid in math mode".
    
    (cherry picked from commit e53759ccc009998e6cc3991ea49c55f4058317cf)
---
 src/mathed/InsetMathNest.cpp | 3 ++-
 status.24x                   | 4 ++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/mathed/InsetMathNest.cpp b/src/mathed/InsetMathNest.cpp
index b65d224f26..c18525846e 100644
--- a/src/mathed/InsetMathNest.cpp
+++ b/src/mathed/InsetMathNest.cpp
@@ -645,7 +645,8 @@ void InsetMathNest::handleFont2(Cursor & cur, docstring 
const & arg)
                }
        }
 
-       if (support::contains(arg, from_ascii("size"))) {
+       if (support::contains(arg, from_ascii("size")) &&
+           currentMode() != MATH_MODE) {
                switch(font.fontInfo().size()) {
                case TINY_SIZE:
                        im = from_ascii("tiny");
diff --git a/status.24x b/status.24x
index 79cf7612af..8c41154f82 100644
--- a/status.24x
+++ b/status.24x
@@ -38,6 +38,10 @@ What's new
 
 * USER INTERFACE
 
+- Avoid adding font size insets such as \huge in math mode when using the
+  Text Properties dialog as they are ineffective and only work within
+  text-in-math mode insets such as \textrm or \mbox (bug 13239).
+
 
 
 * DOCUMENTATION AND LOCALIZATION
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to