mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #2370: the equations are slightly misaligned in LaTeX
This commit is contained in:
@@ -71,3 +71,22 @@ def test_math_number_all_latex(app, status, warning):
|
||||
app.builder.build_all()
|
||||
|
||||
content = (app.outdir / 'test.tex').text()
|
||||
print content
|
||||
macro = (r'\\begin{align\*}\\begin{aligned}\s*'
|
||||
r'\\!\\begin{split}a\^2\+b\^2=c\^2\\end{split}\\\\\s*'
|
||||
r'\\end{aligned}\\end{align\*}')
|
||||
assert re.search(macro, content, re.S)
|
||||
|
||||
macro = r'Inline \\\(E=mc\^2\\\)'
|
||||
assert re.search(macro, content, re.S)
|
||||
|
||||
macro = (r'\\begin{align\*}\\begin{aligned}\s*'
|
||||
r'\\!\\begin{split}e\^{i\\pi}\+1=0\\end{split}\\\\\s+'
|
||||
r'\\end{aligned}\\end{align\*}')
|
||||
assert re.search(macro, content, re.S)
|
||||
|
||||
macro = (r'\\begin{align\*}\\begin{aligned}\s*'
|
||||
r'\\!\\begin{split}S &= \\pi r\^2\\end{split}\\\\\s*'
|
||||
r'\\!\\begin{split}V &= \\frac\{4}\{3} \\pi r\^3\\end{split}\\\\\s*'
|
||||
r'\\end{aligned}\\end{align\*}')
|
||||
assert re.search(macro, content, re.S)
|
||||
|
||||
Reference in New Issue
Block a user