Environment variables

Environment variables are read-only definitions created automatically by the computer operating system or the current user within the environment in which TopLeaf is run. For example, you might choose to use environment variables to identify the current repository path, the location of a folder that containing a user dictionary, or the name of the workstation on which TopLeaf is installed. Please see your operating system documentation for more information concerning the declaration and use of environment variables.

A Topleaf environment variable name is a token beginning with a $ (U+0024) and continuing with letters or digits, hyphens, underscores, colons, or full stops, which together are known as environment variable name characters. The value of an environment variable cannot be altered within TopLeaf but may be accessed by any mapping.

TopLeaf automatically defines the following environment variables each time the composition engine is run:

Environment Variable Meaning
{$TLPPATH} the file path to the current partition within the repository.
{$TLPPUB} the file path to the current publication in the repository.
{$TLPNAME} the name of the current partition.
{$TLBUILD} the TopLeaf build number (e.g. TopLeaf 7 is build 70)
{$TKSLLDIR} the file path to the currently selected TopLeaf repository