totable
Arguments
Takes two required arguments. The first argument element_name specifies a table element a user wants to extract. It takes values listed in the table below.
Value |
Comments |
table |
whole table text, including table’s name. |
table_name |
table’s name. |
row_text |
row’s text (all cells' values separated by a space). |
row_name |
row’s name (a value of the leftmost cell of the row). |
col_text |
column text (all columns' value separated by a space). |
col_name |
column’s name (a value of the top cell of the column). |
cell_text |
cell’s text. |
cell_unit |
cell’s units (if specified). |
cell_factor |
cell scale factor. |
table_num |
table’s number |
row_num |
row’s number |
col_num |
column’s number |
Notes When using unnamed parameters cell_unit and cell_factor, cell_unit and cell_factor values of adjacent table cells are displayed if they are available.
The second argument is a reference to a named group. The function also takes the following optional named parameters:
Parameter |
Comments |
first:=<numeral> |
If the argument is omitted, the parameter is treated as a range of values. Otherwise, it specifies the offset of the start position. |
last:=<numeral> |
If the argument is omitted, the parameter is treated as a range of values. Otherwise, it specifies the offset of the end position. |
separator:=<string> |
The user can indicate a custom separator. If it is not specified, default separator "; " is used. |
table_level:=<numeral> |
Specifies a table level of the elements a user searches for. By default, the level is not set. |
nested:=<string> |
Specifies the search range within/out of/ within and out of nested tables. Takes "yes"/"no"/"any" values. Set to "any" by default. |
has_nested:=<string> |
Specifies if a table has nested tables. Takes "yes"/"no"/"any" values. Set to "any" by default. |
parent_table:=<string> |
Specifies if the output for a parent table should be shown. A parent table is the table one level up. Takes "yes"/"no"/"any" values. Set to "no" by default. |
default:=<string> |
Specifies the value assigned to the attribute if the result is empty. |
Notes
-
If a program deals with a discontinuous argument that is found in different table elements, arguments will be separated by a separator.
-
The parameters first and last specify the offset of the start and the end position relative to the argument. By default, first:=0, last:=0.
-
The parameters first and last work for two regimes: for first level tables and their table names they deal with a document, but in other cases they deal with a table.
-
When using the first and last parameters, in case of a discontinuous argument, intersecting elements shown in the result are displayed only once.