From fa12d9b487ca5e71c04a602995751c46b0736b18 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 11 Jan 2014 09:50:27 +0100 Subject: Closes #901: Emit a warning when using docutils' new "math" markup without a Sphinx math extension active. --- sphinx/writers/html.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sphinx/writers/html.py') 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__) -- cgit v1.2.1