Skip to content

Commit

Permalink
Fix math-only footnotes
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanv committed Jun 24, 2014
1 parent 9523b00 commit a9877bd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions papers/00_vanderwalt/00_vanderwalt.rst
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ or on multiple, aligned lines:
g(x) &=& \int_0^\infty f(x) dx \\
&=& \ldots
The area of a circle and volume of a sphere are given as

.. math::
Expand Down Expand Up @@ -224,10 +223,11 @@ won't work try raw LaTeX:

\end{table*}

Perhaps we want to end off with a quote by Lao Tse:
Perhaps we want to end off with a quote by Lao Tse [#]_:

*Muddy water, let stand, becomes clear.*

.. [#] :math:`\mathrm{e^{-i\pi}}`
.. Customised LaTeX packages
.. -------------------------
Expand Down
4 changes: 4 additions & 0 deletions publisher/writer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,10 @@ def visit_image(self, node):
filename))

def visit_footnote(self, node):
# Handle case where footnote consists only of math
if len(node.astext().split()) < 2:
node.append(nodes.label(text='_abcdefghijklmno_'))

# Work-around for a bug in docutils where
# "%" is prepended to footnote text
LaTeXTranslator.visit_footnote(self, node)
Expand Down

0 comments on commit a9877bd

Please sign in to comment.