Fix LaTeX output of \mathbb in math

If \mathbb is used in math, which is commonly used to represent sets,
the output LaTeX won't compile. This commit fixes this issue by adding
amsfonts package in the setup of sphinx.ext.mathbase .
This commit is contained in:
Hong Xu
2015-12-19 19:34:39 -08:00
parent dd74537c62
commit 4d3fdc0e47
2 changed files with 5 additions and 0 deletions

View File

@@ -214,3 +214,4 @@ def setup_math(app, htmlinlinevisitors, htmldisplayvisitors):
app.add_role('eq', eq_role)
app.add_directive('math', MathDirective)
app.connect('doctree-resolved', number_equations)
app.add_latex_package('amsfonts')

View File

@@ -19,4 +19,8 @@ This is inline math: :math:`a^2 + b^2 = c^2`.
e^{ix} = \cos x + i\sin x
.. math::
n \in \mathbb N
Referencing equation :eq:`foo`.