ArborX


compstyle

Longname: compstyle   Open the Documentation Legend
Released: n/a 
Created: n/a 
Last modified: 8.13a 
See also: fdpref

Summary
Controls the preferences for compiled styles. A control keyword used with fdpref.
Example (n/a)
No example is available for this feature.

Syntax (8.13a)
st_from:n

Minimum character length of style tag for compile styles to take effect on.

st_to:n

Maximum character length of style tag for compile styles to take effect on.

othr_from:n

Minimum character length of other tags for compile styles to take effect on.

othr_to:n

Maximum character length of other tags for compile styles to take effect on.

compxstring:o

Compile x-counter and format string indices.

Off
On

Found in the dialogue [Document/Preferences/Document/Speed]

To compile x-counter and format string indices

It is common practise for documents to contain a script activated during autoexec to initialise a set of constants to allow named access to the format counters x(...) and $(...). For example, the script might start like this:

  1
 ^idx=0 2

Now, instead of a show string like:

 <?show sum is $^(x(0) + x(1))>

which is unreadable, from version 8.13a we can have

 <?show sum is $^(x(^_x_my_store_value) + x(^_x_another_value))>

which is, only slightly more readable

However, the second one is slower to process as it involves looking up the values assigned to the ^_x_ variables. This new option will perform the lookup once during compilation so the the format system sees the faster version.

The option is hard-coded to search for any sequence between angle brackets that begins

 x(^_x_....<br/>OR<br/> 1
 $(^_s_.... 2

(in fact, the _s_ and _x_ prefixes are interchangeable and either will work in both cases). These are the most common prefixes used today.

Note that for this new option to work successfully, it is necessary for these 'constants' to be defined before the first format of the document. If they are not then 3B2 may compile some styles with blank replacements for the variables and the format will look bad. Alternatively, use the new tmem macro whenever index variables are added or changed to clear all compiled styles and cause them to be recompiled when next accessed.

Document created on 28-Sep-2004, last reviewed on 05-Sep-2005 (revision 001)