-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
Math more fixes and features #2151
Draft
Omikhleia
wants to merge
22
commits into
sile-typesetter:master
Choose a base branch
from
Omikhleia:math-more-fixes-and-features
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Math more fixes and features #2151
Omikhleia
wants to merge
22
commits into
sile-typesetter:master
from
Omikhleia:math-more-fixes-and-features
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MathML Core 3.3.2: "To avoid visual confusion between the fraction bar and another adjacent items (e.g. minus sign or another fraction's bar)"
Similar to the `\text` command in amsmath, but does not support internal embedding of math equations. Yet it covers the usual need for some bits of regular text inside math formula.
As in amsmath: lim, limsup, liminf, projlim, injlim.
As in amsmath: gcd, sup, inf, max, min.
One-letter identifiers are in italic as per MathML, but in TeX-like math the Gamma is upright ("normal"). Thus, change the "normal" math variant in the MathML example, so tha tboth MathML and TeX-like math end up resulting in the same output.
Math formula in block quotes, footnotes, and even headers shall use the current document font size, not some hard-coded 10pt default.
These tests use document font size at 11pt, but formulas would be typeset at 10pt as the math.font.size default was hard-coded. It now follows the current document font size, so enforce it back to 10pt in order for the test to pass unchanged.
…ont size I don't really mind us using the (non-Core) rowspacing and columnspacing attributes, but the default values must be a ratio of the current math font size, not some hard-coded value in pt.
Legit MathML elements for which a naive implementation is better than nothing and paves the way to check other more important elements from the MathML test suite.
…ike math So that stretching occurs on the relevant spans of content.
One wants `\vec{v}`, `\hat{n}` etc. to result in proper stacking of the corresponding symbol over the argument, instead of the symbol alone and the argument being lost :)
We long did without it, but MathML examples may contain lengths in px. And we'll be happy too with other uses cases such as Markdown etc. This might break some code as SILE.types.length can ignore the unknown unit and the raw number value would thus be regarded as being in pt. But that's rather a parsing bug anyway, and SILE.types.measurement spits an error, so let's not care.
In particular, in most MathML examples, tests, or results from other converters, a zero line thickness is used for binomial coefficients and stacked subscript/superscript on big operators such as sums, etc.
This was referenced Oct 27, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
WIP1
WARNING:
Currently on top of a raw merge of my previous math-related PRs.
Footnotes
"Grandpa, how did you end up on such an adventure in the perilous Land of Math?"
"Well, it all began with a simple, amusing task involving square roots, nth roots, and the like..."
"And that went smoothly, didn’t it?"
"At first, yes. But then I started picking out random formulas, sure I could typeset anything that came my way. Little did I know, I had wandered into the lair of the Hydra."
"The Hydra? That beast with countless heads that regrows two for every one that's cut off?"
"Exactly. The great monster, relentless devourer of formulas"
"And did you manage to defeat it?"
"I can’t say for sure. But I stopped complaining and making issues. I just drew my sword and kept fighting the beast. Pouring commits into the lair, one after another." ↩