summaryrefslogtreecommitdiff
path: root/sphinx/writers/html.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2014-01-11 09:50:27 +0100
committerGeorg Brandl <georg@python.org>2014-01-11 09:50:27 +0100
commitfa12d9b487ca5e71c04a602995751c46b0736b18 (patch)
treea05bf1d5f448164ba9ec16d346bf53ef843b9f89 /sphinx/writers/html.py
parent3eba4a769448770e5ed312f1a6d8048851d780b2 (diff)
downloadsphinx-fa12d9b487ca5e71c04a602995751c46b0736b18.tar.gz
Closes #901: Emit a warning when using docutils' new "math" markup without a Sphinx math extension active.
Diffstat (limited to 'sphinx/writers/html.py')
-rw-r--r--sphinx/writers/html.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/sphinx/writers/html.py b/sphinx/writers/html.py
index 1abe7b3a..c54f3369 100644
--- a/sphinx/writers/html.py
+++ b/sphinx/writers/html.py
@@ -551,6 +551,13 @@ class HTMLTranslator(BaseTranslator):
node['classes'].append('field-odd')
self.body.append(self.starttag(node, 'tr', '', CLASS='field'))
+ def visit_math(self, node, math_env=''):
+ self.builder.warn('using "math" markup without a Sphinx math extension '
+ 'active, please use one of the math extensions '
+ 'described at http://sphinx-doc.org/ext/math.html',
+ (self.builder.current_docname, node.line))
+ raise nodes.SkipNode
+
def unknown_visit(self, node):
raise NotImplementedError('Unknown node: ' + node.__class__.__name__)