-
Notifications
You must be signed in to change notification settings - Fork 18
PR: add support for equation labelling and referencing (more mathjax compatibility) #53
Conversation
why isn't this the default in katex itself?
Thanks @qnxor, can you fix the linting error please? |
I would but it gives no details, it's from your |
It's the
|
Never bothered with yarn or prettier in the past myself (edit: I could install only prettier from node manually without yarn?) |
Looks like you have a more recent yarn version than what we expect (we use Yarn 1, you probably have version 2+, you can check the exact version via |
I'm on Ubuntu 22.04 with standard apt repos (no ppas) About your suggested change, it should work and it's equivalent, but I like to keep initializer code separated from the iterator, otherwise one would argue you should do away with the I'll install prettier manually to output something your linter won't complain about. |
Fixed into a new commit. Turns out prettier doesn't like single quoted strings. You can run the checks again and approve it. |
@pmusaraj sorry, your suggestion is actually not equivalent and it won't work since elem is an argument of the My code is also (marginally) more efficient as it doesn't create a new object on every call to |
Thanks @qnxor, merging. |
As seen here: KaTeX/KaTeX#2003 (comment)
I enabled it in the Discourse code too as seen in the commit. This adds support for
\tag, \label, \ref, \eqref
so equations can be labeled and referenced (references are clickable too). This is another feature that Katex disables by default. Enabling it brings the Katex implementation in DIscourse more inline with Mathjax. My previous PR added support for persistent macros.Tested and working in latest Discourse stable.
@pmusaraj