- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
sphinxfootnotemark is not working correctly after update sphinx >=3.5.0 #9529
Comments
Actually, when I Tried to reproduce the minimal scenario once again without bibtex extension I found that footnotes are working when label is numeric only.
But in my documentations we used only named labels, like:
And this is not working. |
Thanks so this demonstrates the issue:
The generated tex code in the latter case is lacking some extras which one sees in the former case, and this is the cause of dysfunctional sphinx/sphinx/writers/latex.py Lines 859 to 872 in 4ba5c21
The oversight is also illustrated in this comment in the Sphinx LaTeX style file: sphinx/sphinx/texinputs/sphinx.sty Lines 303 to 307 in 4ba5c21
The comment should be "Explicitly numbered and named footnotes may be referred to". As it turns out the named footnotes do result in Docutils footnote node with the (i.e. the problem is not in the latex macro @tk0miya I am not sure what is the correct way for the |
I wonder if this is the same bug. I have footnotes inside tables, a few files like this:
Compiling with
Examining the LaTeX files, it seems the footnotes are saved with labels |
Unfortunately, there is no good way to identify a "named" footnote. It's an auto-numbered footnote having a specific node-ID. So it's difficult to detect "numbered and named footnotes". If my understanding is correct, what we really have to assign footnote IDs in LaTeX level are footnotes referred by |
Named auto numbered footnote (ex. ``[#named]``) that is referred multiple times was rendered to a question mark. This calls `\sphinxstepexplicit` for every footnote node that is referred multiple times.
Fix #9529: LaTeX: named footnotes are converted to "?"
Describe the bug
After sphinx update to version 3.5.0 or higher, only first footnote is functional after converting rst > tex > pdf. Other references to the same footnote are translated as question mark.
As little example after .rst files are translated to .tex it looks like this:
But when you translate it from latex to .pdf, output looks like:
Some text1.
Some other text?.
How to Reproduce
Expected behavior
Some text1.
Some other text1.
Your project
https://github.com/xstodu07/sphinx-issues
Screenshots
No response
OS
Linux RHEL 7.9
Python version
3.6
Sphinx version
3.5.0 or higher
Sphinx extensions
sphinxcontrib.bibtex
Additional context
I noticed that both sphinx versions (old and version >=3.5.0) use different packages for footnotes, but dont understand much the syntax of latex .sty files:
The text was updated successfully, but these errors were encountered: