-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fix color support for stretchy, strikethrough, and fbox #792
Conversation
Summary: Stuff like `\red{\overbrace{AB}}` works now in addition to `\color{red}{\overbrace{AB}}`. Strikethrough now respects color. The Firefox in the screenshotter doesn't seem to support `background-image` + `mask`, but I manually tested that the latest Firefox does. Test plan: Ran `make`, then tested in latest Chrome and Firefox to ensure color support was working, then ran `make screenshots`.
CLA signature looks good 👍 |
Interesting. I did not realize that KaTeX supported that syntax. It does, though. Are there any LaTeX packages that support this syntax? |
Nor did I! Here's the code. And I guess there are matching |
Ah, I see. Well, @xymostech has written issue #28, which states that these custom colors were meant to be KA-only and not available for everyone. There is some push back in the discussion. I suppose one approach would be to accept this PR, so that KaTeX has consistent behavior. Then, if a PR is ever written to resolve #28, it would have to address the whole issue. |
Yes, the intent was always to move those to macros as soon as was possible. I think this change seems pretty unambiguously good especially in the existing presence of the options.getColor method although I don't understand the significance of the CSS change. |
The CSS change fixes a bug which has crept into function Thank you, @xsznix! Also, Firefox 53 was the first Firefox release with full |
In this case, perhaps we should accept this PR and then make a new one to rewrite |
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.
LGTM. Thanks for the fixes, @xsznix!
I think that makes sense.
As per the comments in #28, we definitely want to move KA custom colors out of KaTeX but in a thoughtful way. |
Summary:
Stuff like
\red{\overbrace{AB}}
works now in addition to\color{red}{\overbrace{AB}}
. Strikethrough now respects color. The Firefox in the screenshotter doesn't seem to supportbackground-image
+mask
, but I manually tested that the latest Firefox does.Test plan:
Ran
make
, then tested in latest Chrome and Firefox to ensure color support was working, then ranmake screenshots
.