% BeachCedar.Style
% last written by Paxton, February 24, 1983 12:44 pm
% last modified by Beach, June 7, 1983 8:04 pm
% last modified by Beach, May 15, 1984 10:38:40 am PDT
% last modified by Beach, December 26, 1984 11:26:42 pm PST; fix to use StyleParams rather than JaM variables
BeginStyle
(BeachBasicPrint) AttachStyle
% General declarations
(bp) "big point"
{72.0 .div in} StyleRule
(BasicSize) "normal type font size" {
10 bp } StyleRule
(BasicIncrement) "normal type font size change" {
2 bp } StyleRule
(ExtraLead) "normal between-lines leading" {
2 bp } StyleRule
(ParaLead) "normal between-lines leading" {
6 bp } StyleRule
(CodeIndent) "normal amount to indent nested code nodes" {
15 bp } StyleRule
(CodeFont) "code font" { "Tioga" family 10 bp size } StyleRule
(FontFamily) "main font" { "TimesRoman" family } StyleRule
(BodyFontFamily) "screen font" { "Tioga" family } ScreenRule
(BodyFontFamily) "print font" { "TimesRoman" family } PrintRule
(AlternateFontFamily) "other font" { "Helvetica" family } StyleRule
(DoubleIncrement) "double type font size change" {
BasicIncrement BasicIncrement .add } StyleRule
(ParaIndent) "normal indentation of paragraphs" {
BasicSize BasicSize .add } StyleRule
(LargeSize) "large font size" {
BasicSize BasicIncrement .add } StyleRule
(XLSize) "large font size" {
BasicSize DoubleIncrement .add } StyleRule
(TitleSize) "largest font size" {
XLSize DoubleIncrement .add } StyleRule
(BasicLeading) "normal type leading" {
BasicSize ExtraLead .add } StyleRule
(LooseLeading) "normal type leading" {
BasicLeading ExtraLead .add } StyleRule
(MoreLead) "double inter-paragraph spacing" {
ExtraLead 3 .mul } StyleRule
(BreakSize) "normal inter-paragraph spacing" {
BasicLeading MoreLead .add } StyleRule
(BreakPlus) "extra inter-paragraph spacing" {
BreakSize ExtraLead .add } StyleRule
(DoubleBreak) "twice inter-paragraph spacing" {
BreakSize MoreLead .add } StyleRule
(TripleBreak) "triple inter-paragraph spacing" {
DoubleBreak MoreLead .add } StyleRule
(QuadBreak) "quadruple inter-paragraph spacing" {
TripleBreak MoreLead .add } StyleRule
(QuintBreak) "quintuple inter-paragraph spacing" {
QuadBreak MoreLead .add } StyleRule
(HexBreak) "hextuple inter-paragraph spacing" {
QuintBreak MoreLead .add } StyleRule
(Nest) "display nesting level" {
nestingLevel 1 .gt {ParaIndent bigger leftIndent} .cvx .if
} ScreenRule
(Nest) "display nesting level" { } PrintRule
% Looks
(look.a) "annotation font" {
+bold face BasicSize size FontFamily} StyleRule
(look.b) "bold font" {
+bold face} StyleRule
(look.c) "Cedar comments" {
+italic face} StyleRule
(look.d) "down for subscript" {
BasicIncrement .neg vShift
BasicIncrement smaller size} StyleRule
(look.e) "emphasis" {
isComment {-italic face}{+italic face} .ifelse .cvx .exec
} StyleRule
(look.f) "fixed-pitch font" {
"Gacha" family} StyleRule
(look.g) "Greek" {
"Hippo" family} StyleRule
(look.h) "hidden by asterisks" {
"Asterisk" family regular face 10 bp size} ScreenRule
(look.h) "hidden by asterisks" {
"Tioga" family regular face 10 bp size} PrintRule
(look.i) "italic" {
+italic face} StyleRule
(look.j) "unassigned as yet" {
} StyleRule
(look.k) "Cedar keywords" {
BasicIncrement smaller size
FontFamily} StyleRule
(look.l) "larger font" {
BasicIncrement bigger size} StyleRule
(look.m) "Math font" {
"Math" family} StyleRule
(look.n) "Cedar procedure names" {
+bold face} StyleRule
(look.o) "other font" {
AlternateFontFamily} StyleRule
(look.p) "plain font -- override node format" {
BasicSize size FontFamily} StyleRule
(look.q) "quaint Xerox logo font" {
"Logo" family 24 pt size 4 pt bigger topLeading} StyleRule
(look.r) "regular face -- override node format" {
regular face} StyleRule
(look.s) "smaller font" {
BasicIncrement smaller size} StyleRule
(look.t) "Tioga font" {
10 bp size "Tioga" family} StyleRule
(look.u) "up, for superscript" {
DoubleIncrement vShift
BasicIncrement smaller size} StyleRule
(look.v) "unassigned as yet" {
} StyleRule
(look.w) "what to do, a note to yourself look" {
"CREAM" family 10 bp size bold face } ScreenRule
(look.w) "what to do, a note to yourself look" {
"CREAM10" family 10 bp size bold face } PrintRule
(look.x) "extra large" {
DoubleIncrement bigger size} StyleRule
(look.y) "y -- arbitrary for strikeout" {
all strikeout } StyleRule
(look.z) "z -- arbitrary for underlined" {
all underlining } StyleRule
% Formats
(abstract) "for abstract on title page" {
head4
AlternateFontFamily
15 sp tabStops
} StyleRule
(authors) "for authors on title page" {
block
BasicIncrement bigger size
QuadBreak BasicSize MoreLead bottomLeadingGlue
AlternateFontFamily
} StyleRule
(block) "for block paragraphs, no initial indentation" {
docStandard
regular face
BreakSize MoreLead 0 topLeadingGlue
10 pageBreakPenalty
justified lineFormatting
} StyleRule
(block1) "for block paragraphs, with more top leading" {
block
BreakPlus 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
BreakPlus topLeading
} StyleRule
(boilerplate) "for title page Xerox logo and address" {
block
DoubleBreak 0 0 topLeadingGlue
DoubleBreak 0 0 bottomLeadingGlue
58 pt tabStops
} ScreenRule
(boilerplate) "for title page Xerox logo and address" {
block
0 pt 1 fill 0 pt topLeadingGlue
1 fill 0 pt 0 pt bottomLeadingGlue
58 pt tabStops
} PrintRule
(center) "for centered paragraphs" {
block
centered lineFormatting
} 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
1 fill 0 0 topLeadingGlue
} PrintRule
(code) "for ordinary Cedar program statements" {
standard
CodeFont
isComment {italic face}{regular face} .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" {
docStandard
regular face
20 pageBreakPenalty
justified lineFormatting
} StyleRule
(default) "style rule for nodes without explict formats" {
standard
CodeFont
isComment {italic face}{regular face} .ifelse .cvx .exec
6 pt restIndent
nestingLevel 1 .eq .not {CodeIndent bigger leftIndent} .cvx .if
the size 1 .add topIndent
4 sp tabStops
} StyleRule
(display) "displayed equations, etc. embedded in text" {
block
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 (unlikely, since Tioga nodes begin at 1)" {
title
} StyleRule
(head1) "for chapter headings" {
docStandard
bold face
LargeSize size
LargeSize MoreLead .add leading
isComment {
QuadBreak BasicSize MoreLead topLeadingGlue
} {
HexBreak BasicSize MoreLead topLeadingGlue
} .ifelse .cvx .exec
DoubleBreak BasicSize MoreLead bottomLeadingGlue
75 pageBreakAfterLastLinePenalty
} StyleRule
(head2) "for major section headings" {
docStandard
bold face
BasicSize MoreLead .add leading
DoubleBreak BasicSize MoreLead topLeadingGlue
DoubleBreak BasicSize MoreLead bottomLeadingGlue
50 pageBreakAfterLastLinePenalty
} StyleRule
(head3) "for minor section headings" {
docStandard
italic face
BasicSize MoreLead .add leading
DoubleBreak BasicSize MoreLead topLeadingGlue
DoubleBreak BasicSize MoreLead bottomLeadingGlue
25 pageBreakAfterLastLinePenalty
} StyleRule
(head4) "for run-in section headings" {
block
DoubleBreak BasicSize MoreLead topLeadingGlue
} StyleRule
(head5) "for run-in section headings for compatibility sake" {
head4
} StyleRule
(indent) "for indented paragraphs" {
block
ParaIndent 3 .mul bigger leftIndent
} StyleRule
(indent1) "for indented paragraphs with more top leading" {
indent
BreakPlus topLeading
} StyleRule
(item) "for lists of items." {
indent
ParaIndent 3 .mul bigger restIndent
the restIndent tabStops
LooseLeading ExtraLead 0 topLeadingGlue
} StyleRule
(item1) "for lists of items with more top leading" {
item
BreakPlus topLeading
} StyleRule
(lead1) "more lead, to space out or provide for larger type, superscripts, . . ." {
block
BreakPlus 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" {
"Logo" family
24 pt size
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" {
"Logo" family
24 pt size
36 bp topIndent
48 pt topLeading
48 pt bottomLeading
} ScreenRule
(memoHead) "for the To, From, Subject nodes at front of memos" {
standard
FontFamily
LooseLeading 2 .mul topLeading
16 pt topIndent
LooseLeading bottomLeading
20 sp tabStops
} StyleRule
(note) "for fine points" {
quote
BasicIncrement smaller size
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
(pageLayout) "page dimensions for the screen page" {
0 leftIndent
10 pt rightIndent
} ScreenRule
(pageLayout) "page dimensions for the printed page" {
.5 in topMargin
.8 in headerMargin
.5 in footerMargin
.5 in bottomMargin
1.5 in leftMargin
1.25 in rightMargin
5.25 in lineLength
24 pt topIndent
24 pt topLeading
0 leftIndent
0 pt rightIndent
} StyleRule
(quote) "for quotations and other displays" {
block
ParaIndent bigger leftIndent
} StyleRule
(ragged) "ragged-right block" {
block
flushLeft lineFormatting
} StyleRule
(reference) "an item in a reference list" {
block
4 sp restIndent
the restIndent tabStops
LooseLeading ExtraLead 0 topLeadingGlue
} StyleRule
(root) "format for root nodes" {
docStandard
pageLayout
} StyleRule
(standard) "shared by various formats" {
regular face
caps+lowercase alphabets
BasicSize size
BasicLeading leading
BasicLeading MoreLead 0 topLeadingGlue
BasicLeading MoreLead 0 bottomLeadingGlue
20 pageBreakAfterFirstLinePenalty
20 pageBreakBeforeLastLinePenalty
0 pageBreakPenalty
flushLeft lineFormatting
0 em firstIndent
0 em restIndent
the size MoreLead .add topIndent
15 sp tabStops
} StyleRule
(subtitle) "for subtitle nodes" {
title
XLSize size
TripleBreak BasicSize MoreLead topLeadingGlue
QuadBreak BasicSize MoreLead bottomLeadingGlue
} StyleRule
(table) "sets TABs for kludge tables" {
block
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
200 pageBreakAfterLastLinePenalty
0 firstIndent
0 restIndent
flushLeft lineFormatting
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
EndStyle
% Changes by Beach, May 20, 1983 2:07 pm
% Add new StyleRules: abstract - for BlueAndWhite abstracts, authors - for BlueAndWhite authors, block - to differentiate between block-style paragraphs and indent-first-line paragraphs
% Modify StyleRules: body - an indent-first-line paragraph, * - modify StyleRules which depend on block vs body, reference - make hanging indent work correctly with tab, root - establish page margins for header/footers
% Modify Cedar.Style parameters to be executable rather than local variables. This permits styles to redefine them and have the effects percolate all affected StyleRules.