reStructuredText: Add credit line to an image

84 Views Asked by At

I have recently started a new blog, and I'm using Wikimedia images in it. I would naturally like to properly give image credits.

enter image description here

The conventional credit location is below the image (here, for example, in gray font).

My blog is written in Pelican and i use reStructuredText to write my posts, so an image is inserted in the following way:

.. image:: images/Steve_Jobs_and_Bill_Gates.jpg
   :target: https://commons.wikimedia.org/wiki/File:Steve_Jobs_and_Bill_Gates_(522695099).jpg
   :alt: Joi Ito from Inbamura, Japan, licensed under the Creative Commons Attribution 2.0 Generic license

Does reStructuredText have a credit field which will appear below the image?

2

There are 2 best solutions below

1
On BEST ANSWER

I don't know if you're still wondering this, since this post is a year old.

However, I am using the "Better Figures and Images" python plugin by Duncan Lock (see http://duncanlock.net/blog/2013/05/29/better-figures-images-plugin-for-pelican/) to have captions below my images. I bet you can use that for credits, also.

0
On

The standard reStructurdText "figure" directive may be your friend:

.. figure:: example.jpg
   :alt: image of a blue triange

   Blue triangle by Dr. Beispiel.

For rendering examples see, e.g., https://docutils.sourceforge.io/test/functional/expected/standalone_rst_html5.html#images-and-figures