Skip to content

Class#507

Closed
daniel3735928559 wants to merge 4 commits intoKaTeX:masterfrom
daniel3735928559:class
Closed

Class#507
daniel3735928559 wants to merge 4 commits intoKaTeX:masterfrom
daniel3735928559:class

Conversation

@daniel3735928559
Copy link

In a similar spirit to #506 (and for the same reason--this time as part of the plan to add mouse support to the editor), adds an \xmlClass function that adds adds its first argument as a class to whatever its second argument is. For example, \xmlClass{foo}{x}+2 will render x+2 like normal, but the span for the x will have class .foo in addition to all its other usual classes.

This change ended up being a little bit invasive, and I am also interested in any methods of doing the same thing more simply.

@k4b7
Copy link
Member

k4b7 commented Jul 29, 2016

@daniel3735928559 thanks for the pull request. I won't be merging this b/c we'd like to avoid non standard commands in katex-core. I would like to eventually have a plugin system. This change highlights the need for plugins to have access to specific renderers.

@k4b7
Copy link
Member

k4b7 commented Aug 22, 2017

Blocked on #762.

@ry-randall
Copy link
Member

I know this is non-standard according to LaTeX standards, but I do feel like this could represent a core feature for KaTeX. MathJax has a similar feature, which can be found here: http://docs.mathjax.org/en/latest/tex.html#html

I think it could be difficult to implement without access to the KaTeX core.

@k4b7
Copy link
Member

k4b7 commented Jan 22, 2018

Superseded by #1074.

@k4b7 k4b7 closed this Jan 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants