Fix #6067: LaTeX: images having a target are not aligned even if specified

This commit is contained in:
Takeshi KOMIYA
2019-02-28 02:05:21 +09:00
parent 6c244bdd69
commit 9c2e7b6798
4 changed files with 15 additions and 2 deletions
+4
View File
@@ -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
+4
View File
@@ -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):