-
Notifications
You must be signed in to change notification settings - Fork 12
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
Footnotes support? #22
Comments
Good catch. Seemingly this is an option in the parser, not sure why. commonmark::markdown_html('a[^1] \n\n[^1]: test footnote', footnotes = TRUE)
# [1] "<p>a<sup class=\"footnote-ref\"><a href=\"#fn-1\" id=\"fnref-1\" data-footnote-ref>1</a></sup></p>\n<section class=\"footnotes\" data-footnotes>\n<ol>\n<li id=\"fn-1\">\n<p>test footnote <a href=\"#fnref-1\" class=\"footnote-backref\" data-footnote-backref aria-label=\"Back to content\">↩</a></p>\n</li>\n</ol>\n</section>\n" |
Thanks! I think it will be nice to enable it by default. However, the LaTeX output is not implemented yet: Lines 447 to 449 in 97647b4
I don't know why it was not implemented, i.e., isn't it just |
I have no idea, you'd have to ask the folks at cmark-gfm. I guess it's not part of the official spec? |
Okay. I'll ask there. Before LaTeX output is implemented, I think it may be better to disable this option by default for BTW, it will be great if you can make a new CRAN release but there is no hurry (I spent some time on a clumsy implementation of footnotes in R before I dug into GFM's C code and discovered that GFM actually had this feature). Thanks again! |
One more thing: do you have a plan to upgrade to 0.29.0.gfm.9? There have been some improvements like github/cmark-gfm@c32ef78. |
OK I've upgraded to 0.29.0.gfm.9 now. I can do a CRAN release any moment, if we agree to switch the default or not :) |
Sounds great! I don't have a strong opinion on whether to enable |
OK in that case I will leave it disabled by now, such that there is no change of default behavior, and submit to CRAN now. Perhaps we can enable it by default in future versions, but that would require more checking of reverse dependencies to make sure we don't break things. |
Absolutely. Let's see if anyone could help with github/cmark-gfm#314. |
Ok it is on cran now.
Op vr 17 mrt. 2023 17:51 schreef Yihui Xie ***@***.***>:
… that would require more checking of reverse dependencies to make sure we
don't break things.
Absolutely.
Let's see if anyone could help with github/cmark-gfm#314
<github/cmark-gfm#314>.
—
Reply to this email directly, view it on GitHub
<#22 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABUZ72IKVRUGZ6CE42MYFDW4SI7XANCNFSM6AAAAAAV5X7E2E>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
Perfect! |
It seems that footnotes are supported in GFM:
but somehow this feature is not enabled in the R package?
And worse still, a footnote can be treated as a link definition:
@jeroen Do you know how to enable footnotes support? Thanks!
The text was updated successfully, but these errors were encountered: