-
Notifications
You must be signed in to change notification settings - Fork 102
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
Mathvariant fixes #2292
Merged
Merged
Mathvariant fixes #2292
Changes from 6 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
05bb502
Be careful about propogating the correct font when synthesizing math …
brucemiller 15cb596
Omit mathvariant=normal when it's the default
brucemiller 0cb7fee
Cleanup test cases for missing/erroneous/redundant font or mathvarian…
brucemiller 097c24b
Add class ltx_mathvariant_xxx to MathML tokens whenever the mathvaria…
brucemiller bddfc1c
Add fallback CSS classes for unhandled mathvariants
brucemiller e0142e4
Update testcase for additional css classes
brucemiller 8a87fa9
Don't add CSS class for mathvariant=normal
brucemiller 12df8ca
Avoid mathvariant on m:mtext (only use css); avoid visible css effect…
brucemiller ad4b68e
Update testcase for simplified mathml
brucemiller e5d7b6a
clarify comment
brucemiller File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Should this check also unset
$variant = undef;
after it is moved to a class value?As it is, I see that one of the tests has both a class and mathvariant attribute, as in:
But in MathML Core the only prescribed use of mathvariant is for the
normal
value. So theclass
addition should suffice. That was my suggestion in #2051 (comment)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.
Right, well as I understood the original issue, and the implications of the (eventually) linked mozilla issue, it was that Core will ignore (most) mathvariants, and that Full may ignore it, and that CSS could be used as a fallback. Moreover, that browsers should be able to cope with there being both CSS and mathvariant.
Keeping the mathvariant at least records for MathML-Full agents which don't support CSS that the token was (apparently) intended to belong to a certain semantic class. Removing it seems somehow wrong, even though in the current scheme of things it is likely always to be ignored (but harmless?)
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.
Since it is ignored in practice, keeping it until there is some actual issue caused by it is likely harmless, as you say. And indeed it is a MathML Full use.
I've heard rumors of hypothetical MathML Full agents without CSS support, but I wonder if/when we'll have some to test with...
Linking the current MathML Core text on mathvariant just in case:
No further comments on the PR, looks good to merge.