From e9aae6563d645f56819e412481b40d21c3a7ba70 Mon Sep 17 00:00:00 2001 From: Takayuki Shimizukawa Date: Tue, 26 Aug 2014 22:37:18 +0900 Subject: [PATCH] Fix: footnotes from table get displayed twice in LaTeX. To fix this, restoring footnote support hotfix for tabulary.sty that had been lost at f938a95 for #949. Closes #1522 --- CHANGES | 2 ++ sphinx/texinputs/tabulary.sty | 3 +++ 2 files changed, 5 insertions(+) diff --git a/CHANGES b/CHANGES index 86ecb86fa..50cc401c3 100644 --- a/CHANGES +++ b/CHANGES @@ -40,6 +40,8 @@ Bugs fixed to Takeshi Komiya. * #1477: gettext does not extract nodes.line in a table or list. * #1544: `make text` generate wrong table when it has empty table cells. +* #1522: Footnotes from table get displayed twice in LaTeX. This problem has + been appeared from Sphinx-1.2.1 by #949. Release 1.2.2 (released Mar 2, 2014) ==================================== diff --git a/sphinx/texinputs/tabulary.sty b/sphinx/texinputs/tabulary.sty index 7ea572c12..11fdf7428 100644 --- a/sphinx/texinputs/tabulary.sty +++ b/sphinx/texinputs/tabulary.sty @@ -109,6 +109,8 @@ Z \string\tymax: \the\tymax^^J}% \global\advance\TY@linewidth-#1\relax} \def\endtabulary{% \gdef\@halignto{}% + \let\TY@footnote\footnote% + \def\footnote{}% prevent footnotes from doing anything \expandafter\TY@tab\the\toks@ \crcr\omit {\xdef\TY@save@row{}% @@ -172,6 +174,7 @@ Z \message{> tymin}% \TY@checkmin \TY@count\z@ \let\TY@box\TY@box@v + \let\footnote\TY@footnote % restore footnotes {\expandafter\TY@final\the\toks@\endTY@final}% \count@\z@ \@tempswatrue