Katex: Add support for tikz and tikzcd

Created on 11 Apr 2015  Â·  8Comments  Â·  Source: KaTeX/KaTeX

Hi,

Could you add support for tikz and tikzcd so diagrams such as

image

image

image

can be supported?

Most helpful comment

I'm going to reopen this as it's a feature request I hear often, so it'd be nice if it got some attention.

All 8 comments

This would be cool, but honestly, tikz support would be a gargantuan undertaking, probably larger than all of KaTeX itself at present, so we're unlikely to do this. You could use SVG to draw similar diagrams on the web.

Is there at least any hope that at least commutative diagrams in the spirit of tikzcd could be supported in the future? Similar to the amscd extension for MathJax just using tikzcd syntax (and of course for KaTeX). At least basic support of commutative diagrams would be nice.

This feels like something that should be done as an extension, similar to our mhchem support.

I'm going to reopen this as it's a feature request I hear often, so it'd be nice if it got some attention.

Hello! I am the developer of minilatex.lamdera.app which has been using KaTeX as of this past August. The project has matured since then, and I have a group of math profs who want to use it for a collaborative project. They will no doubt use commutative diagrams, which is supported by the amscd package. Has there been any progress on this (as an extension perhaps?). If not perhaps there is a way I could help out to expedite this

@jxxcarlson No progress that I'm aware of. You're welcome to try writing an extension, probably starting with a small subset to target. But as pointed out above, it's likely a large undertaking. I also wonder whether it's possible without knowing the width/height of LaTeX renderings, which KaTeX currently doesn't support (specifically width is not known/computed, in particular because font ligatures are complicated).

It looks like quiver is an interactive GUI web-based commutative diagram editor that uses KaTeX to render math/labels, and uses SVG to render the arrows (perhaps based on the way KaTeX does). Maybe there's a way to use that as an alternative?

Thanks very much for your reply. I will investigate quiver first.

Sadly, commutative diagrams are an essential part of many fields of mathematics, including mine (algebraic geometry). To that end, would implementing something like the AmsCD package in KaTeX be easier than tikzcd?

I had been using MathJax in my project, but since it is based on Elm,, math rendering needs to be done via a custom element. The KaTeX

katex.renderToString

Is very performant in this respect. Not quite sure why the big performance difference. Perhaps MathJax was sets up its entire environment for each element. Dunno.

Best regards,

Jim Carlson

On Dec 13, 2020, at 3:15 PM, Erik Demaine notifications@github.com wrote:

@jxxcarlson https://github.com/jxxcarlson No progress that I'm aware of. You're welcome to try writing an extension, probably starting with a small subset to target. But as pointed out above, it's likely a large undertaking. I also wonder whether it's possible without knowing the width/height of LaTeX renderings, which KaTeX currently doesn't support (specifically width is not known/computed, in particular because font ligatures are complicated).

It looks like quiver https://github.com/varkor/quiver is an interactive GUI web-based commutative diagram editor that uses KaTeX to render math/labels, and uses SVG to render the arrows (perhaps based on the way KaTeX does). Maybe there's a way to use that as an alternative?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/KaTeX/KaTeX/issues/219#issuecomment-744062162, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFGAN2PWMP43OCXD3KTA6DSUUOHLANCNFSM4A72YIIQ.

As an update to this, AMS's CD environment is now supported in the master branch, thanks to #2396. So you should give that a try! (e.g. on our demo page) Hopefully this suffices for many people's commutative diagrams, as tikz would be very complicated to implement.

@jxxcarlson KaTeX is generally much faster than MathJax. This used to be largely because KaTeX doesn't query the DOM while MathJax doesn't, but I'm not sure if that's the only reason or even if it's still true of MathJax.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sophiebits picture sophiebits  Â·  3Comments

shaunc picture shaunc  Â·  4Comments

fabiospampinato picture fabiospampinato  Â·  4Comments

StaloneLab picture StaloneLab  Â·  3Comments

jason-s picture jason-s  Â·  3Comments