Skip to content

[222_52] Add overbrace, underbrace and underline options in math mode toolbar#2949

Merged
wumoin merged 3 commits intoMoganLab:mainfrom
1sh-repalto:1sh-repalto/222_52/add-overbrace-underbrace-underline-options-in-toolbar
Mar 9, 2026
Merged

[222_52] Add overbrace, underbrace and underline options in math mode toolbar#2949
wumoin merged 3 commits intoMoganLab:mainfrom
1sh-repalto:1sh-repalto/222_52/add-overbrace-underbrace-underline-options-in-toolbar

Conversation

@1sh-repalto
Copy link
Copy Markdown
Contributor

Fixes #2723
Add corresponding hints/prompts for overbrace, underbrace, and underline in the math mode toolbar.

Summary

Added direct options for overbrace, underbrace and underline under math mode toolbar. Also created and added .xpm and .svg icon sets for them.

Developer Document: devel/222_52.md

Issue found

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.

Changes

In TeXmacs/progs/math/math-menu.scm:

+ ((balloon (icon "tm_overbrace.xpm") "keyboard equivalent:") (make-wide "<wide-overbrace>"))
+ ((balloon (icon "tm_underbrace.xpm") "keyboard equivalent:") (make-wide-under "<wide-underbrace>"))
+ ((balloon (icon "tm_underbar.xpm") "keyboard equivalent:") (make-wide-under "<wide-bar>"))))

In TeXmacs/misc/pixmaps/modern/16x16/focus added these files:

  • tm_overbrace.xpm
  • tm_underbrace.xpm
  • tm_underbar.xpm

In TeXmacs/misc/pixmaps/liii/16x16/focus added these files:

  • tm_overbrace.svg
  • tm_underbrace.svg
  • tm_underbar.svg

In TeXmacs/misc/pixmaps/liii-night/16x16/focus added these files:

  • tm_overbrace.svg
  • tm_underbrace.svg
  • 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.
mode_toolbar.mp4

Before:

image

After:

image

@wumoin wumoin merged commit 4b08b2b into MoganLab:main Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

模式工具栏添加 \overbrace \underbrace \underline 的对应提示

2 participants