-
Notifications
You must be signed in to change notification settings - Fork 45
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
Cross reference equations #37
Comments
I don't quite understand the use case. But asciidoctor does not support label and reference equations using latex syntax. The native way is to assign the For example: == Let's try
[stem, id="myequation"]
++++
\begin{equation}
c^2 = a^2 + b^2 + 5
\end{equation}
++++
I refer back to <<myequation, Equation 2.5>> |
Also I'm pretty sure that mathematical has no such thing as continuous equation numbering. Two equation environments should both have the number 1. |
@ProgramFan, @tstumm Thank you for your reply! Of course asciidoctor supports reference equations using latex syntax! Check my example (it works correctly if asciidoctor is used without asciidoctor-mathematical). Also, you can consult asciidoctor's manual what for is the @ProgramFan Thank you for your example, but it is not practical at all, unfortunately. This is because you have to write explicitly the number of equation in the source file ( That is why people are using automatic numbering and referencing of equations. |
@tstumm No, you are wrong. My equations get sequential numbers 1,2,3, ..etc automatically. I just cannot reference them, so that these numbers appear in text. |
Here I've created a testcase:
If I compile it as If I compile it with asciidoctor-mathematical as |
@RarrugasTetra Mhm, okay seems like I underestimated mathematical. But as far as I know, eqref is implemented by MathJax which is just used to render TeX stuff in browser. Hence, this is no feature of Asciidoctor itself! I'm not sure if the implementation would be trivial, as we get absolutely no feedback on any equations / from mathematical. So we actually do not know the equation number when we generate the SVG / PNG. |
Same goes for eqnums, this is all handled by MathJax is not natively supported by Asciidoctor itself. |
@tstumm Sure, you are right about MathJax. I do not mean that asciidoctor-mathematical has a bug or so... but it would be very pity if it could not not support the autonumbering/referencing. Would it be possible to process |
@RarrugasTetra did you solve this? how? |
No, I do not know how to cross-reference equations... |
Let's accept that asciidoctor does support numbering stem blocks yet. asciidoctor-mathematical can not do this on its own without introducing new syntax, which is the last thing such an extension would ever want to do. Numbering the equations is the latex way, not the asciidoc way. If you really want that, you can use asciidoctor with asciidoctor-latex to produce directly latex documents. |
I would like to define an equation and then to reference it later in my text. The following example works fine with bare asciidoctor:
A number is assigned automatically to the equation and the same number appears in the text below.
Now, I would like to use asciidoctor-mathematical, but the referencing does not work anymore. The equation is generated with the number, this is already something, but the referencing does not work!
In HTML I get just
(???)
and in PDF I get the unprocessed\eqref{myequation}
.I am using asciidoctor 1.5.4 and asciidoctor-mathematical 0.2.2
Could you help me to solve the problem?
The text was updated successfully, but these errors were encountered: