2.4 - Global vs. Local

Class   macro()   provides both local and global style and variable handling. The point of this is to allow page-local environments separate from the multi-page document-wide environment. This makes creating a document processing system much, much easier as the system itself need not keep track of very much at all other than the pages of the document and any global styles in a database.

Generally, style use and variable retrieval look for a local instance first, then if that is not found, a global instance is used.

Variable invocation works the same way: Local first, global if no local instance exists.

However, class   macro()   provides specific style and variable syntax that allows only the local or only the global instance to be retrieved, so there is no lock-in to the default behavior.

2.4.1 - Local and Global Style Definition


[style styleName content]    local style definition
[gstyle styleName content]   global style definition

2.4.2 - Default, Local and Global Style invocation


{styleName( content)} prefer local style over global style
[glos styleName( content)] use global style only
[locs styleName( content)] use local style only

2.4.3 - Local and Global variable Definition


[local variableName] define global variable
[global variableName] define local variable

2.4.4 - Default, Local and Global variable Invocation


[v variableName] prefer local variable over global variable
[lv variableName] use global variable only
[gv variableName] use local variable only
Keyboard Navigation
, Previous Page . Next Page t TOC i Index

Valid HTML 4.01 Loose
 

This manual was generated with wtfm
wtfm uses aa_macro and SqLite
aa_macro uses python 2.7