+
+ .** ----------- definition lists and tables ------------------------------------
+ .if false
+ A list table without borders should build a reasonable def list in
+ RST. What RST touts as a def list turns out looking like crap, so we
+ jump some hoops to generate a two column table.
+ The usual pratcice of adding half space between items is ignored
+ by rst, and we add addtional "logic" to insert a blank line betwen
+ rows in order to visually separate the entries. Better than the default
+ but certainly not great. The output of these macros is extreamely space
+ sensitive (leading spaces because python programmers believe these
+ kinds of "everythign must align" parsers are good).
+
+ It seems that not all HTML generated from RST is done consistently. As an example
+ the HTML generated for read the docs does NOT respect the no boarder option
+ on tables, and adds additional space at the bottom of each table. Thus there
+ are two sets of definition list macros; by default the RTD style of ignoring
+ directives is assumed. The alternate set can be enabled by setting the variable
+ 'sane_dlist' before imbedding this definition file.
+
+ When sane_dlist is set to 1, definition list items will be separated with a row
+ separater applied at the start of rows 2-n.
+
+ RST requires a blank line prior to the start of the list, so we force one.
+ .fi
+
+ .** beg_dlist parms 1 and 2 are for PFM, $3 is for rst and is optionally the term,def widths (e.g. 15,80)
+ .** mind the tildas (end of line escapes in {X}fm
+ .**
+ .if &{sane_dlist!0} 1 =
+ .dv beg_dlist .dv di_term 1 ^: ~
+ .dv row_sep .sp 1 ^: ~
+ .sp 1 ~
+ .in +&_ch4 ~
+ ^.. list-table^:^: .in +&_ch2 ^:widths^: ${3!auto} .br ^:header-rows^: 0 .br ^:class^: borderless ~
+ .in +&ch_6
+
+ .dv ditem ^&row_sep * - **$1** .in +&_ch2 - .in +&_ch2 .dv row_sep .sp 1 | .in -&{_ch4} .sp 1 ^:
+ .dv ditem_nosp .in -&{_ch4} * - **$1** .in +&_ch2 - .in +&_ch2 .dv row_sep .sp 1 | .in -&{_ch4} .sp 1 ^:
+
+ .dv di ^&row_sep * - **$1** .in +&_ch2 - .in +&_ch2 .dv row_sep .sp 1 | .in -&{_ch4} .sp 1 ^:
+ .dv diitem ^&row_sep * - **$1** .in +&_ch2 - .in +&_ch2 .dv row_sep .sp 1 | .in -&{_ch4} .sp 1 ^:
+
+ .ei
+ .dv beg_dlist .dv di_term 1 ^: ~
+ .dv row_sep .sp 1 ^: ~
+ .sp 1 ~
+ .in +&_ch4 ~
+ ^.. list-table^:^: .in +&_ch2 ^:widths^: ${3!auto} .br ^:header-rows^: 0 .br ^:class^: borderless ~
+ .in +&ch_6
+
+ .dv ditem ^&row_sep * - **$1** .in +&_ch2 - .in +&_ch2 .dv row_sep .in -&{_ch4} .sp 1 ^:
+ .dv ditem_nosp ^&row_sep * - **$1** .in +&_ch2 - .in +&_ch2 .dv row_sep .in -&{_ch4} .sp 1 ^:
+ .dv di ^&row_sep * - **$1** .in +&_ch2 - .in +&_ch2 .dv row_sep .in -&{_ch4} .sp 1 ^:
+ .dv diitem ^&row_sep * - **$1** .in +&_ch2 - .in +&_ch2 .dv row_sep .in -&{_ch4} .sp 1 ^:
+ .fi
+
+ .** auto numbering ditem has to be hacked in since we're completely unable to use {X}fm's list gen for RST
+ .dv aditem ^&row_sep .in &_ch6 * - **^&{di_term}** .in &_ch8 - .in &_ch10 .dv row_sep .sp 1 | .sp 1 ^: .dv di_term ^[ %.0f ^&di_term 1 + ]
+
+ .dv end_dlist .sp 1 .in -&{_ch10} .sp 1
+
+ .** generate a table with borders
+ .dv beg_table ^.. list-table^:^: .br ^` ^` ^:widths^: $1 .br ^` ^` ^:header-rows^: 0 .sp 1
+
+ .** generate a table without borders
+ .dv beg_table_nb ^.. list-table^:^: .br ^` ^` ^:widths^: $1 .br ^` ^` ^:header-rows^: 0 .br ^` ^` ^:class^: borderless .sp 1
+
+ .** remainder of table support commands not dependent on borders/borderless
+ .dv col .in 0i .br ^` ` -` ^` .in 56p
+ .dv row .in 0i .sp 1 ^` ` * -` ^` .in 56p
+ .dv end_table .sp 1 .in 0i
+ .dv tab_cell ^&col
+ .dv tab_row ^&row
+