how can I make footnotes on the bottom of the page insteand of the end of the document in the python programming language

178 views Asked by At

I am using .. [2] / [2]_ style footnotes in restructuredText. I would like them to be displayed on the end of the page where they occur rather than at the end of the document. How can I go about this? I need a solution that works with rst2latex.

/please refrain from classifying this as of topic. restructuredText is part of the PYTHON programming language.

1

There are 1 answers

0
Émilien Tlapale On

The LaTeX writer in docutils uses \footnotetext to specify the page at the bottom of which the footnote text should appear. If you want the text to appear at the same page as its mark, you can try to put them close together.

If you want to directly use the \footnote command in LaTeX, you will have to create a new LaTeX writer, probably by extending the LaTeXTranslator class in docutils.writers.latex2e and overload the visit_footnote_reference function. There, search for the footnote content in self.document.footnotes, and write a \footnote command to the output. Also overload visit_footnote and do nothing there (raise nodes.SkipNode).

Alternatively, you can redefine some TeX command to generate the text at the correct position, probably in two passes to get the footnotes marks and contents at first.