-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
image directive fails for "wild card" inclusion #1358
Comments
From Dietmar Winkler on 2014-01-23 09:07:20+00:00 Some additional information: 1. the exact path in the image directive:I've changed the directive to not use the
Server log:
2. the path of the .rst document it's in
3. the path of the image file
|
From Georg Brandl on 2014-01-23 09:08:58+00:00 ok. So I suppose the "conf.py" is in test/source? |
From Dietmar Winkler on 2014-01-23 09:10:51+00:00 Correct! (well in text/source) |
From Georg Brandl on 2014-01-23 09:25:01+00:00 OK, that was unfortunate, but at least it will be fixed in 1.2.2. |
From Dietmar Winkler on 2014-01-23 09:43:39+00:00 Tested and confirmed fixed with d0629b0. |
From Dietmar Winkler on 2014-04-12 22:40:00+00:00 Looks like this has to be reopened as it still does not work when using the LaTeX exporter.
For the HTML exporter it links correctly to the SVG version of that file. |
From Dietmar Winkler on 2014-04-12 22:40:32+00:00 Still does not work for the LaTeX exporter |
From Dietmar Winkler on 2014-04-12 22:57:45+00:00 My bad. The reason was a non-existing file. |
From Andrea Cassioli on 2014-08-29 09:41:51+00:00 Hi, |
From Takayuki Shimizukawa on 2014-08-29 12:22:17+00:00 Andrea Cassioli this is the logic to select image type: #1: define supported image types that ordered by priority for each builders. for about html builder: sphinx/sphinx/builders/html.py Line 76 in f190de7
#2: collect image candidates Line 783 in f190de7
#3: Pick the best candidate for all image URIs. sphinx/sphinx/builders/__init__.py Line 153 in f190de7
There is no way to specify the default image type. |
From Andrea Cassioli on 2014-08-29 12:42:46+00:00 I see. Should I assume that supported_image_types = ['image/svg+xml', 'image/png', reflects the order in which image formats are selected? I guess it is common to store the same image in different format. However, I was actually suggesting to clarify how this works in the docs. But thank you for the explanation. |
From Takayuki Shimizukawa on 2014-08-29 14:21:30+00:00 Yes. your guessing is correct. I'll add documentation for that. |
From Takayuki Shimizukawa on 2014-08-29 14:21:54+00:00 Add documentation for supported image types and choosing priority for each builders. refs #1358. → <> |
I have a document from that I want to produce a web version and a LaTeX version. I'm including images and after reading http://sphinx-doc.org/rest.html#images I thought this is exactly what I need. An automatic way to include image files as SVG in case of the web version and as PDF in case of the LaTeX version. The thing is that the described "wild card" method just does not work. I tested this thoroughly (I think) and when ever the file is explicitly referenced Sphinx will correctly copy the image file from the source to the destination (build/dirhtml/_images or build/latex). This works fine for SVG and for PDF.
However using the wild card method the files will neither be copied over nor will the links be used as relative to the source directory but it seems as relative to the location of the actual
rst
file.Here the result of a small test case:
.. image:: /../docs-dir/Icons/foo.svg
.. image:: /../docs-dir/Icons/foo.*
.. image:: _images/foo.*
Server log:
The version I'm using is:
The text was updated successfully, but these errors were encountered: