Re: [sphinx-users] Re: Relative paths - File not readable

690 views
Skip to first unread message

Komiya Takeshi

unread,
Mar 6, 2017, 8:45:42 PM3/6/17
to sphinx...@googlegroups.com, sphin...@googlegroups.com
Hi,

Sphinx expects the project directory contains all documents and related files.
So there are no proper way to access the images outside of the project.

Please move it to under project directory.

Thanks,
Takeshi KOMIYA

2017-03-07 3:37 GMT+09:00 sajan mushini <sajanm...@gmail.com>:
> hey
>
> A newbie here and I have the same issue. Any solution on this?
>
> Regards
> Sajan
> On Monday, 27 February 2012 07:11:28 UTC-7, Andersej wrote:
>>
>> Hi,
>>
>> I have a question about the relative paths, and hope you can help.
>>
>> In ~/project/doc/ I have index.rst and model.rst (model.rst is in
>> toctree in index.rst).
>>
>> Further, in ~/project/src/dynamics/ I have documentation.rst and
>> plot.png. I include documentation.rst in model.rst using its relative
>> path from /doc.
>>
>> My question is then, is it possible somehow to include plot.png in
>> documentation.rst, relative to documentation.rst itself (i.e. just ..
>> image:: plot.png) without having to write the entire path to this
>> directory again in a file already in the directory?
>>
>> When I do this now, I get
>>
>> ../src/dynamics/documentation.rst::11: WARNING: image file not
>> readable: plot.png
>>
>> --
>> Anders
>
> --
> You received this message because you are subscribed to the Google Groups
> "sphinx-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sphinx-users...@googlegroups.com.
> To post to this group, send email to sphinx...@googlegroups.com.
> Visit this group at https://groups.google.com/group/sphinx-users.
> For more options, visit https://groups.google.com/d/optout.

Peter Burdine

unread,
Mar 8, 2017, 1:03:04 PM3/8/17
to sphinx-users, sphin...@googlegroups.com
We have to do this a lot since we have a library of sections that may need to be included in various documents.  We handle it by creating a "links" file that contains relative paths of links that it should create under the source directory.  Then we modified the make file to run a script that reads the "links" file and creates any required symbolic links.  Once that is done, you other directories appear under the source directory and thus can be included. 
Reply all
Reply to author
Forward
0 new messages