A style definition begins with the command `BeginStyle' and ends with `EndStyle'. Between these come any number of commands and definitions. The style is parsed and interpreted using JaM, so you will want to read the JaM documentation if you're going to spend much time writing styles.
Formatting Parameters
This section lists some of the formatting parameters. Those that are recognized by the style machinery but are not currently implemented are in
strikeout
type. Typically, the name of the parameter is a command defined in JaM that pops an item from the stack and makes it the new parameter value. However if the item on the top of the stack is the word `the', the commands push the current parameter value so procedures can read parameters as well as write them. For numeric parameters, the following mechanisms are provided to simplify making incremental changes to the current parameter value:
<amount> bigger adds the amount to the current para-
meter value
<amount> smaller substracts the amount from the para-
meter value
<amount> percent multiplies the parameter value by the
specified percentage, i.e.,
value ← (amount/100)*value
<amount> percent bigger increases value by specified percentage
<amount> percent smaller decreases value by specified percentage
Font Parameters
alphabets one of caps+lowercase, caps+smallcaps, lowercase, or caps
fontPrefix prefix of the full hierarchical font name, e.g.
"xerox/pressfonts/"
family the name of current font family, such
as "TimesRoman"
size value is the font size in points
face one of regular, bold, italic, or bold+italic
You can also add or remove italic or bold by means of the following commands:
+bold face, -bold face, +italic face, or -italic face
textHue hue of text, in range [0..1);
0=red, 1/6=yellow, 2/6=green, etc.
textSaturation saturation of text; 0=no color, 1=full color
textBrightness brightness of text; 0=black, 1=full brightness
textColor takes 3 numbers: hue, saturation, brightness
underlining one of all, visible, letters+digits, or none
underlineThickness thickness of the underline.
underlineDescent distance from baseline downwards to top of underline
underlineHue, underlineSaturation, underlineBrightness, underlineColor parameters describing the color of the underline.
strikeout one of all, visible, letters+digits, or none
strikeoutThickness thickness of the strikeout line.
strikeoutAscent distance from baseline to top of strikeout line.
strikeoutHue, strikeoutSaturation, strikeoutBrightness, strikeoutColor parameters describing the color of the strikeout line.
outlineBoxThickness, outlineboxBearoff, outlineboxHue, outlineBoxSaturation, outlineBoxBrightness, outlineBoxColor
backgroundAscent, backgroundDescent, backgroundHue, backgroundSaturation, backgroundBrightness, backgroundColor
hShift distance to offset text, positive to the right
vShift distance to raise text above baseline (can be negative)
Font Parameters
areaHue, areaSaturation, areaBrightness, areaColor, outlineHue, outlineSaturation, outlineBrightness, outlineColor
lineWeight
Leading Parameters
Leading parameters are stored as triples of <size, stretch, and shrink> which, following Knuth, we refer to as `glue'. You can set the separate components individually, or you can push three values on the stack and use one of the leading glue commands to set them all at once.
There are three kinds of leading corresponding to the spaces between lines in a node, the space above a node, and the space below it. The actual space between two adjacent nodes is the maximum of the `below' leading of the first node and the `above' leading of the second.
leading distance between baselines within a
node
leadingStretch how much leading can increase
leadingShrink how much leading can decrease
leadingGlue size, stretch, and shrink for leading
topLeading distance between baselines above a
node
topLeadingStretch how much top leading can increase
topLeadingShrink how much top leading can decrease
topLeadingGlue size, stretch, and shrink for top leading
bottomLeading distance between baselines below a
node
bottomLeadingStretch how much bottom leading can increase
bottomLeadingShrink how much bottom leading can decrease
bottomLeadingGlue size, stretch, and shrink for bottom
leading
Layout Parameters
lineFormatting FlushLeft, FlushRight, Justified,
Centered
minLineGap min distance between line top and
previous bottom (can be negative)
leftIndent all lines indent this much on left
rightIndent all lines indent this much on right
firstIndent first line indents this much more on left
firstIndentRight first line this much shorter on right
restIndent other lines indent this much more on
left
runaroundLeft depth of first indent on the left
runaroundRight depth of first indent on the right
topIndent top line at least this much down from
top of viewer/page
bottomIndent bottom baseline at least this up from
bottom of page
Page Layout Parameters
column number of columns
pageWidth width of the paper
pageLength height of the paper
leftMargin whitespace at left of the page
rightMargin whitespace at right of the page
topMargin whitespace at top of the page
bottomMargin whitespace at bottom of the page
headerMargin height of area below topMargin for
headers
footerMargin height of area above bottomMargin for
footers
bindingMargin not used at present
lineLength width of lines of text
pageBreakAfterFirstLinePenalty
pageBreakAfterLastLinePenalty
pageBreakBeforeFirstLinePenalty
pageBreakBeforeLastLinePenalty
pageBreakPenalty
Dimensions
pt point
pc pica
in inches
cm centimeters
mm millimeters
fil 10^4 points
fill 10^8 points
Miscellaneous
style the name of the current style
isComment pushes .true or .false according to
comment property of node
isPrint pushes .true if executing print rules, else .false
nestingLevel pushes integer; 0 for root, 1 for top
level, etc.