|
|
@ -8,8 +8,8 @@
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# 'rows' is the list of parameters. Each row should be a TypeTableRow.
|
|
|
|
# 'rows' is the list of parameters. Each row should be a TypeTableRow.
|
|
|
|
#}
|
|
|
|
#}
|
|
|
|
{% macro paramtable(rows, titles=["Parameter", "Type", "Description"]) -%}
|
|
|
|
{% macro paramtable(rows, titles=["Parameter", "Type", "Description"], caption="") -%}
|
|
|
|
{{ split_paramtable({None: rows}, titles) }}
|
|
|
|
{{ split_paramtable({None: rows}, titles, caption) }}
|
|
|
|
{% endmacro %}
|
|
|
|
{% endmacro %}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -21,7 +21,7 @@
|
|
|
|
# written for that location. This is used by the standard 'paramtable' macro.
|
|
|
|
# written for that location. This is used by the standard 'paramtable' macro.
|
|
|
|
#}
|
|
|
|
#}
|
|
|
|
{% macro split_paramtable(rows_by_loc,
|
|
|
|
{% macro split_paramtable(rows_by_loc,
|
|
|
|
titles=["Parameter", "Type", "Description"]) -%}
|
|
|
|
titles=["Parameter", "Type", "Description"], caption="") -%}
|
|
|
|
|
|
|
|
|
|
|
|
{% set rowkeys = ['key', 'title', 'desc'] %}
|
|
|
|
{% set rowkeys = ['key', 'title', 'desc'] %}
|
|
|
|
{% set titlerow = {'key': titles[0], 'title': titles[1], 'desc': titles[2]} %}
|
|
|
|
{% set titlerow = {'key': titles[0], 'title': titles[1], 'desc': titles[2]} %}
|
|
|
@ -36,6 +36,9 @@
|
|
|
|
{% set fieldwidths = (([titlerow] + flatrows) |
|
|
|
|
{% set fieldwidths = (([titlerow] + flatrows) |
|
|
|
|
fieldwidths(rowkeys[0:-1], [10, 10])) + [50] -%}
|
|
|
|
fieldwidths(rowkeys[0:-1], [10, 10])) + [50] -%}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{{".. table:: "}}{{ caption }}
|
|
|
|
|
|
|
|
{{" :widths: auto"}}
|
|
|
|
|
|
|
|
{{""}}
|
|
|
|
{{ tableheader(fieldwidths) }}
|
|
|
|
{{ tableheader(fieldwidths) }}
|
|
|
|
{{ tablerow(fieldwidths, titlerow, rowkeys) }}
|
|
|
|
{{ tablerow(fieldwidths, titlerow, rowkeys) }}
|
|
|
|
{{ tableheader(fieldwidths) }}
|
|
|
|
{{ tableheader(fieldwidths) }}
|
|
|
@ -59,7 +62,7 @@
|
|
|
|
# Write a table header row, for the given column widths
|
|
|
|
# Write a table header row, for the given column widths
|
|
|
|
#}
|
|
|
|
#}
|
|
|
|
{% macro tableheader(widths) -%}
|
|
|
|
{% macro tableheader(widths) -%}
|
|
|
|
{% for arg in widths -%}
|
|
|
|
{{" "}}{% for arg in widths -%}
|
|
|
|
{{"="*arg}} {% endfor -%}
|
|
|
|
{{"="*arg}} {% endfor -%}
|
|
|
|
{% endmacro %}
|
|
|
|
{% endmacro %}
|
|
|
|
|
|
|
|
|
|
|
@ -71,7 +74,7 @@
|
|
|
|
# attributes of 'row' to look up for values to put in the columns.
|
|
|
|
# attributes of 'row' to look up for values to put in the columns.
|
|
|
|
#}
|
|
|
|
#}
|
|
|
|
{% macro tablerow(widths, row, keys) -%}
|
|
|
|
{% macro tablerow(widths, row, keys) -%}
|
|
|
|
{% for key in keys -%}
|
|
|
|
{{" "}}{% for key in keys -%}
|
|
|
|
{% set value=row[key] -%}
|
|
|
|
{% set value=row[key] -%}
|
|
|
|
{% if not loop.last -%}
|
|
|
|
{% if not loop.last -%}
|
|
|
|
{# the first few columns need space after them -#}
|
|
|
|
{# the first few columns need space after them -#}
|
|
|
@ -81,7 +84,7 @@
|
|
|
|
the preceding columns, plus the number of preceding columns (for the
|
|
|
|
the preceding columns, plus the number of preceding columns (for the
|
|
|
|
separators)) -#}
|
|
|
|
separators)) -#}
|
|
|
|
{{ value | wrap(widths[loop.index0]) |
|
|
|
|
{{ value | wrap(widths[loop.index0]) |
|
|
|
|
indent_block(widths[0:-1]|sum + loop.index0) -}}
|
|
|
|
indent_block(widths[0:-1]|sum + loop.index0 + 2) -}}
|
|
|
|
{% endif -%}
|
|
|
|
{% endif -%}
|
|
|
|
{% endfor -%}
|
|
|
|
{% endfor -%}
|
|
|
|
{% endmacro %}
|
|
|
|
{% endmacro %}
|
|
|
@ -93,10 +96,10 @@
|
|
|
|
# write a tablespan row. This is a single value which spans the entire table.
|
|
|
|
# write a tablespan row. This is a single value which spans the entire table.
|
|
|
|
#}
|
|
|
|
#}
|
|
|
|
{% macro tablespan(widths, value) -%}
|
|
|
|
{% macro tablespan(widths, value) -%}
|
|
|
|
{{value}}
|
|
|
|
{{" "}}{{value}}
|
|
|
|
{# we write a trailing space to stop the separator being misinterpreted
|
|
|
|
{# we write a trailing space to stop the separator being misinterpreted
|
|
|
|
# as a header line. -#}
|
|
|
|
# as a header line. -#}
|
|
|
|
{{"-"*(widths|sum + widths|length -1)}} {% endmacro %}
|
|
|
|
{{" "}}{{"-"*(widths|sum + widths|length -1)}} {% endmacro %}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|