General declarations
(
bp) "big point"
{72.0 .div in} StyleRule
(
sp) "width of spaces in screen font" {
screensp
} ScreenRule
(
sp) "width of spaces in printing font" {
printsp
} PrintRule
(
BasicSize) % normal type font size
{10 bp} .cvx .def
(
BasicIncrement) % normal type font size change
{2 bp} .cvx .def
(
ExtraLead) % normal between-lines leading
{2 bp} .cvx .def
(
CodeIndent) % normal amount to indent nested code nodes
{15 bp} .cvx .def
(CodeFont) "code font" { "Classic" family 10 bp size } StyleRule
(FontFamily) "main font" { "Classic" family 10 bp size } StyleRule
(BodyFontFamily) "screen font" { "Classic" family 12 bp size } ScreenRule
(BodyFontFamily) "print font" { "Classic" family 10 bp size } PrintRule
(AlternateFontFamily) "other font" { "Trojan-Printwheel" family 12 bp size } StyleRule
(FixedPitchFont) "fixed pitch font" { "Trojan-Printwheel" family 12 bp size } StyleRule
(
DoubleIncrement) % double type font size change
{BasicIncrement BasicIncrement .add} .cvx .def
(
ParaIndent) % normal indentation of paragraphs
{BasicSize BasicSize .add} .cvx .def
(
LargeSize) % large font size
{BasicSize BasicIncrement .add} .cvx .def
(
XLSize) % large font size
{BasicSize DoubleIncrement .add} .cvx .def
(
TitleSize) % largest font size
{XLSize DoubleIncrement .add} .cvx .def
(
BasicLeading) % normal type leading
{BasicSize ExtraLead .add} .cvx .def
(
LooseLeading) % normal type 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
(displayNesting) .true StyleParam
(
DoNest) % set it up so Nest does the nesting
{.true displayNesting} .cvx .def
(
DontNest) % set it up so Nest does nothing
{.false displayNesting} .cvx .def
(DefaultNest) "for screen" {DoNest} ScreenRule
(DefaultNest) "for print" {DontNest} PrintRule
(
Nest) "display nesting level" {
the displayNesting {
nestingLevel 1 .gt {BasicSize bigger leftIndent} .cvx .if
} {
} .ifelse .cvx .exec
} StyleRule
(DefaultLineLength) "for screen" {9 in lineLength} ScreenRule
(DefaultLineLength) "for print" {6 in lineLength} PrintRule
(
FontPrefix) "default font prefix for Xerox fonts" {
TiogaFonts
} ScreenRule
(
FontPrefix) "default font prefix for Xerox fonts" {
XCFonts
} PrintRule
(
TiogaFonts) "font prefix for Xerox screen fonts suitable for easy reading on display" {
"Xerox/TiogaFonts/" fontPrefix
} StyleRule
(
XCFonts) "font prefix for Xerox Interpress fonts suitable for look hardcopy" {
"Xerox/XC1-1-1/" fontPrefix
} StyleRule
Formats
(
abstract) "for abstract on title page" {
head4
AlternateFontFamily
15 sp tabStops
} StyleRule
(
artworkFigure) "applied to inserted artwork" {
center
} StyleRule
(
artworkCaption) "applied to inserted artwork captions" {
center
} StyleRule
(
authors) "for authors on title page" {
block
QuadBreak BasicSize MoreLead bottomLeadingGlue
AlternateFontFamily
(No) hyphenation
} StyleRule
(
block) "for block paragraphs, no initial indentation" {
docStandard
regular face
BreakSize MoreLead 0 topLeadingGlue
10 pageBreakPenalty
4 maxHorizontalExpansion
(English) hyphenation
justified lineFormatting
flushLeft lastLineFormatting
} StyleRule
(
block1) "for block paragraphs, with more top leading" {
block
BreakSize ExtraLead .add topLeading
} StyleRule
(
body) "for ordinary paragraphs with indentation" {
block
isComment .not { ParaIndent firstIndent } .cvx .if
} 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
} StyleRule
(
center) "for centered paragraphs" {
block
(No) hyphenation
centered lineFormatting
centered lastLineFormatting
} StyleRule
(
chapter) "for chapter titles that begin a new page" {
head1
XLSize MoreLead .add leading
} ScreenRule
(
chapter) "for chapter titles that begin a new page" {
head1
XLSize MoreLead .add leading
11 in keep
1 fil keepStretch
1 fill 0 0 topLeadingGlue
} PrintRule
(
code) "for ordinary Cedar program statements" {
standard
CodeFont
isComment {look.c}{} .ifelse .cvx .exec
isComment {6 pt restIndent}{CodeIndent 3 .mul restIndent} .ifelse .cvx .exec
nestingLevel 1 .eq .not {CodeIndent bigger leftIndent} .cvx .if
} StyleRule
(
code1) "for ordinary Cedar program nodes" {
code
nestingLevel 1 .eq {DoubleBreak BasicSize MoreLead topLeadingGlue} .cvx .if
} StyleRule
(
code2) "for ordinary Cedar program nodes" {
code
nestingLevel 3 .lt {DoubleBreak BasicSize MoreLead topLeadingGlue} .cvx .if
} StyleRule
(
code3) "for ordinary Cedar program nodes" {
code
nestingLevel 4 .lt {DoubleBreak BasicSize MoreLead topLeadingGlue} .cvx .if
} StyleRule
(
contents) "for section headings in tables of contents at any level" {
head
nestingLevel 1 .eq .not {ParaIndent bigger leftIndent} .cvx .if
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
nestingLevel 1 .eq .not {CodeIndent bigger leftIndent} .cvx .if
} PrintRule
(
default) "style rule for nodes without explict formats" {
standard
CodeFont
isComment {look.c}{} .ifelse .cvx .exec
6 pt restIndent
nestingLevel 1 .eq .not {CodeIndent bigger leftIndent} .cvx .if
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
(
head) "for section headings at any level" {
nestingLevel 3 .gt {head4} % do head4 if nestingLevel is greater than 3
{{ head0 head1 head2 head3 } nestingLevel .aget .cvx .exec} .ifelse .cvx .exec
} StyleRule
(
head0) "for zero-level headings (must be the root node)" {
root
} StyleRule
(
head1) "for chapter headings" {
docStandard
look.b
LargeSize MoreLead .add leading
isComment {
QuadBreak BasicSize MoreLead topLeadingGlue
} {
HexBreak BasicSize MoreLead topLeadingGlue
} .ifelse .cvx .exec
DoubleBreak BasicSize MoreLead bottomLeadingGlue
75 pageBreakAfterLastLinePenalty
the bottomLeading keep
BasicSize bigger keep
BasicSize bigger keep
1 fil keepStretch
} StyleRule
(
head2) "for major section headings" {
docStandard
look.b
BasicSize MoreLead .add leading
DoubleBreak BasicSize MoreLead topLeadingGlue
DoubleBreak BasicSize MoreLead bottomLeadingGlue
50 pageBreakAfterLastLinePenalty
the bottomLeading keep
BasicSize bigger keep
BasicSize bigger keep
} StyleRule
(
head3) "for minor section headings" {
docStandard
look.i
BasicSize MoreLead .add leading
DoubleBreak BasicSize MoreLead topLeadingGlue
DoubleBreak BasicSize MoreLead bottomLeadingGlue
25 pageBreakAfterLastLinePenalty
the bottomLeading keep
BasicSize bigger keep
BasicSize bigger keep
} StyleRule
(
head4) "for run-in section headings" {
block
DoubleBreak BasicSize MoreLead topLeadingGlue
the bottomLeading keep
BasicSize bigger 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
24 bp topIndent
-0.75 in leftIndent
48 pt 20 pt 5 pt topLeadingGlue
48 pt 20 pt 5 pt bottomLeadingGlue
75 pageBreakAfterLastLinePenalty
} PrintRule
(
logo) "Xerox logo: screen" {
LogoFont
36 bp topIndent
48 pt topLeading
48 pt 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
BasicIncrement smaller topLeading
BasicIncrement smaller leading
} StyleRule
(
pageBreak) "to force a new page" {
standard
0 pt 1 fill .dup .mul 0 pt topLeadingGlue
1 fill .dup .mul 0 pt 0 pt bottomLeadingGlue
} PrintRule
(
pageBreak) "to force a new page" {
standard
} ScreenRule
(
pageNumber) "applied to the folio number when printing" {
unleaded
} ScreenRule
(
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
(
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
none strikeout
none underlining
FontFamily
BasicLeading leading
BasicLeading MoreLead 0 topLeadingGlue
BasicLeading MoreLead 0 bottomLeadingGlue
20 pageBreakAfterFirstLinePenalty
20 pageBreakBeforeLastLinePenalty
0 pageBreakPenalty
flushLeft lineFormatting
flushLeft lastLineFormatting
0 em firstIndent
0 em restIndent
the size MoreLead .add topIndent
15 sp tabStops
0 pt keep
0 pt keepStretch
1.5 maxVerticalExpansion
1 fil maxHorizontalExpansion
(No) hyphenation
} StyleRule
(
subtitle) "for subtitle nodes" {
title
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
the size DoubleIncrement .add leading
QuadBreak DoubleBreak .add BasicSize MoreLead topLeadingGlue
QuadBreak BasicSize MoreLead bottomLeadingGlue
200 pageBreakAfterLastLinePenalty
0 firstIndent
0 restIndent
flushLeft lineFormatting
flushLeft lastLineFormatting
AlternateFontFamily
} 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