mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
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:
@@ -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 \&= \\pi r\^2\\\\'
|
||||
r'V \&= \\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']})
|
||||
|
||||
Reference in New Issue
Block a user