Function Declarations
This section defines functions of the basic StyleParams, which are used by the StyleRules below. A layered style may override these definitions, but a Postfix of Prefix property cannot.
(Magnified) {the magnification .mul} .cvx .def
(BasicSize) {the basicSize Magnified} .cvx .def
(CodeSize) {the codeSize Magnified} .cvx .def
(BasicIncrement) {the basicIncrement Magnified} .cvx .def
(ExtraLead) {the extraLead Magnified} .cvx .def
(
CodeIndent) {the codeIndent Magnified} .cvx .def
(
DoubleIncrement) % double type font size change
{BasicIncrement 2 .mul} .cvx .def
(
ParaIndent) % normal indentation of paragraphs
{BasicSize 2 .mul} .cvx .def
(
NestIndent) % indentation to show nesting
{BasicSize} .cvx .def
(
LargeSize) % large font size
{BasicSize BasicIncrement .add} .cvx .def
(
XLSize) % large font size
{BasicSize 2 BasicIncrement .mul .add} .cvx .def
(
TitleSize) % largest font size
{BasicSize 4 BasicIncrement .mul .add} .cvx .def
(
BasicLeading) % normal type leading
{BasicSize ExtraLead .add} .cvx .def
(
LooseLeading) % looser-than-normal leading
{BasicLeading ExtraLead .add} .cvx .def
(
MoreLead) % double inter-paragraph spacing
{ExtraLead 3 .mul} .cvx .def
(
BreakSize) % normal inter-paragraph spacing
{BasicLeading MoreLead .add} .cvx .def
(
BreakPlus) % extra inter-paragraph spacing
{BreakSize ExtraLead .add} .cvx .def
(
DoubleBreak) % twice inter-paragraph spacing
{BreakSize MoreLead .add} .cvx .def
(
TripleBreak) % triple inter-paragraph spacing
{DoubleBreak MoreLead .add} .cvx .def
(
QuadBreak) % quadruple inter-paragraph spacing
{TripleBreak MoreLead .add} .cvx .def
(
QuintBreak) % quintuple inter-paragraph spacing
{QuadBreak MoreLead .add} .cvx .def
(
HexBreak) % hextuple inter-paragraph spacing
{QuintBreak MoreLead .add} .cvx .def
Utility Style Rule Declarations
These style rule declarations are not normally used directly as formats, but are used by other style rules or Postfix properties. Note that a style rule should not use or modify the stack, and should not define anything; their only role should be to modify the values of the style parameters.
(BiggerSize) "Make the font size bigger" {BasicIncrement bigger size} StyleRule
(SmallerSize) "Make the font size smaller" {BasicIncrement smaller size} StyleRule
(
CodeFont) "code font" {
IF the device (press) .eq THEN {"Tioga" family} ELSE {FontFamily} FI
CodeSize size
} StyleRule
(
FontFamily) "main font" {
IF the device (press) .eq THEN {"TimesRoman"} ELSE {"Classic"} FI family
} StyleRule
(
AlternateFontFamily) "other font" {
IF the device (press) .eq THEN {"Helvetica"} ELSE {"Modern"} FI family
} StyleRule
(
AsciiFont) "This fixed-pitch font is available on the printers..." {
FixedPitchFont
} PrintRule
(
AsciiFont) "...and this one is available for the screen" {
"AMTeX" family
} ScreenRule
(
FixedPitchFont) "fixed pitch font" {
IF the device (press) .eq THEN {"Gacha"} ELSE {"Xerox/XC1-1-1/Terminal"} FI family
} StyleRule
(GreekFont) "Greek font" { "Hippo" family } StyleRule
(
LogoFont) "Xerox logo font" {
IF the device (press) .eq THEN {"Logo"} ELSE {"Xerox/XC1-1-1/Logotypes-Xerox"} FI family
} StyleRule
(
DoNest) "set it up so Nest does the indentation" {.true displayNesting} StyleRule
Put this in the Postfix property on the root node to always show nesting
(
DontNest) "set it up so Nest does nothing" {.false displayNesting} StyleRule
Put this in the Postfix property on the root node to show nesting only for code nodes
(DefaultNest) "for screen" {DoNest} ScreenRule
(DefaultNest) "for print" {DontNest} PrintRule
(
Nest) "indicate nesting level by indentation" {
IF the displayNesting THEN {IF nestingLevel 1 .gt THEN {NestIndent bigger leftIndent} FI} FI
} StyleRule
(DefaultLineLength) "for screen" {9 in lineLength} ScreenRule
(DefaultLineLength) "for print" {6 in lineLength} PrintRule
(
FontPrefix) "default font prefix" {
IF the device (press) .eq
THEN {OldFonts}
ELSE {XCFonts}
FI } StyleRule
(
OldFonts) "default font prefix for old screen fonts" {
TiogaFonts
} ScreenRule
(
OldFonts) "default font prefix for old print fonts" {
PressFonts
} PrintRule
(
TiogaFonts) "font prefix for old screen fonts suitable for easy reading on display" {
"Xerox/TiogaFonts/" fontPrefix
} StyleRule
(
PressFonts) "font prefix for old Press fonts suitable for look hardcopy" {
"Xerox/PressFonts/" fontPrefix
} StyleRule
(
XeroxCharCodes) "means this document uses Xerox Character Codes" {
"xcc" device
XCFonts
FontFamily
} StyleRule
(
XCFonts) "font prefix for Xerox Character Code fonts" {
XCTiogaFonts
} ScreenRule
(
XCFonts) "font prefix for Xerox Character Code fonts" {
XCPrintFonts
} PrintRule
(
XCTiogaFonts) "font prefix for Xerox Character Code screen fonts suitable for easy reading on display" {
"Xerox/XC1-3-3/" fontPrefix
20 percent bigger magnification % make them bigger for easy reading.
} StyleRule
(
XCPrintFonts) "font prefix for Xerox Character Code fonts suitable for hardcopy" {
"Xerox/XC1-3-3/" fontPrefix
} StyleRule
Formats
(
abstract) "for abstract on title page" {
head4
AlternateFontFamily
15 sp tabStops
} StyleRule
(
artworkFigure) "applied to inserted artwork" {
center
0 pt topLeading
0 pt topIndent
0 pt bottomLeading
0 pt bottomIndent
} StyleRule
(
artworkCaption) "applied to inserted artwork captions" {
tight
look.b
look.o
} StyleRule
(
ascii) "for unformatted text" {
regular face
AsciiFont
BasicSize size
82 sp lineLength
8.5 in the lineLength .sub 0.5 .mul .dup leftMargin rightMargin
docStandard
AsciiFont
8 sp tabStops
IF nestingLevel 1 .eq .not THEN {CodeIndent bigger leftIndent} FI
} StyleRule
(
authors) "for authors on title page" {
block
BiggerSize
QuadBreak BasicSize MoreLead bottomLeadingGlue
AlternateFontFamily
(No) hyphenation
} StyleRule
(
block) "for block paragraphs, no initial indentation" {
docStandard
regular face
BreakSize MoreLead 0 topLeadingGlue
4 maxHorizontalExpansion
(English) hyphenation
justified lineFormatting
flushLeft lastLineFormatting
10 pageBreakPenalty
} StyleRule
(
block1) "for block paragraphs, with more top leading" {
block
BreakSize ExtraLead .add topLeading
} StyleRule
(
body) "for ordinary paragraphs with indentation" {
block
IF isComment THEN {} ELSE { ParaIndent firstIndent } FI
} StyleRule
(
body1) "for ordinary paragraphs with indentation with extra top leading" {
body
BreakSize ExtraLead .add topLeading
} StyleRule
(
boilerplate) "for title page Xerox logo and address" {
block
(No) hyphenation
HexBreak 0 0 topLeadingGlue
DoubleBreak 0 0 bottomLeadingGlue
58 pt tabStops
} ScreenRule
(
boilerplate) "for title page Xerox logo and address" {
pageBreak
58 pt tabStops
} PrintRule
(
cedarRoot) "cedar format for root nodes" {
% Defined for convenience of layering styles on this one
FontPrefix
DefaultNest
DefaultLineLength
docStandard
.5 in topMargin
.8 in headerMargin
.5 in footerMargin
.5 in bottomMargin
1.25 in leftMargin
1.25 in rightMargin
24 pt topIndent
24 pt topLeading
0 leftIndent
10 pt rightIndent
45 hyphenCode
(nil) textNamedColor
} StyleRule
(
center) "for centered paragraphs" {
block
(No) hyphenation
centered lineFormatting
centered lastLineFormatting
} StyleRule
(
chapter) "for chapter titles that begin a new page" {
head1
XLSize size
XLSize MoreLead .add leading
} ScreenRule
(
chapter) "for chapter titles that begin a new page" {
head1
XLSize size
XLSize MoreLead .add leading
11 in keep
1 fil keepStretch
1 fill 0 0 topLeadingGlue
} PrintRule
(
code) "for ordinary Cedar program statements" {
standard
CodeFont
IF isComment THEN {italic face} ELSE {regular face} FI
IF isComment THEN {6 pt restIndent} ELSE {CodeIndent 3 .mul restIndent} FI
IF nestingLevel 1 .eq THEN {} ELSE {CodeIndent bigger leftIndent} FI
} StyleRule
(
code1) "for ordinary Cedar program nodes" {
code
IF nestingLevel 1 .eq THEN {DoubleBreak BasicSize MoreLead topLeadingGlue} FI
} StyleRule
(
code2) "for ordinary Cedar program nodes" {
code
IF nestingLevel 3 .lt THEN {DoubleBreak BasicSize MoreLead topLeadingGlue} FI
} StyleRule
(
code3) "for ordinary Cedar program nodes" {
code
IF nestingLevel 4 .lt THEN {DoubleBreak BasicSize MoreLead topLeadingGlue} FI
} StyleRule
(
contents) "for section headings in tables of contents at any level" {
head
IF nestingLevel 1 .eq .not THEN {ParaIndent bigger leftIndent} FI
BreakSize leading
DoubleBreak BasicSize MoreLead topLeadingGlue
BreakSize BasicSize MoreLead bottomLeadingGlue
} StyleRule
(
continuation) "for continuation of broken paragraph" {
block
BasicLeading 0 0 topLeadingGlue
} StyleRule
(
copyrightNotice) "for copyright notices" {
default
} ScreenRule
(
copyrightNotice) "for copyright notices" {
standard
the size 1 .add topIndent
(xerox/xc1-1-1/) fontPrefix
(modern) family
IF nestingLevel 1 .eq .not THEN {CodeIndent bigger leftIndent} FI
} PrintRule
(
default) "style rule for nodes without explict formats" {
standard
CodeFont
IF isComment THEN {italic face} ELSE {regular face} FI
6 pt restIndent
IF nestingLevel 1 .eq .not THEN {CodeIndent bigger leftIndent} FI
the size 1 .add topIndent
4 sp tabStops
} StyleRule
(
display) "displayed equations, etc. embedded in text" {
block
(No) hyphenation
MoreLead bigger topLeading
MoreLead bigger bottomLeading
ParaIndent bigger leftIndent
} StyleRule
(
docStandard) "shared by various text formats" {
standard
FontFamily
Nest
} StyleRule
(
example) "default type for examples embedded in text" {
default
ParaIndent bigger leftIndent
} StyleRule
(
footnote) "for footnote appearance; also need an Insert property of foot
*" {
note
IF isPrint THEN {0 leftIndent} FI
} StyleRule
(
footSeparator) "for a horizontal rule; also need a Mark property of footSeparator" {
footnote
justified lastLineFormatting
all strikeout
1 fil maxHorizontalExpansion
} StyleRule
(
functiondoc) "procedure/syntax documentation header" {
standard
Nest
FontFamily
justified lastLineFormatting
1000 maxHorizontalExpansion
BasicSize bigger topLeading
BreakSize bottomLeading
1 in keep
} StyleRule
(
head) "for section headings at any level" {
IF nestingLevel 3 .gt
THEN {head4}
ELSE {{ head0 head1 head2 head3 } nestingLevel .aget .cvx .exec}
FI
} StyleRule
(
head0) "for zero-level headings (must be the root node)" {
root
} StyleRule
(
head1) "for chapter headings" {
docStandard
bold face
BiggerSize
LargeSize MoreLead .add leading
IF isComment
THEN {QuadBreak BasicSize MoreLead topLeadingGlue}
ELSE {HexBreak BasicSize MoreLead topLeadingGlue}
FI
DoubleBreak BasicSize MoreLead bottomLeadingGlue
the bottomLeading BasicSize 2 .mul .add keep
1 fil keepStretch
75 pageBreakAfterLastLinePenalty
} StyleRule
(
head2) "for major section headings" {
docStandard
bold face
BasicSize MoreLead .add leading
DoubleBreak BasicSize MoreLead topLeadingGlue
DoubleBreak BasicSize MoreLead bottomLeadingGlue
the bottomLeading BasicSize 2 .mul .add keep
50 pageBreakAfterLastLinePenalty
} StyleRule
(
head3) "for minor section headings" {
docStandard
italic face
BasicSize MoreLead .add leading
DoubleBreak BasicSize MoreLead topLeadingGlue
DoubleBreak BasicSize MoreLead bottomLeadingGlue
the bottomLeading BasicSize 2 .mul .add keep
25 pageBreakAfterLastLinePenalty
} StyleRule
(
head4) "for run-in section headings" {
block
DoubleBreak BasicSize MoreLead topLeadingGlue
the bottomLeading BasicSize .add keep
} StyleRule
(
head5) "for run-in section headings for compatibility sake" {
head4
} StyleRule
(
indent) "for indented paragraphs" {
block
BasicSize 3 .mul bigger leftIndent
} StyleRule
(
indent1) "for indented paragraphs with more top leading" {
indent
BreakSize ExtraLead .add topLeading
} StyleRule
(
item) "for lists of items." {
indent
BasicSize 3 .mul bigger restIndent
the restIndent tabStops
LooseLeading ExtraLead 0 topLeadingGlue
} StyleRule
(
item1) "for lists of items with more top leading" {
item
BreakSize ExtraLead .add topLeading
} StyleRule
(
lead1) "more lead, to space out or provide for larger type, superscripts, . . ." {
block
BreakSize ExtraLead .add topLeading
ExtraLead bigger leading
} StyleRule
(
lead2) "even more lead, . . ." {
block
BreakSize ExtraLead 2 .mul .add topLeading
ExtraLead 2 .mul bigger leading
} StyleRule
(
lead3) "still more lead, . . ." {
block
BreakSize ExtraLead 3 .mul .add topLeading
ExtraLead 3 .mul bigger leading
} StyleRule
(
letterHead1) "top node of a letter (
should be empty)" {
table2
} ScreenRule
(
letterHead1) "top node of a letter (
should be empty)" {
table2
60 pt .neg bottomLeading
} PrintRule
(
letterHead2) "letterhead address" {
table2
60 pt .neg topLeading
72 pt bottomLeading
} StyleRule
(
logo) "for Xerox logo" {
LogoFont
BasicSize 2.4 .mul size
the size topIndent
-0.75 in leftIndent
the size 2 .mul 20 pt 5 pt topLeadingGlue
the size 2 .mul 20 pt 5 pt bottomLeadingGlue
75 pageBreakAfterLastLinePenalty
} PrintRule
(
logo) "Xerox logo: screen" {
LogoFont
BasicSize 2.4 .mul size
36 bp topIndent
the size 2 .mul topLeading
the size 2 .mul bottomLeading
} ScreenRule
(
memoHead) "for the To, From, Subject nodes at front of memos" {
standard
(No) hyphenation
FontFamily
LooseLeading 2 .mul topLeading
16 pt topIndent
LooseLeading bottomLeading
20 sp tabStops
} StyleRule
(
note) "for fine points" {
quote
SmallerSize
BasicIncrement smaller topLeading
BasicIncrement smaller leading
} StyleRule
(
pageBreak) "to force a new page" {
standard
0 pt 1 filll 0 pt topLeadingGlue
1 fil 0 pt 0 pt bottomLeadingGlue
} PrintRule
(
pageBreak) "to force a new page" {
standard
} ScreenRule
(
pageNumber) "applied to the folio number when printing" {
unleaded
} StyleRule
(
quote) "for quotations and other displays" {
block
ParaIndent bigger leftIndent
} StyleRule
(
ragged) "ragged-right block" {
block
flushLeft lineFormatting
flushLeft lastLineFormatting
} StyleRule
(
raggedContinuation) "for continuation of broken ragged-right block" {
ragged
BasicLeading 0 0 topLeadingGlue
} StyleRule
(
raggedLeft) "ragged-left block" {
block
0 em firstIndent
flushRight lineFormatting
flushRight lastLineFormatting
} StyleRule
(
reference) "an item in a reference list" {
block
(No) hyphenation
4 sp restIndent
2 maxHorizontalExpansion
the restIndent tabStops
LooseLeading ExtraLead 0 topLeadingGlue
} StyleRule
(root) "format for root nodes" {cedarRoot} StyleRule
(
standard) "shared by various formats" {
regular face
caps+lowercase alphabets
BasicSize size
BasicLeading leading
BasicLeading MoreLead 0 topLeadingGlue
BasicLeading MoreLead 0 bottomLeadingGlue
flushLeft lineFormatting
flushLeft lastLineFormatting
0 em firstIndent
0 em restIndent
the size MoreLead .add topIndent
clearTabStops 15 sp tabStops
0 pt keep
0 pt keepStretch
1.5 maxVerticalExpansion
1 fil maxHorizontalExpansion
(No) hyphenation
0 pt backgroundAscent
0 pt backgroundDescent
0 pt outlineBoxThickness
none strikeout
none underlining
20 pageBreakAfterFirstLinePenalty
20 pageBreakBeforeLastLinePenalty
0 pageBreakPenalty
0 0 0 textColor
0 0 0 underlineColor
0 0 0 strikeoutColor
0 0 0 backgroundColor
0 0 0 outlineBoxColor
0 pt letterspacing
0 pt hShift
0 pt vShift
} StyleRule
(
subtitle) "for subtitle nodes" {
title
XLSize size
TripleBreak BasicSize MoreLead topLeadingGlue
QuadBreak BasicSize MoreLead bottomLeadingGlue
} StyleRule
(
table) "sets TABs for kludge tables" {
block
(No) hyphenation
flushLeft lineFormatting
flushLeft lastLineFormatting
15 pageBreakPenalty
40 sp tabStops
} StyleRule
(
table0) "for more columns" {
table
35 sp tabStops
} StyleRule
(
table1) "for more columns" {
table
30 sp tabStops
} StyleRule
(
table2) "for more columns" {
table
25 sp tabStops
} StyleRule
(
table3) "for more columns" {
table
20 sp tabStops
} StyleRule
(
tight) "for items with less leading" {
block
BasicSize ExtraLead 0 topLeadingGlue
BasicSize ExtraLead 0 bottomLeadingGlue
BasicSize leading
} StyleRule
(
title) "for chapter title nodes" {
head
TitleSize size
the size DoubleIncrement .add leading
QuadBreak DoubleBreak .add BasicSize MoreLead topLeadingGlue
QuadBreak BasicSize MoreLead bottomLeadingGlue
0 firstIndent
0 restIndent
flushLeft lineFormatting
flushLeft lastLineFormatting
AlternateFontFamily
200 pageBreakAfterLastLinePenalty
} StyleRule
(
unit) "for procedure and other major program nodes" {
code
BreakSize MoreLead 0 topLeadingGlue
} StyleRule
(
unleaded) "for running head/feet text" {
docStandard
BasicLeading 0 0 topLeadingGlue
BasicLeading 0 0 bottomLeadingGlue
0 pageBreakAfterFirstLinePenalty
0 pageBreakBeforeLastLinePenalty
0 pageBreakPenalty
BasicLeading topIndent
BasicLeading bottomIndent
} StyleRule
(
widowSaver) "for body paragraphs with the last line right-justified" {
body
justified lastLineFormatting
} StyleRule