From 2f5c71588ede9bbf5a892433a1b8a378e69f3969 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Tue, 24 Feb 2026 09:53:24 +1100 Subject: [PATCH] Revert "Table was not rendering correctly." This reverts commit 9ff4a7f0e0c23b85491c3478f1fa90d66088822d. --- .../ifcopenshell-python/selector_syntax.rst | 92 +++---------------- 1 file changed, 15 insertions(+), 77 deletions(-) diff --git a/src/ifcopenshell-python/docs/ifcopenshell-python/selector_syntax.rst b/src/ifcopenshell-python/docs/ifcopenshell-python/selector_syntax.rst index 4f994daced..2d0cc9e071 100644 --- a/src/ifcopenshell-python/docs/ifcopenshell-python/selector_syntax.rst +++ b/src/ifcopenshell-python/docs/ifcopenshell-python/selector_syntax.rst @@ -240,84 +240,22 @@ in spreadsheets. For example ``upper("foo")`` will produce ``FOO``. You may nest formulas, for example ``concat(title("foo"), lower("Bar"))`` will produce ``Foobar``. Strings must be double quoted. -.. list-table:: - :header-rows: 1 - :widths: 28 28 16 28 - - * - Function - - Example - - Result - - Description - - * - ``upper({{value}})`` - - ``upper("Foo")`` - - ``FOO`` - - Uppercases a string. - - * - ``lower({{value}})`` - - ``lower("Foo")`` - - ``foo`` - - Lowercases a string. - - * - ``title({{value}})`` - - ``title("foo")`` - - ``Foo`` - - Titlecases a string. - - * - ``concat({{value}}[, {{value2}}]*)`` - - ``concat("foo", "bar")`` - - ``foobar`` - - Concatenates two or more strings. - - * - ``round({{value}}, {{precision}})`` - - ``round(3.123, 0.1)`` - - ``3.1`` - - Rounds ``{{value}}`` to the nearest ``{{precision}}``. - - * - ``int({{value}})`` - - ``int(3.123)`` - - ``3`` - - Truncates the decimal part of the ``{{value}}``. - - * - ``number({{value}}[, {{decimal_separator}}[, {{thousands_separator}}]])`` - - ``number(1234.56, ",", ".")`` - - ``1.234,56`` - - Formats ``{{value}}`` with an optional custom ``{{decimal_separator}}`` and ``{{thousands_separator}}``. The default separators are ``.`` and ``,``. - - * - ``metric_length({{value}}, {{precision}}, {{decimals}})`` - - ``metric_length(3.123, 0.1, 2)`` - - ``3.10`` - - Rounds ``{{value}}`` to the nearest ``{{precision}}`` then displays using a certain amount of decimal places. - - * - ``imperial_length({{value}}, {{precision}}, {{input_unit}}, {{output_unit}}, {{suppress_zero_inches}})`` - - ``imperial_length(3.0, 4, "foot", "foot", true)`` - OR - ``imperial_length(3.0, 4, "foot", "foot", false)`` - - ``3'`` - OR - ``3' - 0"`` - - The ``{{value}}`` may be specified either as ``foot`` or ``inch`` depending on ``{{input_unit}}``. The ``{{value}}`` is rounded to the nearest ``1/{{precision}}`` inch, then formatted using fractional feet and inches if ``{{output_unit}}`` is ``foot``, or just inches if ``{{output_unit}}`` is ``inch``. When ``{{suppress_zero_inches}}`` is ``true`` (default), measurements with zero inches omit the inch portion (e.g., ``3'`` instead of ``3' - 0"``). - - * - ``sort({{values}})`` - - ``sort({{mats.Name}})`` - - ``Name1, Name2`` - - Sorts a list of items. - - * - ``reverse({{values}})`` - - ``reverse({{mats.Name}})`` - - ``Name2, Name1`` - - Reverses a list of items. - - * - ``join({{separator}}, {{values}})`` - - ``join("-", {{mats.Name}})`` - - ``Name1-Name2`` - - Joins a list of items with a custom separator. By default, lists are rendered as comma separated. - - * - ``{{value1}}[+-*/]{{value2}}`` - - ``{{z}}+3`` - - ``5`` - - Does arithmetic. Operators such as ``+``, ``-``, ``*``, and ``/`` are allowed and can be mixed with variables and formatting functions. +.. csv-table:: + :header: "Function", "Example", "Result", "Description" + "``upper({{value}})``", "``upper(""Foo"")``", "``FOO``", "Uppercases a string." + "``lower({{value}})``", "``lower(""Foo"")``", "``foo``", "Lowercases a string." + "``title({{value}})``", "``title(""foo"")``", "``Foo``", "Titlecases a string." + "``concat({{value}}[, {{value2}}]*)``", "``concat(""foo"", ""bar"")``", "``foobar``", "Concatenates two or more strings." + "``round({{value}}, {{precision}})``", "``round(3.123, 0.1)``", "``3.1``", "Rounds ``{{value}}`` to the nearest ``{{precision}}``." + "``int({{value}})``", "``int(3.123)``", "``3``", "Truncates the decimal part of the ``{{value}}``." + "``number({{value}}[, {{decimal_separator}}[, {{thousands_separator}}]])``", "``number(1234.56, "","", ""."")``", "``1.234,56``", "Formats {{value}} with an optional custom {{decimal_separator}} and {{thousands_separator}}. The default separators are ``.`` and ``,``." + "``metric_length({{value}}, {{precision}}, {{decimals}})``", "``metric_length(3.123, 0.1, 2)``", "``3.10``", "Rounds ``{{value}}`` to the nearest ``{{precision}}`` then displays using a certain amount of decimal places." + "``imperial_length({{value}}, {{precision}}, {{input_unit}}, {{output_unit}}, {{suppress_zero_inches}})``", "``imperial_length(3.0, 4, ""foot"", ""foot"", true)`` OR ``imperial_length(3.0, 4, ""foot"", ""foot"", false)``", "``3'`` OR ``3' - 0""``", "The ``{{value}}`` may be specified either as ``foot`` or ``inch`` depending on ``{{input_unit}}``. The ``{{value}}`` is then rounded to the nearest ``1/{{precision}}`` inch, then formatted using fractional feet and inches if ``{{output_unit}}`` is set to ``foot``, or just inches if ``{{output_unit}}`` is set to ``inch``. When ``{{suppress_zero_inches}}`` is ``true`` (default), measurements with zero inches will omit the inch portion (e.g., ``3'`` instead of ``3' - 0""``)." + "``sort({{values}})``", "``sort({{mats.Name}})``", "``Name1, Name2``", "Sorts a list of items." + "``reverse({{values}})``", "``reverse({{mats.Name}})``", "``Name2, Name1``", "Reverses a list of items." + "``join({{separator}}, {{values}})``", "``join("-", {{mats.Name}})``", "``Name1-Name2``", "Joins a list of items with a custom separator. By default, all lists a rendered as comma separated." + "``{{value1}}[+-*/]{{value2}}``", "``{{z}}+3``", "``5``", "Does arithmetic. Typical operators such as +, -, \*, and / are allowed and can be mixed with other variables and formatting functions." When using queries in an IfcAnnotation tag surround with backticks. Examples: