% Cedar.Style
% last written by Paxton, February 24, 1983 12:44 pm
% last modified by Beach, June 7, 1983 8:04 pm
% last modified by Wyatt, September 29, 1983 6:04 pm
BeginStyle
(BasicPrint) AttachStyle
% General declarations
(bp) "big point"
{72.0 .div in} StyleRule
(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
(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} .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
(Nest) "display nesting level" { BasicSize bigger leftIndent } 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" {
% the following assumes that default gives comments +italic face
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) "unassigned as yet" {
} StyleRule
(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
} 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
(body) "for ordinary paragraphs with indentation" {
block
isComment .not { ParaIndent firstIndent } .cvx .if
} StyleRule
(boilerplate) "for title page Xerox logo and address" {
block
DoubleBreak 0 0 topLeadingGlue
DoubleBreak 0 0 bottomLeadingGlue
} ScreenRule
(boilerplate) "for title page Xerox logo and address" {
block
0 pt 1 fill 0 pt topLeadingGlue
1 fill 0 pt 0 pt bottomLeadingGlue
} PrintRule
(center) "for centered paragraphs" {
block
centered lineFormatting
} StyleRule
(code) "for ordinary Cedar program statements" {
standard
"Tioga" family 10 bp size
nestingLevel 1 .eq .not {CodeIndent bigger leftIndent} .cvx .if
CodeIndent 3 .mul restIndent
} 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) "almost the same as code, except makes comment nodes italic" {
code
isComment {italic face}{regular face} .ifelse .cvx .exec
6 pt restIndent
the size 1 .add topIndent
4 sp tabStops
} StyleRule
(display) "displayed equations, etc. embedded in text" {
block
BreakSize MoreLead 0 bottomLeadingGlue
ParaIndent bigger leftIndent
} StyleRule
(docStandard) "shared by various text formats" {
standard
FontFamily
Nest
} StyleRule
(example) "default type for examples embedded in text" {
code
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
} ScreenRule
(head1) "for chapter headings" {
docStandard
bold face
LargeSize size
LargeSize MoreLead .add leading
isComment {
QuadBreak BasicSize MoreLead topLeadingGlue
} {
1 fill 0 0 topLeadingGlue
} .ifelse .cvx .exec
DoubleBreak BasicSize MoreLead bottomLeadingGlue
75 pageBreakAfterLastLinePenalty
} PrintRule
(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 bigger leftIndent
} StyleRule
(item) "for definitions, etc." {
indent
BasicSize 3 .mul restIndent
LooseLeading ExtraLead 0 topLeadingGlue
} StyleRule
(lead1) "more lead, to space out or provide for larger type, superscripts, . . ." {
block
BreakSize ExtraLead .add MoreLead 0 topLeadingGlue
ExtraLead bigger leading
} StyleRule
(lead2) "even more lead, . . ." {
block
BreakSize ExtraLead 2 .mul .add MoreLead 0 topLeadingGlue
ExtraLead 2 .mul bigger leading
} StyleRule
(lead3) "still more lead, . . ." {
block
BreakSize ExtraLead 3 .mul .add MoreLead 0 topLeadingGlue
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 20 5 topLeadingGlue
72 20 5 bottomLeadingGlue
75 pageBreakAfterLastLinePenalty
} PrintRule
(logo) "Xerox logo: screen" {
"Logo" family
24 pt size
36 bp topIndent
48 pt topLeading
72 pt bottomLeading
} ScreenRule
(memoHead) "for the To, From, Subject nodes at front of memos" {
standard
regular face
BodyFontFamily
0 firstIndent
0 restIndent
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 0 pt topLeadingGlue
1 fill 0 pt 0 pt bottomLeadingGlue
} PrintRule
(pageBreak) "to force a new page" {
standard
} ScreenRule
(quote) "for quotations and other displays" {
block
2 em bigger leftIndent
} StyleRule
(reference) "an item in a reference list" {
block
4 sp tabStops
20 pt restIndent
LooseLeading ExtraLead 0 topLeadingGlue
} StyleRule
(root) "default type for root nodes" {
docStandard
.5 in topMargin
.8 in headerMargin
.5 in footerMargin
.5 in bottomMargin
1 in leftMargin
1 in rightMargin
24 pt topIndent
24 pt topLeading
0 leftIndent
10 pt rightIndent
} 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
(title) "for chapter title nodes" {
head
TitleSize size
QuadBreak 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
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.