From d88af0e47ea2f37d0127a6ac290e1ee5ace77dd4 Mon Sep 17 00:00:00 2001 From: Harrissou Sant-anna Date: Sun, 25 Feb 2024 19:15:40 +0100 Subject: [PATCH] Limit the collapsible block to html builds PDF unfotunately returns an empty block for now. Also move the directives to an include file, easier to maintain. --- .../expressions/functions_list.rst | 252 +++++------------- docs/user_manual/expressions/text_include.rst | 21 ++ 2 files changed, 90 insertions(+), 183 deletions(-) create mode 100644 docs/user_manual/expressions/text_include.rst diff --git a/docs/user_manual/expressions/functions_list.rst b/docs/user_manual/expressions/functions_list.rst index a368bf8a48a..71e163b78df 100644 --- a/docs/user_manual/expressions/functions_list.rst +++ b/docs/user_manual/expressions/functions_list.rst @@ -21,14 +21,9 @@ Aggregates Functions This group contains functions which aggregate values over layers and fields. -.. admonition:: Show/hide list of functions - :class: dropdown - - .. only:: html - - .. contents:: - :local: - :class: toc_columns +.. include:: text_include.rst + :start-after: .. functions_group_toc + :end-before: .. end_functions_group_toc .. include:: expression_help/Aggregates.rst :start-after: :orphan: @@ -51,14 +46,9 @@ list data structures). The order of values within the array matters, unlike the :ref:`'map' data structure `, where the order of key-value pairs is irrelevant and values are identified by their keys. -.. admonition:: Show/hide list of functions - :class: dropdown - - .. only:: html - - .. contents:: - :local: - :class: toc_columns +.. include:: text_include.rst + :start-after: .. functions_group_toc + :end-before: .. end_functions_group_toc .. include:: expression_help/Arrays.rst :start-after: :orphan: @@ -76,14 +66,9 @@ Color Functions This group contains functions for manipulating colors. -.. admonition:: Show/hide list of functions - :class: dropdown - - .. only:: html - - .. contents:: - :local: - :class: toc_columns +.. include:: text_include.rst + :start-after: .. functions_group_toc + :end-before: .. end_functions_group_toc .. include:: expression_help/Color.rst :start-after: :orphan: @@ -118,14 +103,9 @@ Conditional Functions This group contains functions to handle conditional checks in expressions. -.. admonition:: Show/hide list of functions - :class: dropdown - - .. only:: html - - .. contents:: - :local: - :class: toc_columns +.. include:: text_include.rst + :start-after: .. functions_group_toc + :end-before: .. end_functions_group_toc .. include:: expression_help/Conditionals.rst :start-after: :orphan: @@ -139,14 +119,9 @@ Conversions Functions This group contains functions to convert one data type to another (e.g., string from/to integer, binary from/to string, string to date, ...). -.. admonition:: Show/hide list of functions - :class: dropdown - - .. only:: html - - .. contents:: - :local: - :class: toc_columns +.. include:: text_include.rst + :start-after: .. functions_group_toc + :end-before: .. end_functions_group_toc .. include:: expression_help/Conversions.rst :start-after: :orphan: @@ -182,14 +157,9 @@ This group shares several functions with the :ref:`conversion_functions` one of the date extraction functions (e.g., :ref:`day() ` to get the interval expressed in days) -.. admonition:: Show/hide list of functions - :class: dropdown - - .. only:: html - - .. contents:: - :local: - :class: toc_columns +.. include:: text_include.rst + :start-after: .. functions_group_toc + :end-before: .. end_functions_group_toc .. include:: expression_help/Date_and_Time.rst :start-after: :orphan: @@ -248,14 +218,9 @@ To add a value to the expression you are writing, double-click on it in the list If the value is of a string type, it should be simple quoted, otherwise no quote is needed. -.. admonition:: Show/hide list of functions - :class: dropdown - - .. only:: html - - .. contents:: - :local: - :class: toc_columns +.. include:: text_include.rst + :start-after: .. functions_group_toc + :end-before: .. end_functions_group_toc .. include:: expression_help/Fields_and_Values.rst :start-after: :orphan: @@ -266,14 +231,9 @@ Files and Paths Functions This group contains functions which manipulate file and path names. -.. admonition:: Show/hide list of functions - :class: dropdown - - .. only:: html - - .. contents:: - :local: - :class: toc_columns +.. include:: text_include.rst + :start-after: .. functions_group_toc + :end-before: .. end_functions_group_toc .. include:: expression_help/Files_and_Paths.rst :start-after: :orphan: @@ -285,14 +245,9 @@ Form Functions This group contains functions that operate exclusively under the attribute form context. For example, in :ref:`field's widgets ` settings. -.. admonition:: Show/hide list of functions - :class: dropdown - - .. only:: html - - .. contents:: - :local: - :class: toc_columns +.. include:: text_include.rst + :start-after: .. functions_group_toc + :end-before: .. end_functions_group_toc .. include:: expression_help/Form.rst :start-after: :orphan: @@ -303,14 +258,9 @@ Fuzzy Matching Functions This group contains functions for fuzzy comparisons between values. -.. admonition:: Show/hide list of functions - :class: dropdown - - .. only:: html - - .. contents:: - :local: - :class: toc_columns +.. include:: text_include.rst + :start-after: .. functions_group_toc + :end-before: .. end_functions_group_toc .. include:: expression_help/Fuzzy_Matching.rst :start-after: :orphan: @@ -321,14 +271,9 @@ General Functions This group contains general assorted functions. -.. admonition:: Show/hide list of functions - :class: dropdown - - .. only:: html - - .. contents:: - :local: - :class: toc_columns +.. include:: text_include.rst + :start-after: .. functions_group_toc + :end-before: .. end_functions_group_toc .. include:: expression_help/General.rst :start-after: :orphan: @@ -348,14 +293,9 @@ Geometry Functions This group contains functions that operate on geometry objects (e.g. buffer, transform, $area). -.. admonition:: Show/hide list of functions - :class: dropdown - - .. only:: html - - .. contents:: - :local: - :class: toc_columns +.. include:: text_include.rst + :start-after: .. functions_group_toc + :end-before: .. end_functions_group_toc .. include:: expression_help/GeometryGroup.rst :start-after: :orphan: @@ -777,14 +717,9 @@ Layout Functions This group contains functions to manipulate print layout items properties. -.. admonition:: Show/hide list of functions - :class: dropdown - - .. only:: html - - .. contents:: - :local: - :class: toc_columns +.. include:: text_include.rst + :start-after: .. functions_group_toc + :end-before: .. end_functions_group_toc .. include:: expression_help/Layout.rst :start-after: :orphan: @@ -818,14 +753,9 @@ such as when performing :ref:`aggregates `, :ref:`attribute It also provides some convenient functions to manipulate layers. -.. admonition:: Show/hide list of functions - :class: dropdown - - .. only:: html - - .. contents:: - :local: - :class: toc_columns +.. include:: text_include.rst + :start-after: .. functions_group_toc + :end-before: .. end_functions_group_toc .. include:: expression_help/Map_Layers.rst :start-after: :orphan: @@ -850,14 +780,10 @@ arrays). Unlike the :ref:`list data structure ` where values order matters, the order of the key-value pairs in the map object is not relevant and values are identified by their keys. -.. admonition:: Show/hide list of functions - :class: dropdown - - .. only:: html +.. include:: text_include.rst + :start-after: .. functions_group_toc + :end-before: .. end_functions_group_toc - .. contents:: - :local: - :class: toc_columns .. include:: expression_help/Maps.rst :start-after: :orphan: @@ -875,14 +801,9 @@ Mathematical Functions This group contains math functions (e.g., square root, sin and cos). -.. admonition:: Show/hide list of functions - :class: dropdown - - .. only:: html - - .. contents:: - :local: - :class: toc_columns +.. include:: text_include.rst + :start-after: .. functions_group_toc + :end-before: .. end_functions_group_toc .. include:: expression_help/Math.rst :start-after: :orphan: @@ -894,14 +815,9 @@ Meshes Functions This group contains functions which calculate or return mesh related values. -.. admonition:: Show/hide list of functions - :class: dropdown - - .. only:: html - - .. contents:: - :local: - :class: toc_columns +.. include:: text_include.rst + :start-after: .. functions_group_toc + :end-before: .. end_functions_group_toc .. include:: expression_help/Meshes.rst :start-after: :orphan: @@ -914,14 +830,9 @@ This group contains operators (e.g., +, -, \*). Note that for most of the mathematical functions below, if one of the inputs is NULL then the result is NULL. -.. admonition:: Show/hide list of functions - :class: dropdown - - .. only:: html - - .. contents:: - :local: - :class: toc_columns +.. include:: text_include.rst + :start-after: .. functions_group_toc + :end-before: .. end_functions_group_toc .. include:: expression_help/Operators.rst :start-after: :orphan: @@ -973,14 +884,9 @@ Processing Functions This group contains functions that operate on processing algorithms. -.. admonition:: Show/hide list of functions - :class: dropdown - - .. only:: html - - .. contents:: - :local: - :class: toc_columns +.. include:: text_include.rst + :start-after: .. functions_group_toc + :end-before: .. end_functions_group_toc .. include:: expression_help/Processing.rst :start-after: :orphan: @@ -993,14 +899,9 @@ Rasters Functions This group contains functions to operate on raster layer. -.. admonition:: Show/hide list of functions - :class: dropdown - - .. only:: html - - .. contents:: - :local: - :class: toc_columns +.. include:: text_include.rst + :start-after: .. functions_group_toc + :end-before: .. end_functions_group_toc .. include:: expression_help/Rasters.rst :start-after: :orphan: @@ -1013,14 +914,9 @@ Record and Attributes Functions This group contains functions that operate on record identifiers. -.. admonition:: Show/hide list of functions - :class: dropdown - - .. only:: html - - .. contents:: - :local: - :class: toc_columns +.. include:: text_include.rst + :start-after: .. functions_group_toc + :end-before: .. end_functions_group_toc .. include:: expression_help/Record_and_Attributes.rst :start-after: :orphan: @@ -1101,14 +997,9 @@ Sensors Functions This group contains functions to interact with sensors. -.. admonition:: Show/hide list of functions - :class: dropdown - - .. only:: html - - .. contents:: - :local: - :class: toc_columns +.. include:: text_include.rst + :start-after: .. functions_group_toc + :end-before: .. end_functions_group_toc .. include:: expression_help/Sensors.rst :start-after: :orphan: @@ -1122,14 +1013,9 @@ String Functions This group contains functions that operate on strings (e.g., that replace, convert to upper case). -.. admonition:: Show/hide list of functions - :class: dropdown - - .. only:: html - - .. contents:: - :local: - :class: toc_columns +.. include:: text_include.rst + :start-after: .. functions_group_toc + :end-before: .. end_functions_group_toc .. include:: expression_help/String.rst :start-after: :orphan: diff --git a/docs/user_manual/expressions/text_include.rst b/docs/user_manual/expressions/text_include.rst new file mode 100644 index 00000000000..22b64a1470d --- /dev/null +++ b/docs/user_manual/expressions/text_include.rst @@ -0,0 +1,21 @@ +:orphan: + +Texts For Include +================= + +.. functions_group_toc +.. Used to display local TOC for expression functions groups + in columns within a collapsible widget, only on html build + +.. only:: html + + .. admonition:: Show/hide list of functions + :class: dropdown + + .. only:: html + + .. contents:: + :local: + :class: toc_columns + +.. end_functions_group_toc