StartTheWorks:
PUBLIC
PROC ~ {
frame: Frame ← defaultFrame ← TJaM.NewFrame[];
Some JaM commands needed to run the style machinery
get ← GetCommand[frame, TJaM.AtomFromRope[".get"]];
run ← GetCommand[frame, TJaM.AtomFromRope[".run"]];
load ← GetCommand[frame, TJaM.AtomFromRope[".load"]];
Remember the system dictionary, since the style machinery manipulates the dictionary stack
TJaM.Execute[frame, TJaM.AtomFromRope[".sysdict"]];
sysdict ← TypeCheckDict[TJaM.Pop[frame]];
Check if we have run the start jam code: (start.jam) .run
This provides a user dictionary into which start.jam loads util.jam and errordefs.jam
IF
NOT RunFile[frame, $user ,"start.jam"]
THEN
TJaM.Execute[frame, TJaM.AtomFromRope[".start"]];
Remember the user dictionary pointer
userdict ← TJaM.DictTop[frame];
Create the dicitionary of Tioga style names
styledict ← InitDict[$TiogaStylesDictionary];
TJaM.AttachDict[styledict, userdict];
Replace userdict by styledict for rest of startup
TJaM.End[frame];
TJaM.Begin[frame, styledict];
Create and register dictionaries for style rules, name bindings, and attached styles
stylesDicts[base] ← InitDict[$TiogaBaseStylesDictionary];
stylesDicts[print] ← InitDict[$TiogaPrintStylesDictionary];
stylesDicts[screen] ← InitDict[$TiogaScreenStylesDictionary];
bindingDict ← InitDict[$TiogaBindingDictionary, 200];
attachmentsDict ← InitDict[$TiogaAttachedStylesDictionary];
Check if have run the Tioga utility jam code: (TiogaUtils.jam) .run
[] ← RunFile[frame, $StyleError, "TiogaUtils.jam"];
Register various style and JaM commands implemented elsewhere
RegisterWorks1[frame];
RegisterWorks2[frame];
RegisterWorks3[frame];
RegisterWorks4[frame];
TJaM.Register[frame, $GetFreeVarOp, NodeStyleObsolete.GetFreeVarOp];
TJaM.Register[frame, $GetFreeVarObjOp, NodeStyleObsolete.GetFreeVarObjOp];
Register various literals used by the style machinery as keywords
numeric style attributes
RegisterStyleLiteral[frame, $the];
RegisterStyleLiteral[frame, $smaller];
RegisterStyleLiteral[frame, $bigger];
RegisterStyleLiteral[frame, $percent];
font attributes
RegisterStyleLiteral[frame, $regular];
RegisterStyleLiteral[frame, $bold];
RegisterStyleLiteral[frame, $italic];
RegisterStyleLiteral[frame, TJaM.AtomFromRope["bold+italic"]];
RegisterStyleLiteral[frame, TJaM.AtomFromRope["+bold"]];
RegisterStyleLiteral[frame, TJaM.AtomFromRope["+italic"]];
RegisterStyleLiteral[frame, TJaM.AtomFromRope["-bold"]];
RegisterStyleLiteral[frame, TJaM.AtomFromRope["-italic"]];
font alphabets
RegisterStyleLiteral[frame, TJaM.AtomFromRope["caps+lowercase"]];
RegisterStyleLiteral[frame, TJaM.AtomFromRope["caps+smallcaps"]];
RegisterStyleLiteral[frame, $lowercase];
RegisterStyleLiteral[frame, $caps];
underlining and strikeout
RegisterStyleLiteral[frame, $all];
RegisterStyleLiteral[frame, $visible];
RegisterStyleLiteral[frame, TJaM.AtomFromRope["letters+digits"]];
RegisterStyleLiteral[frame, $none];
line formatting
RegisterStyleLiteral[frame, $justified];
RegisterStyleLiteral[frame, $flush];
RegisterStyleLiteral[frame, $flushLeft];
RegisterStyleLiteral[frame, $flushRight];
RegisterStyleLiteral[frame, $centered];
graphical paths
RegisterStyleLiteral[frame, $filled];
RegisterStyleLiteral[frame, $outlined];
RegisterStyleLiteral[frame, $filled];
RegisterStyleLiteral[frame, TJaM.AtomFromRope["filled+outlined"]];
tab stop positioning
RegisterStyleLiteral[frame, $fixed];
RegisterStyleLiteral[frame, $relative];
tab stop attributes
RegisterStyleLiteral[frame, $looks];
RegisterStyleLiteral[frame, $breakIfPast];
RegisterStyleLiteral[frame, $spaceIfPast];
RegisterStyleLiteral[frame, $blank];
RegisterStyleLiteral[frame, $leaders];
RegisterStyleLiteral[frame, $rule];
RegisterStyleLiteral[frame, $rules];
RegisterStyleLiteral[frame, $aligned];
RegisterStyleLiteral[frame, $congruent];
Initialize the small cache of frames by allocating and freeing some
{
frame: ARRAY [0..4) OF Frame;
FOR i: NAT IN [0..4) DO frame[i] ← GetFrame[NIL, NIL, screen] ENDLOOP;
FOR i: NAT IN [0..4) DO FreeFrame[frame[i], NIL, screen] ENDLOOP;
};
Initialize the default style
NodeStyleOps.InitializeDefaultStyle["Cedar"];
[] ← NodeStyleOps.LoadStyle[NodeStyleOps.defaultStyleName];
};