Make use of a defined variable or sequencer
substitution
Use variable substitution within a manuscript to replace the variable's name with its value.
Syntax
Variable names begin with a dollar-sign $ and may be composed of alphabetic characters A-Z, a-z, numerals 0-9, and dashes -.
Here are some examples:
Ways to use variable substitution
When a variable name is typed into a manuscript, without using the assignment or increment operator, its internal dictionary value is injected into the compiled document.
A variable may be used wherever a phrase expects textual content: inside basic and text-mark phrases; inside interscribed and adjunct expressions; and inside external manuscript files accessed with !include
, !use
and !enclosure
pragmas.
Variables may also be used inside phrase attribute values, but only if the attribute's value is enclosed by apostrophes ' ' or quotation marks " ".
Variables may be used inside grave-accent ` ` delimited sourcerefs to refer to URLs, filenames and paths.
Limitations
There several limitations to their use:
- Variables located within graynotes are not substituted.
- Variables cannot be used in pragmas and option statements.
- Variables are never treated as semantax.
- Phrase attribute names (as opposed to phrase attribute values) cannot be variables.