You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, i'm attaching a md formatted text and the corresponding jupyter notebook describing the issue I'm having that you could use as a MWE. Should the anchor link in the examples fail to wok on github please refer to the raw files in the zip.
I'm suggesting a solution to the issue. If there's another way or if I'm doing something wrong please let me know.
Great work with your filters, thank you in advance.
pandoc-eqnos does not translate link anchors correctly when converting from markdown to jupyter notebook even though pandoc supports conversion from .md to .ipynb.
It seems that when converting markdown to jupyter notebook format, pandoc-eqnos translates the @eq:foo link id only as hardcoded latex code \qquad (#) to display the equation number. Instead, it should also attach a <a> anchor tag before the equation otherwise the cross-reference links called via @eq:foo will be broken.
This can be noticed when converting a markdown file filtered with pandoc-eqnos to jupyter notebook format or to markdown.
via pandoc test.md --standalone --filter pandoc-eqnos -o test.ipynb
$$
x^{n} + y^{n} = z^{n}
\qquad (1)
$$
Then the equation is referenced later in the text through @eq:a1. The cross-reference is converted correctly to [1](#eq:a1) in the jupyter notebook. However, the reference has nowhere to point to since the id #eq:a1 wasn't converted to an address link like <a> but hardcoded to plain text (\quadd (1)).
In fact, the following link anchor to the equation is broken 1
Correct behaviour and suggested solution
The following markdown+eqnos code
$$
x^{n} + y^{n} = z^{n}
$$ {#eq:a2}
when filtered by pandoc-eqnos and converted to .ipynb or md should have attached a <a> id tag before the equation environment in order to be referenced correctly later in the text.
Hi, i'm attaching a md formatted text and the corresponding jupyter notebook describing the issue I'm having that you could use as a MWE. Should the anchor link in the examples fail to wok on github please refer to the raw files in the zip.
I'm suggesting a solution to the issue. If there's another way or if I'm doing something wrong please let me know.
Great work with your filters, thank you in advance.
Pandoc-eqnos > jupyter notebook cross-reference issue
Description of the problem
pandoc-eqnos does not translate link anchors correctly when converting from markdown to jupyter notebook even though pandoc supports conversion from
.md
to.ipynb
.It seems that when converting markdown to jupyter notebook format, pandoc-eqnos translates the
@eq:foo
link id only as hardcoded latex code\qquad (#)
to display the equation number. Instead, it should also attach a<a>
anchor tag before the equation otherwise the cross-reference links called via@eq:foo
will be broken.This can be noticed when converting a markdown file filtered with pandoc-eqnos to jupyter notebook format or to markdown.
pandoc test.md --standalone --filter pandoc-eqnos -o test.ipynb
or
pandoc test.md --standalone --filter pandoc-eqnos -o test-2.md
Example of the problem
The equation below was typeset as,
and is converted to
via
pandoc test.md --standalone --filter pandoc-eqnos -o test.ipynb
Then the equation is referenced later in the text through
@eq:a1
. The cross-reference is converted correctly to[1](#eq:a1)
in the jupyter notebook. However, the reference has nowhere to point to since the id#eq:a1
wasn't converted to an address link like<a>
but hardcoded to plain text (\quadd (1)
).In fact, the following link anchor to the equation is broken 1
Correct behaviour and suggested solution
The following markdown+eqnos code
when filtered by pandoc-eqnos and converted to
.ipynb
ormd
should have attached a<a>
id tag before the equation environment in order to be referenced correctly later in the text.$$
x^{n} + y^{n} = z^{n}
\qquad (2)
$$
This is a working reference to equation (2) with a pointer to the
<a>
tag typeset via pandoc-eqnos usual syntax@eq:a2
([2](#eq:a2)
).eqnos-jupyter-refs-issue.zip
The text was updated successfully, but these errors were encountered: