6.36. restrict Macro


The general syntax is:

  !restrict name

The arguments are:

Name Type Default Rule
name string    

See Understanding Macro Interfaces, if necessary.


The restrict macro declares a restricted family of variables. If a variable begins with a restricted prefix, then it must be declared via the define filter.

This feature aims to catch errors caused by authors using a bad variable name. For example, if an author types

   !define DOC_NAMe "My Document"

but meant to type

   !define DOC_NAME "My Document"

then an error will be raised as DOC_NAMe is an unknown variable within the DOC family.