From 1887a2ba227e6142641aeceaba3153141a207170 Mon Sep 17 00:00:00 2001 From: Vansh Negi Date: Fri, 6 Mar 2026 20:13:43 +0000 Subject: [PATCH 1/3] feat: add overbrace/underbrace/underline options with light/dark SVG icons --- .../liii-night/16x16/focus/tm_overbrace.svg | 21 ++++++++++ .../liii-night/16x16/focus/tm_underbrace.svg | 28 ++++++++++++++ .../liii-night/16x16/focus/tm_underline.svg | 15 ++++++++ .../pixmaps/liii/16x16/focus/tm_overbrace.svg | 21 ++++++++++ .../pixmaps/liii/16x16/focus/tm_underbar.svg | 15 ++++++++ .../liii/16x16/focus/tm_underbrace.svg | 27 +++++++++++++ .../modern/16x16/focus/tm_overbrace.xpm | 38 +++++++++++++++++++ .../modern/16x16/focus/tm_underbar.xpm | 38 +++++++++++++++++++ .../modern/16x16/focus/tm_underbrace.xpm | 38 +++++++++++++++++++ TeXmacs/progs/math/math-menu.scm | 6 ++- 10 files changed, 246 insertions(+), 1 deletion(-) create mode 100644 TeXmacs/misc/pixmaps/liii-night/16x16/focus/tm_overbrace.svg create mode 100644 TeXmacs/misc/pixmaps/liii-night/16x16/focus/tm_underbrace.svg create mode 100644 TeXmacs/misc/pixmaps/liii-night/16x16/focus/tm_underline.svg create mode 100644 TeXmacs/misc/pixmaps/liii/16x16/focus/tm_overbrace.svg create mode 100644 TeXmacs/misc/pixmaps/liii/16x16/focus/tm_underbar.svg create mode 100644 TeXmacs/misc/pixmaps/liii/16x16/focus/tm_underbrace.svg create mode 100644 TeXmacs/misc/pixmaps/modern/16x16/focus/tm_overbrace.xpm create mode 100644 TeXmacs/misc/pixmaps/modern/16x16/focus/tm_underbar.xpm create mode 100644 TeXmacs/misc/pixmaps/modern/16x16/focus/tm_underbrace.xpm diff --git a/TeXmacs/misc/pixmaps/liii-night/16x16/focus/tm_overbrace.svg b/TeXmacs/misc/pixmaps/liii-night/16x16/focus/tm_overbrace.svg new file mode 100644 index 0000000000..97b40d5ba5 --- /dev/null +++ b/TeXmacs/misc/pixmaps/liii-night/16x16/focus/tm_overbrace.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TeXmacs/misc/pixmaps/liii-night/16x16/focus/tm_underbrace.svg b/TeXmacs/misc/pixmaps/liii-night/16x16/focus/tm_underbrace.svg new file mode 100644 index 0000000000..ffef47246d --- /dev/null +++ b/TeXmacs/misc/pixmaps/liii-night/16x16/focus/tm_underbrace.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TeXmacs/misc/pixmaps/liii-night/16x16/focus/tm_underline.svg b/TeXmacs/misc/pixmaps/liii-night/16x16/focus/tm_underline.svg new file mode 100644 index 0000000000..57bdd1a9a3 --- /dev/null +++ b/TeXmacs/misc/pixmaps/liii-night/16x16/focus/tm_underline.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TeXmacs/misc/pixmaps/liii/16x16/focus/tm_overbrace.svg b/TeXmacs/misc/pixmaps/liii/16x16/focus/tm_overbrace.svg new file mode 100644 index 0000000000..95efeedff7 --- /dev/null +++ b/TeXmacs/misc/pixmaps/liii/16x16/focus/tm_overbrace.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TeXmacs/misc/pixmaps/liii/16x16/focus/tm_underbar.svg b/TeXmacs/misc/pixmaps/liii/16x16/focus/tm_underbar.svg new file mode 100644 index 0000000000..aa6588cf95 --- /dev/null +++ b/TeXmacs/misc/pixmaps/liii/16x16/focus/tm_underbar.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TeXmacs/misc/pixmaps/liii/16x16/focus/tm_underbrace.svg b/TeXmacs/misc/pixmaps/liii/16x16/focus/tm_underbrace.svg new file mode 100644 index 0000000000..a4fb0dfc92 --- /dev/null +++ b/TeXmacs/misc/pixmaps/liii/16x16/focus/tm_underbrace.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TeXmacs/misc/pixmaps/modern/16x16/focus/tm_overbrace.xpm b/TeXmacs/misc/pixmaps/modern/16x16/focus/tm_overbrace.xpm new file mode 100644 index 0000000000..b09644219e --- /dev/null +++ b/TeXmacs/misc/pixmaps/modern/16x16/focus/tm_overbrace.xpm @@ -0,0 +1,38 @@ +/* XPM */ +static char *a_overbrace_sharp[] = { +/* columns rows colors chars-per-pixel */ +"15 17 15 1", +" c None", +"Y c Gray0", +". c #080c08", +"X c #181c18", +"o c #282c28", +"O c #484c48", +"+ c #585c58", +"@ c #0000f8", +"# c #383cf8", +"$ c #787cb8", +"% c #787cf8", +"& c #888c88", +"* c #989c98", +"= c #a8aca8", +"- c #b8bcb8", +/* pixels */ +" Y ", +" Y.Y ", +" Y. .Y ", +" Y+ +Y ", +" Y. .Y ", +" Yo oY ", +" Y. .Y ", +" + + ", +" ", +" -# ", +" #$#%% ", +" $#@#- ", +" #@@@% ", +" %-#-$ ", +" -% ", +" ", +" " +}; \ No newline at end of file diff --git a/TeXmacs/misc/pixmaps/modern/16x16/focus/tm_underbar.xpm b/TeXmacs/misc/pixmaps/modern/16x16/focus/tm_underbar.xpm new file mode 100644 index 0000000000..3fc9bf9978 --- /dev/null +++ b/TeXmacs/misc/pixmaps/modern/16x16/focus/tm_underbar.xpm @@ -0,0 +1,38 @@ +/* XPM */ +static char *a_underline[] = { +/* columns rows colors chars-per-pixel */ +"15 17 15 1", +" c None", +"Y c Gray0", +". c #080c08", +"X c #181c18", +"o c #282c28", +"O c #484c48", +"+ c #585c58", +"@ c #0000f8", +"# c #383cf8", +"$ c #787cb8", +"% c #787cf8", +"& c #888c88", +"* c #989c98", +"= c #a8aca8", +"- c #b8bcb8", +/* pixels */ +" ", +" -# ", +" #$#%% ", +" $#@#- ", +" #@@@% ", +" %-#-$ ", +" -% ", +" ", +" ", +" ", +" ", +" +YYYYYYYYYYY+ ", +" -===========o ", +" ", +" ", +" ", +" " +}; \ No newline at end of file diff --git a/TeXmacs/misc/pixmaps/modern/16x16/focus/tm_underbrace.xpm b/TeXmacs/misc/pixmaps/modern/16x16/focus/tm_underbrace.xpm new file mode 100644 index 0000000000..c9ee0f9c7c --- /dev/null +++ b/TeXmacs/misc/pixmaps/modern/16x16/focus/tm_underbrace.xpm @@ -0,0 +1,38 @@ +/* XPM */ +static char *a_underbrace_sharp[] = { +/* columns rows colors chars-per-pixel */ +"15 17 15 1", +" c None", +"Y c Gray0", +". c #080c08", +"X c #181c18", +"o c #282c28", +"O c #484c48", +"+ c #585c58", +"@ c #0000f8", +"# c #383cf8", +"$ c #787cb8", +"% c #787cf8", +"& c #888c88", +"* c #989c98", +"= c #a8aca8", +"- c #b8bcb8", +/* pixels */ +" ", +" -# ", +" #$#%% ", +" $#@#- ", +" #@@@% ", +" %-#-$ ", +" -% ", +" ", +" + + ", +" Y. .Y ", +" Yo oY ", +" Y. .Y ", +" Y+ +Y ", +" Y. .Y ", +" Y.Y ", +" Y ", +" " +}; \ No newline at end of file diff --git a/TeXmacs/progs/math/math-menu.scm b/TeXmacs/progs/math/math-menu.scm index ad045712ad..1fc6aef3d3 100644 --- a/TeXmacs/progs/math/math-menu.scm +++ b/TeXmacs/progs/math/math-menu.scm @@ -1257,7 +1257,11 @@ ((balloon (icon "tm_dot.xpm") "keyboard equivalent:") (make-wide "")) ((balloon (icon "tm_ddot.xpm") "keyboard equivalent:") (make-wide "")) ((balloon (icon "tm_acute.xpm") "keyboard equivalent:") (make-wide "")) - ((balloon (icon "tm_grave.xpm") "keyboard equivalent:") (make-wide "")))) + ((balloon (icon "tm_grave.xpm") "keyboard equivalent:") (make-wide "")) + ((balloon (icon "tm_overbrace.xpm") "keyboard equivalent:") (make-wide "")) + ((balloon (icon "tm_underbrace.xpm") "keyboard equivalent:") (make-wide-under "")) + ((balloon (icon "tm_underbar.xpm") "keyboard equivalent:") (make-wide-under "")))) + / (=> (balloon (icon "tm_binop.xpm") "Insert a binary operation") (tile 8 (link binary-operation-menu))) From 6f26ada07b1ed0c084fa2cdff253bcd690958981 Mon Sep 17 00:00:00 2001 From: Vansh Negi Date: Fri, 6 Mar 2026 20:19:01 +0000 Subject: [PATCH 2/3] added developer document devel/222_52.md --- devel/222_52.md | 50 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 devel/222_52.md diff --git a/devel/222_52.md b/devel/222_52.md new file mode 100644 index 0000000000..a1709b2656 --- /dev/null +++ b/devel/222_52.md @@ -0,0 +1,50 @@ +# [222_52] Add overbrace/underbrace/underline entries to math accent toolbar + +### What +Added three missing entries to the math mode accent dropdown (`tm_wide`) in the +mode toolbar: +- `\overbrace` +- `\underbrace` +- `\underline` + +Also added dedicated icon assets for these entries in both modern (`.xpm`) and +liii (`.svg`) focus icon sets. + +### Why +The accent toolbar had no direct options for overbrace, underbrace, or +underline, even though these constructs are supported by math insertion and +keyboard bindings. This made them harder to discover and inconsistent with other +accent operations. + +### How +In `TeXmacs/progs/math/math-menu.scm`: +1. Extended the `tm_wide` accent tile (`math-insert-icons`) with 3 new buttons. +2. Wired actions to existing math constructors: + - `make-wide ""` + - `make-wide-under ""` + - `make-wide-under ""` +3. Kept tooltip style consistent with surrounding accent buttons + (`"keyboard equivalent:"`). + +Added icon assets: +- `TeXmacs/misc/pixmaps/modern/16x16/focus/tm_overbrace.xpm` +- `TeXmacs/misc/pixmaps/modern/16x16/focus/tm_underbrace.xpm` +- `TeXmacs/misc/pixmaps/modern/16x16/focus/tm_underbar.xpm` +- `TeXmacs/misc/pixmaps/liii/16x16/focus/tm_overbrace.svg` +- `TeXmacs/misc/pixmaps/liii/16x16/focus/tm_underbrace.svg` +- `TeXmacs/misc/pixmaps/liii/16x16/focus/tm_underbar.svg` + +## How to test +1. Open Mogan Editor. +2. Enter math mode (`$`). +3. Open the accent dropdown from the `tm_wide` icon. +4. Verify new entries are present with dedicated icons: + - overbrace + - underbrace + - underline (underbar) +5. Click each entry and verify insertion result: + - overbrace inserts a wide overbrace construct + - underbrace inserts a wide underbrace construct + - underline inserts wide underbar (`\underline` behavior) +6. Hover the new entries and verify tooltip formatting matches other accent + items. \ No newline at end of file From 8395a1055b576a568d3dc983232b3c1c3aeb4183 Mon Sep 17 00:00:00 2001 From: Vansh Negi Date: Fri, 6 Mar 2026 20:33:08 +0000 Subject: [PATCH 3/3] corrected name from tm_underline.svg to tm_underbar.svg --- .../liii-night/16x16/focus/{tm_underline.svg => tm_underbar.svg} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename TeXmacs/misc/pixmaps/liii-night/16x16/focus/{tm_underline.svg => tm_underbar.svg} (100%) diff --git a/TeXmacs/misc/pixmaps/liii-night/16x16/focus/tm_underline.svg b/TeXmacs/misc/pixmaps/liii-night/16x16/focus/tm_underbar.svg similarity index 100% rename from TeXmacs/misc/pixmaps/liii-night/16x16/focus/tm_underline.svg rename to TeXmacs/misc/pixmaps/liii-night/16x16/focus/tm_underbar.svg