Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

reST image grid with captions?

As an extension to this question: how can you add a description under each of the gridded images using Sphinx and reStructuredText?

For example, a table, three images across with a caption centered under each image.

like image 358
Jzl5325 Avatar asked Oct 19 '25 08:10

Jzl5325


1 Answers

I am not sure if this is possible with just the figure directive, like it is with the image directive. However, whilst horrible to look at, you could wrap the three figures in a table. For example, the following reStructuredText

+-----------------------------------------+-----------------------------------------+-----------------------------------------+
| .. figure:: http://placehold.it/150x150 | .. figure:: http://placehold.it/150x150 | .. figure:: http://placehold.it/150x150 |
|   :alt: map to buried treasure          |   :alt: map to buried treasure          |   :alt: map to buried treasure          |
|                                         |                                         |                                         |
|   This is the caption of the figure (a  |   This is the caption of the figure (a  |   This is the caption of the figure (a  |
|   simple paragraph).                    |   simple paragraph).                    |   simple paragraph).                    |
+-----------------------------------------+-----------------------------------------+-----------------------------------------+

produces

Table of three figures in a row produced by the above reStructuredText

like image 137
Chris Avatar answered Oct 21 '25 22:10

Chris



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!