Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I add a caption to a restructuredText table?

I have a grid table in restructuredText. Is there a way to add a caption to it?

+----------+---------+
|Name      |Age      |
+==========+=========+
|Bill      |39       |
+----------+---------+
|Jane      |38       |
+----------+---------+

There's no directive, so it's not like the figures:

.. figure:: strawberryicecream.png

   Strawberry Ice Cream
like image 898
Jason S Avatar asked Nov 07 '18 14:11

Jason S


1 Answers

Oh, never mind, the table directive works. I tried it earlier but didn't indent the table definition properly.

.. table:: Personnel

   +----------+---------+
   |Name      |Age      |
   +==========+=========+
   |Bill      |39       |
   +----------+---------+
   |Jane      |38       |
   +----------+---------+
like image 192
Jason S Avatar answered Oct 21 '22 05:10

Jason S