Skip to content
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

Parentheses or brackets size adaptation in display math #1799

Closed
Omikhleia opened this issue May 8, 2023 · 1 comment · Fixed by #2151
Closed

Parentheses or brackets size adaptation in display math #1799

Omikhleia opened this issue May 8, 2023 · 1 comment · Fixed by #2151
Assignees
Labels
bug Software bug issue
Milestone

Comments

@Omikhleia
Copy link
Member

Omikhleia commented May 8, 2023

Standalone parentheses or brackets in (display) math automatically adopt a "big" scale if needed around content:

\math[mode=display]{(\frac{a}{b})}

image

However, they lose this capability if the expression gets (subscript or) superscripts, e.g. gets elevated to some power:

\math[mode=display]{(\frac{a}{b})^2}

image

Adding extra brackets around the parenthetical part sort of works, but the power is not raised higher (as e.g. TeX would do after a \bigg)) so it doesn't seem to be a fully satisfying workaround:

\math[mode=display]{{(\frac{a}{b})}^2}

image

My expectation (image manually tweaked) would have been:
image

Is there a proper way to achieve it?

image

@Omikhleia Omikhleia added the question Ask for advice or investigate solutions label May 8, 2023
@Omikhleia Omikhleia added this to Math May 8, 2023
@github-project-automation github-project-automation bot moved this to To do in Math May 8, 2023
@Omikhleia Omikhleia self-assigned this Nov 1, 2024
@Omikhleia Omikhleia moved this from To do to In progress in Math Nov 1, 2024
@Omikhleia
Copy link
Member Author

Omikhleia commented Nov 1, 2024

The first point is related to the handling of paired open/close atoms, see #2148.
It's a specific case of this more general issue: When we have (...)^n, the exponent was applied the closing parenthesis. We need to pair the parentheses and apply the exponent to the whole group.

The second point is related to the position of superscripts, see #2122.

@Omikhleia Omikhleia added bug Software bug issue and removed question Ask for advice or investigate solutions labels Nov 1, 2024
@Omikhleia Omikhleia added this to the v0.15.6 milestone Nov 2, 2024
@github-project-automation github-project-automation bot moved this from In progress to Done in Math Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Software bug issue
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant