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

literal blocks in footnotes are not supported by Latex #3003

Closed
itfanr opened this issue Oct 2, 2016 · 8 comments
Closed

literal blocks in footnotes are not supported by Latex #3003

itfanr opened this issue Oct 2, 2016 · 8 comments

Comments

@itfanr
Copy link

itfanr commented Oct 2, 2016

During converting rst to tex, I got the error.

gotgit/gotgithub#24

@jfbu
Copy link
Contributor

jfbu commented Oct 2, 2016

This issue is part of #2616.

Memo: currently already Sphinx uses package LaTeX footnote.sty but not its footnote environment which allows verbatim material. However footnote.sty is old and has bugs (incompatibility with xcolor and unawareness of hyperref in particular). Package footnotehyper fixes some such issues. It could be shipped with Sphinx taking place of the currently shipped custom tabulary.sty which incorporate a change for compatibilty with old package footnote.sty.

@jfbu
Copy link
Contributor

jfbu commented Oct 2, 2016

@tk0miya I have a branch at https://github.com/jfbu/sphinx/tree/improvefootnotes which now allows code-blocks within footnotes. I need to do some testing, it is not mature enough for a PR. Initially the branch was about improving footnotes inside table. It was stale for some months, now I have renamed and revived it. From the point of view of hyperlinks, the problem is that LaTeX's hyperref does not implement them if the code uses \footnotemark[N]/\footnotetext[N] syntax, which various parts of Sphinx use in tables.

As per allowing code-blocks we use environment form of footnote. This needs own Sphinx shipped latex package.

@jfbu
Copy link
Contributor

jfbu commented Oct 6, 2016

I have rebased and updated https://github.com/jfbu/sphinx/tree/improvefootnotes at jfbu@b5a9685. This version updates the root tests. It allows code-blocks in footnotes, even with captions ! Also hyperlinking of footnotes is improved.

Further needed improvements: modify latex.py so that the footnotes will use \footnotemark[N] in less cases. Only need in captions and inside tabulary. There is no need in longtable cells.

@itfanr
Copy link
Author

itfanr commented Oct 8, 2016

@jfbu Thank you for your answer.

@jfbu
Copy link
Contributor

jfbu commented Oct 8, 2016

PR #3022

@itfanr
Copy link
Author

itfanr commented Oct 9, 2016

@jfbu What I know about sphinx is less . I will look into it when I am free . Thank you .

@jfbu
Copy link
Contributor

jfbu commented Oct 15, 2016

fixed at b8e0e93 for 1.5a2 pre-release. Thanks for reporting !

@jfbu jfbu closed this as completed Oct 15, 2016
@itfanr
Copy link
Author

itfanr commented Oct 16, 2016

@jfbu Thank you .

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants