Please enable JavaScript to view this site.


Navigation: Tokens

Macro Tokens

Scroll Prev Up Next More

Macro tokens are tokens which then get evaluated according to special rules you build yourself using Macros.


Macro tokens have the form :


[ LanguageTag DayValue * MacroIndex MacroLabel ]


Note that the spaces above have only been inserted for added legibility.


There should be no spaces anywhere in this token, with the possible exception of the Macro Label which is free text.


You must always supply a DayValue. In the case of Macro tokens, you cannot use the shortcut that a DayValue of 1 can be omitted.


Macro Index

The Macro Index is a number from 1-30.

The indices do not need to be consecutive. For example it is acceptable to have a *1 and a *12 macro in a GridTemplate.

You can have multiple index macros, using multiple indices, as discussed here.

Macro Label

The Macro Label can be any text any text you wish in analogy to the labels used for slogan tokens. As mentioned above this label can contain text, and even the * character. Although the Macro Label is reminiscent of the slogan tokens' labels, there are some key differences :

The Macro Label is used as the value of the s_TokenRoot system variable in the macro used by the macro token.

Multiple different tokens can share the same Macro Index, but have different Macro Labels. This is a common trick, as discussed here.







Fillers and padding in macro tokens


If you use token fillers or token padding inside a macro token, then you should be aware that token fillers will be inserted differently, depending if the result of the macro contains other tokens or not.


If the result of the macro contains tokens, then it is assumed that the filler should be inserted into each of the result's tokens.

However, if the result of the macro is text that does not contain any tokens, then the filler is applied to the macro token as a whole, in a manner similar to the way filler tokens behave normally.


See also: Color Macros.


Topic 108473, last updated on 19-Sep-2023