remarkjs / remark-footnotes

Deprecated plugin to support pandoc footnotes — please use `remark-gfm` instead
40 stars 4 forks source link

Allow footnote position remains unchanged #8

Closed cangSDARM closed 1 year ago

cangSDARM commented 1 year ago

Initial checklist

Problem

Now a section tag will be generated at the bottom of the page, which is not what I want:

Here is a footnote reference,[^1]
and another footnote.[^2]

[^1]: Here is the footnote.

This paragraph won’t be part of the note, because it
isn’t indented.

[^2]: Here is another footnote.

(I hope) it will yield to(the sequence matter):

<p>
Here is a footnote reference,<sup>1</sup>
and another footnote.<sup>2</sup>
</p>

<ol><li>Here is the footnote.<a>↩</a><li></ol>

<p>This paragraph won’t be part of the note, because it
isn’t indented.</p>

<ol><li>Here is another footnote.<a>↩</a><li></ol>

<!-- no extra section was yielded -->

Solution

add a config perhaps?

I checked the underlying dependencies and a section tag was already generated at the underlying implementation. Maybe this section can be converted to what I expect or the underlying can be rewritten to achieve this effect? (I've considered implementing it myself, but the underlying logic seems more complicated than I thought, so bring up the issue)

Alternatives

Other similar plugins, perhaps? I don't know what to search for, please let me know if you have

wooorm commented 1 year ago

a) that doesn’t seem to be what “footnotes” are for, the “foot” refers to them being at the end, not being everywhere? If you want different things, you can use directives for that https://github.com/remarkjs/remark-directive b) we work how GH works as that’s a good default. But you can change things to match your wants by making your own plugins, in this case, a rehype plugin could transform the HTML section to different things (e.g., you could make the notes “inline”)

cangSDARM commented 1 year ago

Thanks for your advice. I'll check it out

wooorm commented 1 year ago

OK closing this, I lean to think this can be solved externally, with directives or a plugin! Feel free to open a discussion if you need more general help on how to do things!

github-actions[bot] commented 1 year ago

Hi! This was closed. Team: If this was fixed, please add phase/solved. Otherwise, please add one of the no/* labels.