Skip to content

Comments

[202_2787] Fix inconsistent focus toolbar numbering button in tables#2833

Open
Gitjay11 wants to merge 1 commit intoMoganLab:mainfrom
Gitjay11:fix/table-numbering-focus
Open

[202_2787] Fix inconsistent focus toolbar numbering button in tables#2833
Gitjay11 wants to merge 1 commit intoMoganLab:mainfrom
Gitjay11:fix/table-numbering-focus

Conversation

@Gitjay11
Copy link
Contributor

@Gitjay11 Gitjay11 commented Feb 20, 2026

What

Modified [TeXmacs/progs/table/table-menu.scm] to extend the definition of numbered-context? and numbered-numbered?.

Why

Inside tables (tabular, tformat, etc.), the numbered-context? predicate returned #f for cell and row tags, causing the numbering/unnumbering buttons in the focus toolbar to be disabled or hidden. This fixes issue #2787.

How

By recursively checking parent nodes, table cells can now inherit the numbering properties of the enclosing small-table or big-table. Verification: Insert a small table, click inside a cell, and the numbering button in the focus toolbar should become active and toggle numbering correctly.

@Gitjay11
Copy link
Contributor Author

Gitjay11 commented Feb 21, 2026

Hi @da-liii @wumoin @SaidealemEksan @Yuki-Nagori , I’ve submitted this PR. Could you please take a moment to review it when you have time?
If any changes or improvements are needed, I’d be happy to update it accordingly.
Thank you for your time and feedback.

@da-liii da-liii requested a review from Yuki-Nagori February 22, 2026 13:28
@Yuki-Nagori
Copy link
Contributor

Yuki-Nagori commented Feb 23, 2026

Hello 👋, the problem with this issue actually doesn't exist. The numbering for small/big table is actually modified in Figure 2, not Figure 1. Then, the tabular numbering is used to switch between tabular/tabular*, which originally worked fine. Sorry for wasting your time.

<assign|tabular*|<macro|body|<tformat|<cwith|1|-1|1|-1|cell-halign|c>|<arg|body>>>>

mogan/TeXmacs/packages/standard/std-markup.ts 320

You can see that this button actually defines a center alignment. Of course, this design is indeed not good.

Image Figure-1 Image Figure-2

@Gitjay11
Copy link
Contributor Author

hi @Yuki-Nagori , Thanks for the detailed explanation. I understand now that the button I modified (Figure 1) is actually used to switch between tabular and tabular* to center align the cells, and the actual numbering is controlled differently (Figure 2)
Since we both agree that using a numbering-style button for this alignment behavior is confusing from a UI perspective, would you be open to a change this PR to changes the icon or the tooltip for this button to better reflect its actual purpose?
Thanks again for your time and guidance

@Yuki-Nagori
Copy link
Contributor

Yuki-Nagori commented Feb 24, 2026

@Gitjay11 Of course, but please create an issue before doing it.

@Gitjay11
Copy link
Contributor Author

@Yuki-Nagori Okay sure, Will do. I'll open a new issue for the UI/tooltip change so we can track it properly, Thanks again.

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.

2 participants