I use to store such files in a separate directory (named "dl" here)
below my base directory:
.. |downloadArticle| image:: /images/downloadicon.png
:target: /dl/somefile.pdf
That directory contains no .rst files. And in my Makefile I added a
command to synchronize it on the build result::
cp -ur dl/ .build/dl
hth,
Luc
On 02/11/15 23:54, Pavol Juhas wrote:
> Hello,
>
> Is it possible to specify an image target link that is anchored at the
> HTML base path?
>
> To provide some background, I would like to define a shared abbreviation
> as follows:
>
> .. |downloadArticle| image:: /images/downloadicon.png
> :target: doc/pdfs/somefile.pdf
>
> where doc is a directory of static files exported to HTML root.
> The problem is that this abbreviation works well when used in
> a page from the base directory, but is not valid when used in say
> a/b.rst, because the relative path is not valid from any subfolder.
> I wonder what is a way around it, perhaps some pseudo-syntax
> like :target: @BASE@/doc/pdfs/somefile.pdf could do the trick.
>
> I have looked into the :download: text role, but could not get it
> act as a target of image link at all.
>
> Thank you for any help or suggestions,
>
> Pavol
>
> --
> 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 [email protected]
> <mailto:[email protected]>.
> To post to this group, send email to [email protected]
> <mailto:[email protected]>.
> Visit this group at http://groups.google.com/group/sphinx-users.
> For more options, visit https://groups.google.com/d/optout.
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/d/optout.