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

MathML msqrt not supported #1604

Closed
Omikhleia opened this issue Nov 13, 2022 · 4 comments · Fixed by #2119
Closed

MathML msqrt not supported #1604

Omikhleia opened this issue Nov 13, 2022 · 4 comments · Fixed by #2119
Assignees
Labels
bug Software bug issue modules:packages Issue relates to core or 3rd party packages
Milestone

Comments

@Omikhleia
Copy link
Member

SILE 0.14.4

Document:

<document>
<use module="packages.math"/>

<mathml display="block"><mfrac><mrow><mo>−</mo><mi>b</mi><mo>±</mo><msqrt><mrow><mi mathvariant="normal">Δ</mi></mrow></msqrt></mrow><mrow><mn>2</mn><mi>a</mi></mrow></mfrac></mathml>

</document>

(I am not MathML-savvy, the MathML formula was generated with TEMML from LaTeX \frac{-b + \sqrt {\Delta}}{2a})

Expected:

image

Observed:

! Unknown math command msqrt at xmath.xml:50:1: in \mathml["display",display="block"]
@Omikhleia
Copy link
Member Author

Omikhleia commented Nov 13, 2022

Actually, switching to the TeX-like math does produce some result:

\begin{document}
\use[module=packages.math]

\begin{math}
\frac{-b + \sqrt {\Delta}}{2a}
\end{math}

\end{document}

image

But the square root doesn't expand over the content.

(FWIW, my math font is Libertinus Math)

@alerque alerque added bug Software bug issue modules:packages Issue relates to core or 3rd party packages labels Nov 15, 2022
@alerque alerque added this to Math Nov 15, 2022
@alerque alerque moved this to To do in Math Nov 15, 2022
@alerque
Copy link
Member

alerque commented Nov 15, 2022

@OlivierNicole No pressure to fix this, I'll totally understand if you don't have the bandwidth. But perhaps you could at least drop a pointer for what somebody needs to look into if they want to tackle this.

@OlivierNicole
Copy link
Member

Indeed, square roots are not yet implemented. What you see when doing \sqrt in TeX-like mode is just the Unicode glyph for square roots.

Typesetting square roots is not entirely trivial because it’s a vertically stretchable glyph (see #220 (comment)). No theoretical difficulties there, just implementation time

Alas I cannot commit on starting working on this seriously anytime soon.

@Omikhleia
Copy link
Member Author

The above XML MathML test script with PR #2119:

image

@Omikhleia Omikhleia modified the milestones: v0.x.y, v0.15.6 Sep 29, 2024
@Omikhleia Omikhleia self-assigned this Sep 29, 2024
@github-project-automation github-project-automation bot moved this from To do to Done in Math Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Software bug issue modules:packages Issue relates to core or 3rd party packages
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants