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 parameter value
<amount> smaller substracts the amount from the parameter 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
There are more parameters here than can reasonably be referenced using the limited number of looks available in a given style. The Postfix property may be applied to individual characters to get fine-grain control of these parameters when you run out of looks, or for special cases. See above for instructions about how to do this.
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.
backgroundAscent, backgroundDescent, backgroundHue, backgroundSaturation, backgroundBrightness, backgroundColor
parameters describing the size and color
of the text background.
outlineBoxBearoff amount to fatten text background horizontally, or, if no background box is specified, amount of extra white space to leave around the font box, both horizontally and vertically.
outlineBoxThickness thickness of outline around text background.
outlineboxHue, outlineBoxSaturation, outlineBoxBrightness, outlineBoxColor
parameters describing the color
of the text outline box
letterspacing space to add between visible characters
hShift distance to offset text, positive to the right
vShift distance to raise text above baseline (can be negative)
Graphics
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
lastLineFormatting FlushLeft, FlushRight, Justified, Centered; applies to last line of node.
hyphenation Takes a name (i.e., (English) or (No)) that tells what hyphenation routine to use (applies at node level).
hyphenCode Takes a numeric character code specifying what to use for a hyphen (default 45 is the ASCII hyphen/minus).
maxHorizontalExpansion Spaces in justified lines are never stretched by more than this amount, possibly resulting in a somewhat ragged right margin. Applies at the node level.
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 baseline at least this much down from top of viewer/page
bottomIndent bottom baseline at least this up from bottom of page
lineLength maximum width of lines of text
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
reserved for headers
footerMargin height of area above bottomMargin
reserved for footers
bindingMargin extra margin on the bound edge of page
pageBreakAfterFirstLinePenalty
pageBreakAfterLastLinePenalty
pageBreakBeforeFirstLinePenalty
pageBreakBeforeLastLinePenalty
pageBreakPenalty
Dimensions
pt point (72.27 pt/in)
bp big point (72 bp/in)
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.