Skip to content
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

When converting from org-mode, pandoc does not treat the footnote references that point to the same one as the same one #4647

Closed
nasyxx opened this issue May 11, 2018 · 3 comments

Comments

@nasyxx
Copy link

nasyxx commented May 11, 2018

When converting from org-mode, it seems that the pandoc does not treat the footnote references that point to the same one as the same one, but instead separates them as single.

For example,
My Org file:

This is fn fn1[fn:fn1]

This is also fn1[fn:fn1]

This is fn2[fn:2]

This is also fn2[fn:2]

[fn:fn1] footnote 1.
[fn:2] footnote 2.

Command:

pandoc -t markdown sample.org

Expected result:

This is fn fn1[^fn1]

This is also fn1[^fn1]

This is fn2[^2]

This is also fn2[^2]

[^fn1]: footnote 1.

[^2]: footnote 2.

The actual result:

This is fn fn1[^1]

This is also fn1[^2]

This is fn2[^3]

This is also fn2[^4]

[^1]: footnote 1.

[^2]: footnote 1.

[^3]: footnote 2.

[^4]: footnote 2.

After that, I also tried to use markdown directly. I found that markdown seems to be the same and cannot accurately identify footnote.

The markdown file:

This is fn1[^fn1].
This is also fn1[^fn1].

[^fn1]: 123

Command:

pandoc -t markdown sample.md

The excepted result should be the same as the original one, but the actual result is:

This is fn1[^1]. This is also fn1[^2].

[^1]: 123

[^2]: 123
@jgm
Copy link
Owner

jgm commented May 11, 2018

This is essentially the same as #1603, so closing as a duplicate.
Note that the underlying issue has to do with the way pandoc represents notes internally, and isn't specific to markdown, org, or any other input format. As a result, there's no easy fix without revising the Pandoc AST.

@jgm jgm closed this as completed May 11, 2018
@nasyxx
Copy link
Author

nasyxx commented May 11, 2018

Thank you very much. I'm sorry to duplicate. Due to I get it that when converting org to html, when searching through the issues, I specific the label as org-mode.

@jgm
Copy link
Owner

jgm commented May 11, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants