MyST-Parser icon indicating copy to clipboard operation
MyST-Parser copied to clipboard

Is it possible to make footnotes appear somewhere other than the bottom of the document?

Open asmeurer opened this issue 4 years ago • 6 comments

With RST you can use rubric: footnotes to make footnotes appear wherever you want. Is it possible to do this in MyST? It seems to only put them at the bottom of the document.

asmeurer avatar Jul 06 '20 21:07 asmeurer

Also would https://github.com/executablebooks/MyST-Parser/issues/164 make "rubric: footenotes" do what I want, or would MyST still try to put the footnotes at the bottom?

asmeurer avatar Jul 06 '20 21:07 asmeurer

No, not at present, all footnotes are gathered during parsing, then output at the end of the document in https://github.com/executablebooks/MyST-Parser/blob/877b80cd64cd254abe965b4cfb6b0c7abe2b29ab/myst_parser/docutils_renderer.py#L67

chrisjsewell avatar Jul 07 '20 05:07 chrisjsewell

Do you have an example of the kind of outcome you are looking to achieve?

chrisjsewell avatar Jul 07 '20 06:07 chrisjsewell

https://www.asmeurer.com/brown-water-python/tokens.html#op

I generate the table as a rst list table https://github.com/asmeurer/brown-water-python/blob/master/docs/exact_type_table.py. It would be possible, though a little more annoying, to do this with a Markdown table, but I would prefer to keep the footnotes next to the table as they are now.

asmeurer avatar Jul 07 '20 07:07 asmeurer

Yep sounds reasonable; I have done something similar with tables in latex. Ideally what I think you would want here is a "scoped" footnote section, i.e. at the bottom of your table, you only want footnotes from that table, not footnotes before or after the table

chrisjsewell avatar Jul 08 '20 03:07 chrisjsewell

+1 for this feature!

adamgayoso avatar Mar 13 '22 03:03 adamgayoso