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_underbar.svg b/TeXmacs/misc/pixmaps/liii-night/16x16/focus/tm_underbar.svg new file mode 100644 index 0000000000..57bdd1a9a3 --- /dev/null +++ b/TeXmacs/misc/pixmaps/liii-night/16x16/focus/tm_underbar.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ 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/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))) 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