Math extension: support alignment of multiple equations for MathJAX.

This is a follow-up commit of #2254, which supported alignment of
multiple equations for imgmath and LaTeX output.
This commit is contained in:
Hong Xu
2016-02-18 18:46:45 -08:00
parent ae8cbec29a
commit bb9cde4e32
2 changed files with 25 additions and 11 deletions

View File

@@ -43,6 +43,17 @@ def test_imgmath_svg(app, status, warning):
'\s*alt="a\^2\+b\^2=c\^2"/>\s*</p>\s*</div>')
assert re.search(html, content, re.S)
@with_app('html', testroot='ext-math',
confoverrides={'extensions': ['sphinx.ext.mathjax']})
def test_mathjax_align(app, status, warning):
app.builder.build_all()
content = (app.outdir / 'index.html').text()
html = (r'<div class="math">\s*'
r'\\\[ \\begin\{align\}\\begin\{aligned\}S \&amp;= \\pi r\^2\\\\'
r'V \&amp;= \\frac\{4\}\{3\} \\pi r\^3\\end\{aligned\}\\end\{align\} \\\]</div>')
assert re.search(html, content, re.S)
@with_app('html', testroot='ext-math',
confoverrides={'math_number_all': True,
'extensions': ['sphinx.ext.mathjax']})