mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-09-03 20:52:55 -05:00
latex `\noindent` for non-inline images, not only if top level
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user