Conversation
| if (parser.settings.strict) { | ||
| parser.settings.reportNonstrict("htmlExtension", | ||
| "HTML extension is disabled on strict mode"); | ||
| } |
There was a problem hiding this comment.
I'm not sure they are necessary, as the trust setting controls them.
|
@ylemkimon this is great! |
|
Does not work with fraction, eg: \htmlId{id1}{a}+\frac{1}{\htmlId{id2}{b}}-c id1 woks, but id2 does not. |
|
This is ready for review! |
Codecov Report
@@ Coverage Diff @@
## master #2082 +/- ##
==========================================
- Coverage 94.86% 94.81% -0.06%
==========================================
Files 81 82 +1
Lines 5262 5302 +40
Branches 921 927 +6
==========================================
+ Hits 4992 5027 +35
- Misses 247 252 +5
Partials 23 23
Continue to review full report at Codecov.
|
|
Would it be possible to add some docs for what \htmlId, \htmlStyle, \htmlClass and in particular \htmlData actually do? How can I preview the docs? If I click on "Deploy preview ready!" I get to a preview which has no updated HTML section in the docs. |
|
Now it works for me! This is great progress, although some CSS properties seem to be still under full KaTeX control, for example in
the color and font-size are applied, but the font-family and style are not. So a general \html would still be necessary I guess. |
|
@phlegmaticprogrammer there's a ticket for adding |
k4b7
left a comment
There was a problem hiding this comment.
Thanks for adding all of these HTML related commands. The implementation looks good. Requesting a few minor changes:
- call
buildStringin render-a11y-string.js if possible - throw an error if parsing args to
\htmlDatafails - make the docs in support_table.md a bit clearer
- screenshot tests (it's hard to see that spacing isn't affected by these commands)
| - Equivalents of MathJax `\class`, `\cssId`, and `\style` are `\htmlClass`, | ||
| `\htmlId`, and `\htmlStyle`, respectively, to avoid ambiguity. |
There was a problem hiding this comment.
Thanks for adding this. If people want to use the MathJax variants they can set up some macros.
k4b7
left a comment
There was a problem hiding this comment.
LGTM. Thanks for adding these commands. I'm sure this will make a lot of people very happy.
|
This seems to be merged, but not released yet. What is the timeline for having this in a version available for use? I would really like to use this feature soon |
This PR adds four new commands that give access to some HTML features:
\htmlClass,\htmlId,\htmlStyle, and\htmlData.Fixes #90.
Fixes #2029.