Lines Matching +full:auto +full:- +full:range

2 # -*- coding: utf-8; mode: python -*-
6 flat-table
9 Implementation of the ``flat-table`` reST-directive.
14 The ``flat-table`` (:py:class:`FlatTable`) is a double-stage list similar to
15 the ``list-table`` with some additional features:
17 * *column-span*: with the role ``cspan`` a cell can be extended through
20 * *row-span*: with the role ``rspan`` a cell can be extended through
23 * *auto span* rightmost cell of a table row over the missing cells on the
24 right side of that table-row. With Option ``:fill-cells:`` this behavior
25 can be changed from *auto span* to *auto fill*, which automatically inserts
30 * header-rows: [int] count of header rows
31 * stub-columns: [int] count of stub columns
33 * fill-cells: instead of autospann missing cells, insert missing cells
60 app.add_directive("flat-table", FlatTable)
102 u"""FlatTable (``flat-table``) directive"""
107 , 'header-rows': directives.nonnegative_int
108 , 'stub-columns': directives.nonnegative_int
110 , 'fill-cells' : directives.flag }
128 # SDK.CONSOLE() # print --> tableNode.asdom().toprettyxml()
138 u"""Builds a table from a double-stage list"""
150 # colwidths) tuple, where widths is a string (i.e. 'auto').
153 stub_columns = self.directive.options.get('stub-columns', 0)
154 header_rows = self.directive.options.get('header-rows', 0)
164 # absence of rowspan (observed by the html builder, the docutils-xml
166 # no table directive (except *this* flat-table) which allows to
167 # define coexistent of rowspan and stubs (there was no use-case
168 # before flat-table). This should be reviewed (later).
171 stub_columns -= 1
173 stub_columns = self.directive.options.get('stub-columns', 0)
237 * Autospan or fill (option ``fill-cells``) missing cells on the right
238 side of the table-row
252 for c in range(cspan):
259 for r in range(rspan):
260 for c in range(cspan + 1):
270 # re-calculate the max columns.
279 if 'fill-cells' in self.directive.options:
283 x = self.max_cols - len(row)
285 if row[-1] is None:
286 row.append( ( x - 1, 0, []) )
288 cspan, rspan, content = row[-1]
289 row[-1] = (cspan + x, rspan, content)
291 for i in range(x):
310 retVal = retVal[:-2]
312 retVal = retVal[:-2]
338 'two-level bullet list expected, but row %s does not '
339 'contain a second-level bullet list.'