Next: Option defaults Previous: Macro definitions Contents: Contents |
An alias declaration starts with a "+" character followed immediately by the alias name (without backslash prefix), followed immediately by a colon. (No additional spaces here.) All text after this colon up to the paragraph closing empty line is stored as the replacement text. So, whereever you will use the new macro, the parser will replace it by this text and reparse the result. This means that your macro text can contain any valid constructions like tags or other macros.
The replacement text may contain strings embedded into doubled underscores like __this__
. This is a special syntax to mark that the macro takes parameters of these names (e.g. this
). If a tag is used and these parameters are set, their values will replace the mentioned placeholders. The special placeholder __body__
is used to mark the place where the macro body is to place.
Here are a few examples:
+RED:\FONT{color=red}<__body__> +F:\FONT{color=__c__}<__body__> +IB:\B<\I<__body__>> This \IB<text> is \RED<colored>. +TEXT:Macros can be used to abbreviate longer texts as well as other tags or tag combinations. +HTML:\EMBED{lang=html} Tags can be \RED<\I<nested>> into macros. And \I<\F{c=blue}<vice versa>>. \IB<\RED<This>> is formatted by nested macros. \HTML This is <i>embedded HTML</i>\END_EMBED. Please note: \TEXT |
Next: Option defaults Previous: Macro definitions Contents: Contents |