Skip to content

Conversation

@Omikhleia
Copy link
Member

Closes #2300

Closes #2301

For #2300, it implements the solution presented in my last comment

CI tests are currently failing due to #2297 -- I have not checked whether some of the existing tests are affected or not.

What I did check is:

  • The small scenario covering both formulas mentioned in the issues

    $$`\def{floor}{\lfloor #1 \rfloor}
    p_n = 1 + \sum_{i=1}^{2^n} \floor{(\frac{n}{\sum_{j=1}^i \floor{\cos^2(\pi \frac{(j-1)! + 1}{j})}})^{\frac{1}{n}}}`
    
    ---
    
    Inline $`\mathcal{L}_\phi=\overline{(\partial_\mu\phi)}\partial^\mu\phi-\frac{\mu\phi-m_h^2[\bar{\phi}\phi-\frac{\nu^2}{2}]^2}{2\nu^2}`
    
    Lorem ipsum dolor sit amet, consectetur adipiscing elit.
    $`\mathcal{L}_\phi=\overline{(\partial_\mu\phi)}\partial^\mu\phi-\frac{\mu\phi-m_h^2[\bar{\phi}\phi-\frac{\nu^2}{2}]^2}{2\nu^2}`
    Sedeiusmod tempor incididunt.
    
  • A decent set of formulas in my booklet SILE and the Hydra of Maths... It's easy to miss something at unexpected places, but a lot more formulas than I thought are actually affected, and as far as I can tell, they all look better, except maybe one (but LaTeX does seem to give a very similar result here, though we don't use the same exact table constructs).1

Footnotes

  1. Aside note, if I ever want to re-edit that booklet, the change on vertical delimiters is most of the time subtle, but very visible at some places... Sadly, page breaks occur at different places now, and sometimes my nice "filler" illustrations or quotes would have to be moved here and there. 🤣

@Omikhleia Omikhleia requested a review from a team as a code owner August 1, 2025 17:26
@Omikhleia Omikhleia added this to Math Aug 1, 2025
@github-project-automation github-project-automation bot moved this to In progress in Math Aug 1, 2025
@Omikhleia Omikhleia added this to the v0.15.14 milestone Aug 1, 2025
@Omikhleia Omikhleia self-assigned this Aug 1, 2025
@Omikhleia Omikhleia added the modules:packages Issue relates to core or 3rd party packages label Aug 1, 2025
@Omikhleia
Copy link
Member Author

Omikhleia commented Aug 1, 2025

And when one knows what caused an issue, here on #2300 ...

It's hard not wondering how one could have missed it, and what could have been a real-world simple equation showing it...

image
$$`\left\lfloor \frac{\left\lfloor \frac{x}{m} \right\rfloor}{n} \right\rfloor = \left\lfloor \frac{x}{mn} \right\rfloor`
$$`\left\lceil  \frac{\left\lceil  \frac{x}{m} \right\rceil }{n} \right\rceil = \left\lceil \frac{x}{mn} \right\rceil`

And we are now in line with Typst here too, perhaps even better 🐱 -- in Typst's case, the right-side equations do not seem to stretch perfectly, heh...

image

EDIT: I picked the LaTeX formulas on Wikipedia, but of course here SILE wouldn't need the left...right constructs, so the above example may be simplified:

$$`\lfloor \frac{\lfloor \frac{x}{m} \rfloor}{n} \rfloor = \lfloor \frac{x}{mn} \rfloor`
$$`\lceil \frac{\lceil \frac{x}{m} \rceil}{n} \rceil = \lceil \frac{x}{mn} \rceil`

@Omikhleia Omikhleia changed the title Fix placement of math stretchable delimiters and accents fix(math): Fix placement of math stretchable delimiters and accents Aug 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

modules:packages Issue relates to core or 3rd party packages

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

Incorrect placement of horizontally stretched math accents in justified lines Vertical stretchable math delimiters aren't composed as they should

2 participants