-
Notifications
You must be signed in to change notification settings - Fork 76
[201_85] Fix : LaTeX formula imports using aligned to show correct numbering format #2861
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -149,19 +149,19 @@ | |
| </macro>> | ||
|
|
||
| <assign|aligned*|<\macro|body> | ||
| <align*|<tformat|<arg|body>>> | ||
| <tformat|<twith|table-min-cols|2>|<twith|table-max-cols|2>|<cwith|1|-1|1|1|cell-lsep|0spc>|<cwith|1|-1|1|1|cell-rsep|0.5spc>|<cwith|1|-1|-1|-1|cell-rsep|0spc>|<cwith|1|-1|-1|-1|cell-lsep|0spc>|<cwith|1|-1|1|-1|cell-bsep|0.1fn>|<cwith|1|-1|1|-1|cell-tsep|0.1fn>|<cwith|1|-1|1|1|cell-halign|r>|<cwith|1|-1|-1|-1|cell-halign|l>|<cwith|1|-1|1|-1|cell-block|no>|<arg|body>> | ||
| </macro>> | ||
|
Comment on lines
151
to
153
|
||
|
|
||
| <assign|aligned|<\macro|body> | ||
| <aligned*|<tformat|<arg|body>>> | ||
| </macro>> | ||
|
|
||
| <assign|alignedat*|<\macro|ncol|body> | ||
| <align*|<tformat|<arg|body>>> | ||
| <aligned*|<tformat|<arg|body>>> | ||
| </macro>> | ||
|
|
||
| <assign|alignedat|<\macro|ncol|body> | ||
| <align|<tformat|<arg|body>>> | ||
| <aligned*|<tformat|<arg|body>>> | ||
| </macro>> | ||
|
|
||
| <assign|flalign*|<\macro|body> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| #[201_87] Fix LaTeX formula imports using "aligned" to show correct numbering format | ||
| ## 2026/02/25 Fix equation numbering alignment in `aligned` environment | ||
| ### What | ||
| Redefined `aligned*`, `alignedat*`, and `alignedat` in `env-math.ts` to produce inline `tformat` tables instead of delegating to `align*`/`align`. | ||
| ### Why | ||
| Issue #2804 : when using `aligned` inside `equation`, the equation number (1) appeared below the multi-line expression instead of vertically centered to the right. The root cause was that `aligned*` was aliased to `align*`. | ||
| This caused the equation number to be appended sequentially after the block rather than inline beside it. | ||
| ### How | ||
| Changed the body of `aligned*` from `<align*|<tformat|<arg|body>>>` to a inline `tformat` with explicit settings. This makes `aligned` behave as an inline math construct with natural width and no block wrapping, so the equation number is placed correctly to the right. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are existing Scheme-based conversion tests for LaTeX math environments (e.g.
TeXmacs/tests/203_6.scmasserts the tree shape foralign). This change fixes a specific regression forequation+aligned, but there doesn’t appear to be a test covering that combination yet. Adding a focused regression test for issue #2804 (importing anequationcontaining analignedblock) would help prevent future numbering/alignment regressions.