This is similar to Org export to latex and HTML references, but for equations.
I like to use LaTeX math snippets in my org-files, as in
* The Quadratic Equation
The roots of $ax^2 + bx + c$ are given by
\begin{equation}
\label{eq:1}
x = \frac{-b \pm \sqrt{b^2-4ac}}{2a}
\end{equation}
According to Equation \ref{eq:1}, ...
When I export to LaTeX, the \ref{eq:1}
correctly turns into a hyper link to the equation. But I want to achieve the following additional behavior:
Inside the org file, I can click the text
\ref{eq:1}
(the text doesn't have to be\ref{eq:1}
, I just want a hyperlink) and be taken to to the equation. This functionality is present for headers, as in[[The Quadratic Equation]]
becomes clickable in Org mode.When I export to HTML, I want to the references to be kept (actually, the label (1) doesn't even show up in HTML export).
Is there a way to accomplish this?
#+begin_src latex
...#+end_src
and then, if you place#+name: eq:1
and#+label: eq:1
, you should be able to reference this block the way you want, i.e. using a link[[eq:1][first equation]]
, but for some reason it doesn't work for me (but it could be due to the changes I've made). – wvxvw Aug 21 '15 at 9:27advice
s only you can test without changes viaemacs -Q
. Naturally, this does not help if you changed the sources directly. – Tobias Aug 21 '15 at 12:39\label{}
into verbatim environment, but I'd need to dig up my changes to make sure it's my fault. It would help me though, if someone could confirm that the suggested way with#+name
etc works. – wvxvw Aug 21 '15 at 13:13<pre>
/</pre>
-Tags around theequation
environment. Therefore, firefox shows the source and not the equation. – Tobias Aug 21 '15 at 13:26by-backend
macro from here: orgmode.org/worg/org-contrib/babel/languages/… – wvxvw Aug 21 '15 at 13:38