From: Ben F. <fo...@uc...> - 2011-05-25 23:40:57
|
Hi, I am *not* subscribed, but would appreciate any replies. I am using Sphinx document generator with reST to make a User's Guide for a GCM model, and need to display some images in external links. If I hardwire the URL as an argument to the image directive, it works fine, e.g.: .. image:: http://myurl/pict0001.png And my image is nicely displayed. However, I do not want to hardwire the base of this url into many 10's or 100's of image directives, i.e., I will want to deploy the user's guide where the url's to the images would be different. (I may have several images in one URL, e.g., pict0001.png to pict0050.png) I tried using the Sphinx "extlinks" extension, e.g.: extlinks = {'data_url': ('http://myurl/%s', 'data_url ')} .. image:: :data_url:`My picture <pict0001.png>` but this is ignored by the image directive (works fine elsewhere). This would be best, because I can use the data_url and add the image names pict0001.png, pict0002.png,... So I have also tried both replacement: .. |pict0001| replace:: http://myurl/pict0001.png .. image:: |mypict| and substitution: .._`pict0001`: http://myurl/pict0001.png .. image:: `pict0001` These all work inside inline text, but they all fail as an argument to the image directive. Help?? Thanks, --Ben Foster fo...@uc... |