-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support math equation numbering and its corresponding reference #48
Comments
This would be indeed a great feature to have. |
Is there any markdown syntax to support this feature? |
This should all be handled by mathjax, but it does not seem to work in Typora. I'm not sure how Typora calls mathjax, but it might be that mathjax is called separately for each equation and hence it doesn't know about the references. To sum up, I imagine this would work in Typora: $$
\begin{equation}
a^2+b^2=c^2
\label{eq:pythagoras}
\tag{1}
\end{equation}
$$
Referring to Eq. $\eqref{eq:pythagoras}$. |
Actually, it does seem to work when pasted all at once in a fresh new document. But after editing (while changing nothing), the math block stays unprocessed, There might be some useful information here. |
Thanks, I will check the doc |
I would like to second here, this would be a great future. |
I would love to have this feature -- I've attempted to modify the MathJax.Hub.Config to include equationNumbers (accessed by toggling the DevTools): |
I've modified the MathJax.Hub.Config in "...\Typora\resources\app\window.html" to include auto-numbering, as shown in the snippet in my comment above. This allows the use of the Remaining issues:
|
On a mac you can turn on equation autonumbering by editing /Applications/Typora.app/Contents/Resources/TypeMark/lib/MathJax-2.6.1/jax/input/TeX/config.js changing "none" to "AMS" or "all" in equationNumbers:{autoNumber:"none",formatNumber:function(a){return a},formatTag:function(a){return"("+a+")"}. |
I configured the MathJax in It seems typora uses the MathJax to rendered it once and stored the resulted CHTML (or HTML+CSS?). The problem then is if I edit the document non-linearly, the numbering will be incorrect. In fact, when I tested it, even if I have only 1 numbered equation, editing the same equation repeatedly will results in incrementing the number count on that equation. Given how typora works (live view on the source), this behavior on the preview is acceptable. However, when it is exported as HTML, the results would still be the same. So I suggest it to do a complete rendering at the time of export to yield a correct result. |
Already add such option |
No description provided.
The text was updated successfully, but these errors were encountered: