Cedar.Style
Copyright Ó 1984, 1985 by Xerox Corporation. All rights reserved.
Beach, January 23, 1985 9:40:17 pm PST
Russ Atkinson (RRA) January 8, 1985 10:18:06 am PST
Rick Beach, February 24, 1986 9:21:45 am PST
Michael Plass, April 11, 1986 11:39:55 am PST
BeginStyle
TSetter Compatibility
(BasicPrint) AttachStyle
StyleParam declarations
These are redundant with those in NodeStyleWorks4Impl, and may be removed after the next bounce. They are harmless here, however, until these become full-fledged style parameters.
(keep) 0 pt StyleParam
(keepStretch) 1 fil StyleParam
(maxHorizontalExpansion) 1 fil StyleParam
(maxVerticalExpansion) 3 StyleParam
(hyphenation) (No) StyleParam
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" { "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
(FixedPitchFont) "fixed pitch font" { "Gacha" family } StyleRule
(GreekFont) "Greek font" { "Hippo" family } StyleRule
(LogoFont) "Xerox logo font" { "Logo" 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
(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" {
PressFonts
} PrintRule
(TiogaFonts) "font prefix for Xerox screen fonts suitable for easy reading on display" {
"Xerox/TiogaFonts/" fontPrefix
} StyleRule
(PressFonts) "font prefix for Xerox Press fonts suitable for look hardcopy" {
"Xerox/PressFonts/" fontPrefix
} StyleRule
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" {
FixedPitchFont} StyleRule
(look.g) "Greek" {
GreekFont } StyleRule
(look.h) "hidden by asterisks" {
"Asterisk" family regular face 10 bp size } ScreenRule
(look.h) "hidden by asterisks" {
CodeFont regular face } 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" {
LogoFont 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" {
CodeFont} 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
15 sp tabStops
} StyleRule
(authors) "for authors on title page" {
block
BasicIncrement bigger size
QuadBreak BasicSize MoreLead bottomLeadingGlue
AlternateFontFamily
(No) hyphenation
} StyleRule
(block) "for block paragraphs, no initial indentation" {
docStandard
regular face
BreakSize MoreLead 0 topLeadingGlue
10 pageBreakPenalty
3 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 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
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" {
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
nestingLevel 1 .eq .not {CodeIndent bigger leftIndent} .cvx .if
} PrintRule
(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
(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
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
144 pt keep
} StyleRule
(head2) "for major section headings" {
docStandard
bold face
BasicSize MoreLead .add leading
DoubleBreak BasicSize MoreLead topLeadingGlue
DoubleBreak BasicSize MoreLead bottomLeadingGlue
50 pageBreakAfterLastLinePenalty
108 pt keep
} StyleRule
(head3) "for minor section headings" {
docStandard
italic face
BasicSize MoreLead .add leading
DoubleBreak BasicSize MoreLead topLeadingGlue
DoubleBreak BasicSize MoreLead bottomLeadingGlue
25 pageBreakAfterLastLinePenalty
72 pt keep
} StyleRule
(head4) "for run-in section headings" {
block
DoubleBreak BasicSize MoreLead topLeadingGlue
54 pt 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 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" {
LogoFont
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
(No) hyphenation
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
(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
BasicSize size
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
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
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
EndStyle
Change Log:
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.
Russ Atkinson (RRA) January 8, 1985 10:13:48 am PST
default leftMargin ← 1.25; lineLength ← 6.0; Cedar.style now has Cedar style
Rick Beach, June 20, 1985 2:47:25 pm PDT
make tables ragged right
Michael Plass, February 27, 1986 1:40:39 pm PST
Add nesting control (DoNest, DontNest), with compatible defaults
Add print/style distinction for lineLength
Add cedarRoot
Michael Plass, April 1, 1986
Add keep parameter to standard, heads, and chapter.
Add max expansions, hyphenation
Michael Plass, April 11, 1986
Added copyrightNotice format.