From a87442b78c0a7a465c5cc02cc61038db274d949f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 19 Nov 2024 08:29:00 +0530 Subject: [PATCH] Fix some refs --- manual/template_lang.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manual/template_lang.rst b/manual/template_lang.rst index d373f40462..f82f911471 100644 --- a/manual/template_lang.rst +++ b/manual/template_lang.rst @@ -312,7 +312,7 @@ The operator precedence (order of evaluation) from highest (evaluated first) to **Field references** -A ``field_reference`` evaluates to the value of the metadata field named by lookup name that follows the ``$`` or ``$$``. Using ``$`` is equivalent to using the :ref:`field` function. Using ``$$`` is equivalent to using the :ref:`raw_field` function. Examples:: +A ``field_reference`` evaluates to the value of the metadata field named by lookup name that follows the ``$`` or ``$$``. Using ``$`` is equivalent to using the :ref:`ff_field` function. Using ``$$`` is equivalent to using the :ref:`ff_raw_field` function. Examples:: * $authors ==> field('authors') * $#genre ==> field('#genre') @@ -361,7 +361,7 @@ For example, this program returns the value of the ``series`` column if the book **For expressions** -The ``for`` expression iterates over a list of values, processing them one at a time. The ``list_expression`` must evaluate either to a metadata field ``lookup name`` e.g., ``tags`` or ``#genre``, or to a list of values. The :ref:`ff_range_function` generates a list of numbers. If the result is a valid ``lookup name`` then the field's value is fetched and the separator specified for that field type is used. If the result isn't a valid lookup name then it is assumed to be a list of values. The list is assumed to be separated by commas unless the optional keyword ``separator`` is supplied, in which case the list values must be separated by the result of evaluating the ``separator_expr``. A separator cannot be used if the list is generated by ``range()``. Each value in the list is assigned to the specified variable then the ``expression_list`` is evaluated. You can use ``break`` to jump out of the loop, and ``continue`` to jump to the beginning of the loop for the next iteration. +The ``for`` expression iterates over a list of values, processing them one at a time. The ``list_expression`` must evaluate either to a metadata field ``lookup name`` e.g., ``tags`` or ``#genre``, or to a list of values. The :ref:`ff_range` generates a list of numbers. If the result is a valid ``lookup name`` then the field's value is fetched and the separator specified for that field type is used. If the result isn't a valid lookup name then it is assumed to be a list of values. The list is assumed to be separated by commas unless the optional keyword ``separator`` is supplied, in which case the list values must be separated by the result of evaluating the ``separator_expr``. A separator cannot be used if the list is generated by ``range()``. Each value in the list is assigned to the specified variable then the ``expression_list`` is evaluated. You can use ``break`` to jump out of the loop, and ``continue`` to jump to the beginning of the loop for the next iteration. Example: This template removes the first hierarchical name for each value in Genre (``#genre``), constructing a list with the new names::