Hi, Have you tried csv-table or list-table directives? They are part of docutils. I try them now in Sphinx and I can.
see: http://docutils.sourceforge.net/docs/ref/rst/directives.html .. csv-table:: Frozen Delights! :header: "Treat" :widths: 15 "Albatross" "Crunchy Frog" crunchy "Gannet Ripple" .. list-table:: Frozen Delights! :widths: 15 :header-rows: 1 * - Treat * - Albatross * - Crunchy Frog * - Gannet Ripple 2010/2/16 Mark Harrison <[email protected]>: > Summary: > > Allow a single column simple table to be specified with something > like: > > ======= .. > heading > ======= > data > data > data > ======= > > > Blabbage: > > We're generating some documents that have database-generated > tables, and a few of the tables have single columns. > > We don't want to have to expand out the tables like > > +---------+ > | heading | > +---------+ > | data | > +---------+ > | data | > +---------+ > | data | > +---------+ > > because we often view the file in text form and feel the > simple table is more compact and presents more understandable > information in the same amount of screen space (a la > Tufte's "data ink"). > > Our workaround is not too bad -- just adding an extra column > with no data: > > ======= = > heading > ======= = > data > data > data > ======= = > > This works well for us, at the expense of a slightly uglified > table when processed to html or latex. It's a tradeoff we're > satisfied with, since everything is internal and the people > viewing the html are also the people viewing the text. > > It would be nice though, for outside consumption, to trim off > the extra blank column, just so we don't have to answer questions > about if the column is supposed to be blank. > > Our workaround will be to postprocess the html and latex output, > but that's brittle and a bit inelegant compared to the rest > of restructured text. > nky. > > So, would it be possible to somehow indicate a single-column > table with markup similar to the following? It is currently > recognized as neither a section heading nor a table. > > ======= .. > heading > ======= > data > data > data > ======= > > > Thanks, > Mark > > > -- > Mark Harrison > Pixar Animation Studios > > -- > You received this message because you are subscribed to the Google Groups > "sphinx-dev" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/sphinx-dev?hl=en. > > -- #! /usr/bin/python2 def shibu(shibukawa, yoshiki): web = "http://www.shibu.jp" mail = "[email protected]" twitter = "@shibukawa" return "smile!" -- You received this message because you are subscribed to the Google Groups "sphinx-dev" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
