------------------------------------------ lines 34-53 of file: example/template.xrst ------------------------------------------ {xrst_begin example_expansion_two} {xrst_comment BEGIN_EXPANSION_two} {xrst_template ; example/template_file.xrst headers : Expansion Number, Spelling, First Paragraph, Second Paragraph @Title@ : is the title for this page @#####@ : is the rst underlining for the title @number@ : is the number for this page; e.g., one, two, ... @case@ : if first (second) the first (second) paragraph is displayed @Title@ ; Second Expansion @#####@ ; ################ @number@ ; two @case@ ; second } {xrst_comment END_EXPANSION_two} {xrst_end example_expansion_two} ---------------------------------------------- xrst template file: example/template_file.xrst ---------------------------------------------- {xrst_spell_off} {xrst_comment SPDX-License-Identifier: GPL-3.0-or-later SPDX-FileCopyrightText: Bradley M. Bell bradbell at seanet dot com SPDX-FileContributor: 2020-25 Bradley M. Bell } {xrst_spell_on} {xrst_comment This is an example xrst-template file. An expansion of this file will create the following headings: headers : Expansion Number, Spelling, First Paragraph, Second Paragraph This file has the following template replacements: @Title@ : is the title for this page @#####@ : is the rst underlining for the title @number@ : is the number for this page; e.g., one, two, ... This template uses BEGIN_EXPANSION_@number@ and END_EXPANSION_@number@ for the limits of the xrst_template command in the page file that is using this template. @case@ : if first (second) the first (second) paragraph is displayed } @Title@ @#####@ Expansion Number **************** This is expansion number @number@ of the template file ``example/template_file.xrst`` . Spelling ******** Template files can not have :ref:`spell commands` . Every page that uses a template file will have to include the template file special words it the page's spell command. You can avoid this by surrounding the intended use of special words, and double words, by ``\{xrst_spell_off}`` and ``\{xrst_spell_on}`` . This is what is done in the following sentence: {xrst_spell_off} Using 'myspecialword' and using 'double double' are OK here. {xrst_spell_on} {xrst_suspend @case@ != first} First Paragraph *************** This paragraph is displayed if the case argument is first. {xrst_resume} {xrst_suspend @case@ != second} Second Paragraph **************** This paragraph is displayed if the case argument is second. {xrst_resume} {xrst_suspend @case@ == third} Third Paragraph *************** This paragraph is displayed if the case argument is not third. {xrst_resume} This Template File ****************** {xrst_literal example/template_file.xrst } This Template Usage ******************* {xrst_literal BEGIN_EXPANSION_@number@ END_EXPANSION_@number@ }