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

Images from external URL are not displayed in LaTeX output. #3512

Closed
Paebbels opened this issue Mar 5, 2017 · 2 comments
Closed

Images from external URL are not displayed in LaTeX output. #3512

Paebbels opened this issue Mar 5, 2017 · 2 comments
Assignees
Labels
builder:latex type:enhancement enhance or introduce a new feature
Milestone

Comments

@Paebbels
Copy link

Paebbels commented Mar 5, 2017

I'm using dynamically rendered images from online services like Shields.io in my documentation. This works fine in the HTML version created locally and on RTD. However, these images are not visible in the also generated PDF file.

According to Builders, the latex builder only supports pdf, png and jpg formats. So I'm using SVG images in the HTML version and PNG images in the latex version of the documentation:

.. # Shield for a GitHub repository
.. |SHIELD:svg:GH-Logo| image:: https://img.shields.io/badge/-VLSI--EDA/PoC-323131.svg?style=flat&logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAABKVBMVEX%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2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WKBaAmxhYiFogVoEzckw%2BModXcckryZgDigsgLLu1MVT09V1TvPwgqVAyhlinmpMjsCZWRWCsxTlAEEFIvIWKQIALdLsYaMNYqui02KPw4ynN8Um%2FAp1pGzTuEj1Ek2cmz9dogmlVsUuKXSBEUFBaoUoKihQI0iPqaQMxWvnlOsImeV4hz7FBcmMswLin0sU9tBxg61ZYw3qB25SHhyRK0xDuySX179INtfN8qjOvz5u6BNjbsAplvsbVm%2FqAQGFOMb%2B1rTULZJPnsqf%2FMC2kv2bUOYZ%2BR3lLzPr0ehPWbszITmVsn3GCqRWtVFbKZC%2Fvz45tOj1EBlBgPOCUUpOXDiIMF4%2Bzc98G%2FDQNrY1tW9Bc26v%2Fowhof6D6AkqSgsdGGuAAAAAElFTkSuQmCC
   :target: https://www.github.com/VLSI-EDA/PoC
   :alt: Source Code on GitHub
.. |SHIELD:png:GH-Logo| image:: https://img.shields.io/badge/-VLSI--EDA/PoC-323131.png?style=flat&logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAABKVBMVEX%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F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2bOdSJkKWKBaAmxhYiFogVoEzckw%2BModXcckryZgDigsgLLu1MVT09V1TvPwgqVAyhlinmpMjsCZWRWCsxTlAEEFIvIWKQIALdLsYaMNYqui02KPw4ynN8Um%2FAp1pGzTuEj1Ek2cmz9dogmlVsUuKXSBEUFBaoUoKihQI0iPqaQMxWvnlOsImeV4hz7FBcmMswLin0sU9tBxg61ZYw3qB25SHhyRK0xDuySX179INtfN8qjOvz5u6BNjbsAplvsbVm%2FqAQGFOMb%2B1rTULZJPnsqf%2FMC2kv2bUOYZ%2BR3lLzPr0ehPWbszITmVsn3GCqRWtVFbKZC%2Fvz45tOj1EBlBgPOCUUpOXDiIMF4%2Bzc98G%2FDQNrY1tW9Bc26v%2Fowhof6D6AkqSgsdGGuAAAAAElFTkSuQmCC
   :target: https://www.github.com/VLSI-EDA/PoC
   :alt: Source Code on GitHub

.. only:: html

   |SHIELD:svg:GH-Logo|

.. only:: latex

   |SHIELD:png:GH-Logo|

To show both images, here are the images as markdown image code:

  • SVG: SVG
  • PNG: PNG

Local images from /_static/... work also as expected. The documentation is build with -b html or -b latex respectively.

According to the Sphinx (http://www.sphinx-doc.org/en/stable/rest.html?highlight=image#images) and Docutils (http://docutils.sourceforge.net/docs/ref/rst/directives.html#image) documentation, there are no restrictions for images sources and certain builders.

Are images from web URLs not supported for the latex builder?


Edit:

As far as I can see, only the HTML builder complains about a non-local image source (web URL).

shields.inc:0: WARNING: nonlocal image URI found: https://img.shields.io/badge/-VLSI--EDA/PoC-323131.svg?style=flat&logo=data%3Aimage................
@tk0miya tk0miya added this to the 1.6 milestone Mar 5, 2017
@tk0miya tk0miya self-assigned this Mar 5, 2017
@tk0miya
Copy link
Member

tk0miya commented Mar 5, 2017

Unfortunately, it is not supported at present.
I have a plan to support it on nearly release.
Please wait for while.

@tk0miya tk0miya added the type:enhancement enhance or introduce a new feature label Mar 5, 2017
@tk0miya
Copy link
Member

tk0miya commented Apr 22, 2017

Implemented at #3589.
It will be released as v1.6 :-)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
builder:latex type:enhancement enhance or introduce a new feature
Projects
None yet
Development

No branches or pull requests

2 participants