Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

latexpdf image :target: changes output #6067

Closed
FearTheBadger opened this issue Feb 12, 2019 · 1 comment
Closed

latexpdf image :target: changes output #6067

FearTheBadger opened this issue Feb 12, 2019 · 1 comment

Comments

@FearTheBadger
Copy link

Describe the bug
When I add the :target: to the image construct in an *.rst file, the tex file changes how text following an image is represented. The tex files ignores the image alignment, and the text directly after the image is no longer on a new line.

To be more specific here is the tex output between the two. The noindent is missing, as well as a blank new line when you include the :target: tag in the *.rst file.

*.tex without the :target:

\section{Example}
\label{\detokenize{docs/readme:test}}\label{\detokenize{docs/readme:test1}}\label{\detokenize{docs/readme::doc}}
\noindent{\hspace*{\fill}\sphinxincludegraphics[width=184\sphinxpxdimen]{{logo}.png}\hspace*{\fill}}

\sphinxhref{https://www.example.com}{Example} Test

*.tex with :target:

\section{Example}
\label{\detokenize{docs/readme:test}}\label{\detokenize{docs/readme:test1}}\label{\detokenize{docs/readme::doc}}\sphinxhref{https://www.example.com}{\sphinxincludegraphics[width=184\sphinxpxdimen]{{logo}.png}}
\sphinxhref{https://www.example.com}{Example} Test

To Reproduce
Steps to reproduce the behavior:
*.rst file with target

.. image:: logo.png
    :target: https://www.example.com
    :alt: Logo
    :align: center
    :width: 184px

`example <https://example.com>`_ test

*.rst file with target

.. image:: logo.png
    :alt: Logo
    :align: center
    :width: 184px

`example <https://example.com>`_ test

Expected behavior
The image should be a link to the URI provided and the text should be on a new line.

Screenshots
With :target:
screen shot 2019-02-12 at 12 49 17 pm

Without :target:
screen shot 2019-02-12 at 12 50 08 pm

Environment info

  • OS: Ubuntu 16.04
  • Python version: 2.7.15rc1
  • Sphinx version: sphinx-build 1.8.4
  • Sphinx extensions: n/a
  • Extra tools: texi2pdf (GNU Texinfo 6.5) 7842, Latexmk, John Collins, 1 January 2015. Version 4.41
@jfbu jfbu added this to the 1.8.5 milestone Feb 12, 2019
tk0miya added a commit to tk0miya/sphinx that referenced this issue Feb 27, 2019
tk0miya added a commit to tk0miya/sphinx that referenced this issue Feb 27, 2019
tk0miya added a commit that referenced this issue Mar 2, 2019
@tk0miya
Copy link
Member

tk0miya commented Mar 2, 2019

Fixed by #6116.
Thank you for reporting!

@tk0miya tk0miya closed this as completed Mar 2, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants