example_expansion_two

View page source

Second Expansion

Expansion Number

This is expansion number two of the template file example/template_file.xrst .

Spelling

Template files can not have 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: Using ‘myspecialword’ and using ‘double double’ are OK here.

Conditional Paragraph

This paragraph is displayed if the boolean in the suspend command is false.

This Template File

{xrst_comment:
This template file has the following parameters:
   @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, ...
   @boolean@ : if false the conditional paragraph is displayed

This template uses BEGIN_EXPANSION_@number@ and END_EXPANSION_@number@
for the limits of the template command in corresponding the page file.
}

@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<spell_example-name>` .
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 @boolean@}
Conditional Paragraph
*********************
This paragraph is displayed if the boolean in the suspend command is false.
{xrst_resume}

This Template File
******************
{xrst_literal
   example/template_file.xrst
}

This Template Usage
*******************
{xrst_literal
   BEGIN_EXPANSION_@number@
   END_EXPANSION_@number@
}

This Template Usage

{xrst_template ,
   example/template_file.xrst
   @Title@        , Second Expansion
   @#####@        , ################
   @number@       , two
   @boolean@      , false
}