Lines Matching +full:auto +full:- +full:range
2 # -*- coding: utf-8; mode: python -*-
3 # SPDX-License-Identifier: GPL-2.0
7 flat-table
10 Implementation of the ``flat-table`` reST-directive.
15 The ``flat-table`` (:py:class:`FlatTable`) is a double-stage list similar to
16 the ``list-table`` with some additional features:
18 * *column-span*: with the role ``cspan`` a cell can be extended through
21 * *row-span*: with the role ``rspan`` a cell can be extended through
24 * *auto span* rightmost cell of a table row over the missing cells on the
25 right side of that table-row. With Option ``:fill-cells:`` this behavior
26 can be changed from *auto span* to *auto fill*, which automatically inserts
31 * header-rows: [int] count of header rows
32 * stub-columns: [int] count of stub columns
34 * fill-cells: instead of autospann missing cells, insert missing cells
61 app.add_directive("flat-table", FlatTable)
103 """FlatTable (``flat-table``) directive"""
108 , 'header-rows': directives.nonnegative_int
109 , 'stub-columns': directives.nonnegative_int
111 , 'fill-cells' : directives.flag }
129 # SDK.CONSOLE() # print --> tableNode.asdom().toprettyxml()
139 """Builds a table from a double-stage list"""
151 # colwidths) tuple, where widths is a string (i.e. 'auto').
154 stub_columns = self.directive.options.get('stub-columns', 0)
155 header_rows = self.directive.options.get('header-rows', 0)
165 # absence of rowspan (observed by the html builder, the docutils-xml
167 # no table directive (except *this* flat-table) which allows to
168 # define coexistent of rowspan and stubs (there was no use-case
169 # before flat-table). This should be reviewed (later).
172 stub_columns -= 1
174 stub_columns = self.directive.options.get('stub-columns', 0)
238 * Autospan or fill (option ``fill-cells``) missing cells on the right
239 side of the table-row
253 for c in range(cspan):
260 for r in range(rspan):
261 for c in range(cspan + 1):
271 # re-calculate the max columns.
280 if 'fill-cells' in self.directive.options:
284 x = self.max_cols - len(row)
286 if row[-1] is None:
287 row.append( ( x - 1, 0, []) )
289 cspan, rspan, content = row[-1]
290 row[-1] = (cspan + x, rspan, content)
292 for i in range(x):
311 retVal = retVal[:-2]
313 retVal = retVal[:-2]
339 'two-level bullet list expected, but row %s does not '
340 'contain a second-level bullet list.'