Discussion:
[Docutils-users] Question about restructured text tables
Suzanne Hillman
2017-04-19 21:18:32 UTC
Permalink
Hi everyone,

I'm not subscribed to this list, so please cc me?

I'm trying to figure out the best way to create basically a thumbnail grid
using restructured text. My website is mostly in restructured text at this
point, and I'd rather not have to make one of my pages plain HTML (or use
the raw html directive).

I took a look at the two ways to create tables (here:
http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#tables),
and as far as I can tell, there is no way to tell restructured text that it
doesn't need to be as wide as the widest text within it. Given that I've
got figure directives within the cells of the table, even with careful
multi-line things, individual columns are really wide and cumbersome.

If curious, the top-most bit on this page is what I'm working on (with only
the first column filled in):
https://suzannehillman.com/pages/design-artifacts.html

If my question is unclear, please let me know?

Thanks,

Suzanne
Guenter Milde
2017-04-20 07:56:39 UTC
Permalink
On 2017-04-19, Suzanne Hillman wrote:

...
Post by Suzanne Hillman
I'm trying to figure out the best way to create basically a thumbnail grid
using restructured text. My website is mostly in restructured text at this
point, and I'd rather not have to make one of my pages plain HTML (or use
the raw html directive).
http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#tables),
and as far as I can tell, there is no way to tell restructured text that it
doesn't need to be as wide as the widest text within it.
The `table directive`__ may be your friend.
Ther you can specify the column widths and (with a current Docutils) also
set the column width to "auto" (let the backend decide).

For your use case, also the `list table`__ may be an option.

Günter

__ http://docutils.sourceforge.net/docs/ref/rst/directives.html#table
__ http://docutils.sourceforge.net/docs/ref/rst/directives.html#list-table


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Docutils-users mailing list
Docutils-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-users

Please use "Reply All"

Loading...