mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-09-03 20:52:55 -05:00
Fix #6067: LaTeX: images having a target are not aligned even if specified
This commit is contained in:
@@ -18,6 +18,10 @@ test-image
|
||||
.. image:: rimg.png
|
||||
:target: https://www.sphinx-doc.org/
|
||||
|
||||
.. image:: rimg.png
|
||||
:align: center
|
||||
:target: https://www.python.org/
|
||||
|
||||
.. a remote image
|
||||
.. image:: https://www.python.org/static/img/python-logo.png
|
||||
|
||||
|
||||
@@ -1202,6 +1202,10 @@ def test_latex_images(app, status, warning):
|
||||
assert ('\\sphinxhref{https://www.sphinx-doc.org/}'
|
||||
'{\\sphinxincludegraphics{{rimg}.png}}\n\n' in result)
|
||||
|
||||
# a centerized image having target
|
||||
assert ('\\sphinxhref{https://www.python.org/}{{\\hspace*{\\fill}'
|
||||
'\\sphinxincludegraphics{{rimg}.png}\\hspace*{\\fill}}}\n\n' in result)
|
||||
|
||||
|
||||
@pytest.mark.sphinx('latex', testroot='latex-index')
|
||||
def test_latex_index(app, status, warning):
|
||||
|
||||
Reference in New Issue
Block a user