mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #2071: Same footnote in more than two section titles => LaTeX/PDF Bug
This commit is contained in:
1
CHANGES
1
CHANGES
@@ -18,6 +18,7 @@ Bugs fixed
|
||||
* #2003: Fix decode error under python2 (only) when ``make linkcheck`` is run
|
||||
* #2186: Fix LaTeX output of \mathbb in math
|
||||
* #1480, #2188: LaTeX: Support math in section titles
|
||||
* #2071: Fix same footnote in more than two section titles => LaTeX/PDF Bug
|
||||
|
||||
|
||||
Release 1.3.3 (released Dec 2, 2015)
|
||||
|
||||
@@ -1662,7 +1662,7 @@ class LaTeXTranslator(nodes.NodeVisitor):
|
||||
# if a footnote has been inserted once, it shouldn't be repeated
|
||||
# by the next reference
|
||||
if used:
|
||||
if self.table or self.in_term:
|
||||
if self.table or self.in_term or self.in_title:
|
||||
self.body.append('\\protect\\footnotemark[%s]' % num)
|
||||
else:
|
||||
self.body.append('\\footnotemark[%s]' % num)
|
||||
|
||||
@@ -33,6 +33,9 @@ The section with a reference to [AuthorYear]_
|
||||
.. [1] Second
|
||||
.. [#] Third
|
||||
|
||||
The section with a reference to [1]_
|
||||
=====================================
|
||||
|
||||
`URL in term <http://sphinx-doc.org/>`_
|
||||
Description Description Description ...
|
||||
|
||||
|
||||
@@ -331,6 +331,7 @@ def test_reference_in_caption(app, status, warning):
|
||||
assert '\\chapter{The section with a reference to {[}AuthorYear{]}}' in result
|
||||
assert '\\caption{The table title with a reference to {[}AuthorYear{]}}' in result
|
||||
assert '\\paragraph{The rubric title with a reference to {[}AuthorYear{]}}' in result
|
||||
assert '\\chapter{The section with a reference to \\protect\\footnotemark[1]}' in result
|
||||
|
||||
|
||||
@with_app(buildername='latex', testroot='footnotes',
|
||||
|
||||
Reference in New Issue
Block a user