Replies: 1 comment 1 reply
-
You can't get the equation numbers using javascript since CSS counters don't even belong in the DOM. So here's one way you might go about it. We find all the tags and their numbers, and keep track of which number goes with which equation. This may or may not do what you need.
This will only work if you're using simple counters. Hope it's of some use. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I use KaTeX with TidllyWIki (https://kookma-katex.tiddlyhost.com/) and some comment considering older TiddlyWiki versions has brought to my attention, that KaTeX uses the css counter "katexEqnNo" to count through equations. This had me thinking: There surely is a way to save the current counter number as in:
myLabel = katexEqnNo
Then later one could reference said equation as equation
(myLabel)
.I have tried several methods of getting the value of katexEqnNo but my HTML and CSS are very rusty. This seemed like it should be doable, so I'm grateful for any ideas as to how to obtain the current katexEqnNo for a certain equation.
Beta Was this translation helpful? Give feedback.
All reactions