From 042daed015ace1ca3c7b90b550cfbc2d0ad46761 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sun, 29 Nov 2015 22:03:48 +0900 Subject: [PATCH] Update CHANGES for #2140 --- CHANGES | 1 + sphinx/writers/latex.py | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 3c0fc312e..32de69eb9 100644 --- a/CHANGES +++ b/CHANGES @@ -70,6 +70,7 @@ Bugs fixed * #1818: `sphinx.ext.todo` directive generates broken html class attribute as 'admonition-' when :confval:`language` is specified with non-ASCII linguistic area like 'ru' or 'ja'. To fix this, now ``todo`` directive can use ```:class:`` option. +* #2140: Fix footnotes in table has broken in LaTeX Release 1.3.1 (released Mar 17, 2015) ===================================== diff --git a/sphinx/writers/latex.py b/sphinx/writers/latex.py index c88b37395..5ec86019f 100644 --- a/sphinx/writers/latex.py +++ b/sphinx/writers/latex.py @@ -1555,7 +1555,10 @@ class LaTeXTranslator(nodes.NodeVisitor): # if a footnote has been inserted once, it shouldn't be repeated # by the next reference if used: - self.body.append('\\footnotemark[%s]' % num) + if self.table: + self.body.append('\\protect\\footnotemark[%s]' % num) + else: + self.body.append('\\footnotemark[%s]' % num) elif self.table: self.footnotestack[-1][num][1] = True self.body.append('\\protect\\footnotemark[%s]' % num)