latex `\noindent` for non-inline images, not only if top level

This commit is contained in:
jfbu
2016-06-19 11:04:45 +02:00
parent 664e24cf86
commit beeeb56c27
2 changed files with 15 additions and 16 deletions
+12 -9
View File
@@ -113,21 +113,24 @@ def test_writer(app, status, warning):
result = (app.outdir / 'SphinxTests.tex').text(encoding='utf8')
assert ('\\begin{sphinxfigure-in-table}\n\\centering\n\\capstart\n'
'\\sphinxincludegraphics{{img}.png}\n\\sphinxfigcaption'
'{figure in table}\\label{markup:id7}\\end{sphinxfigure-in-table}' in result)
'\\noindent\\sphinxincludegraphics{{img}.png}\n'
'\\sphinxfigcaption{figure in table}\\label{markup:id7}'
'\\end{sphinxfigure-in-table}\\relax' in result)
assert ('\\begin{wrapfigure}{r}{0pt}\n\\centering\n'
'\\sphinxincludegraphics{{rimg}.png}\n\\caption{figure with align option}'
'\\label{markup:id8}\\end{wrapfigure}' in result)
'\\noindent\\sphinxincludegraphics{{rimg}.png}\n'
'\\caption{figure with align option}\\label{markup:id8}'
'\\end{wrapfigure}' in result)
assert ('\\begin{wrapfigure}{r}{0.500\\linewidth}\n\\centering\n'
'\\sphinxincludegraphics{{rimg}.png}\n\\caption{figure with align \\& figwidth option}'
'\\label{markup:id9}\\end{wrapfigure}' in result)
'\\noindent\\sphinxincludegraphics{{rimg}.png}\n'
'\\caption{figure with align \\& figwidth option}\\label{markup:id9}'
'\\end{wrapfigure}' in result)
assert ('\\begin{wrapfigure}{r}{3cm}\n\\centering\n'
'\\sphinxincludegraphics[width=3cm]{{rimg}.png}\n'
'\\caption{figure with align \\& width option}'
'\\label{markup:id10}\\end{wrapfigure}' in result)
'\\noindent\\sphinxincludegraphics[width=3cm]{{rimg}.png}\n'
'\\caption{figure with align \\& width option}\\label{markup:id10}'
'\\end{wrapfigure}' in result)
@with_app(buildername='latex', freshenv=True, # use freshenv to check warnings