Commits

Georg Brandl  committed 1bd45ba

Fix #633: Allow footnotes in section headers in LaTeX output.

  • Participants
  • Parent commits 9e35e7e

Comments (0)

Files changed (2)

 Release 1.0.8 (Sep 22, 2011)
 ============================
 
+* #633: Allow footnotes in section headers in LaTeX output.
+
 * #616: Allow keywords to be linked via intersphinx.
 
 * #613: Allow Unicode characters in production list token names.

File sphinx/texinputs/sphinx.sty

   }
   {\endlist}
 }{}
+
+
+% From footmisc.sty: allows footnotes in titles
+\let\FN@sf@@footnote\footnote
+\def\footnote{\ifx\protect\@typeset@protect
+    \expandafter\FN@sf@@footnote
+  \else
+    \expandafter\FN@sf@gobble@opt
+  \fi
+}
+\edef\FN@sf@gobble@opt{\noexpand\protect
+  \expandafter\noexpand\csname FN@sf@gobble@opt \endcsname}
+\expandafter\def\csname FN@sf@gobble@opt \endcsname{%
+  \@ifnextchar[%]
+    \FN@sf@gobble@twobracket
+    \@gobble
+}
+\def\FN@sf@gobble@twobracket[#1]#2{}