StartImpl2:
PUBLIC
PROCEDURE =
TRUSTED BEGIN
frame: Frame;
PointsPerInch: REAL = 1.0/0.0138370;
frame ← JaMOps.defaultFrame;
defaultStyle.name[style] ← defaultStyleName;
defaultStyle.name[fontFamily] ← MakeName["Helvetica"];
SetReal[defaultStyle,fontSize,10];
SetReal[defaultStyle,leading,12];
SetReal[defaultStyle,tabStops,4];
SetReal[defaultStyle,pageWidth,8.5*PointsPerInch];
SetReal[defaultStyle,pageLength,11*PointsPerInch];
SetReal[defaultStyle,leftMargin,1*PointsPerInch];
SetReal[defaultStyle,rightMargin,1*PointsPerInch];
SetReal[defaultStyle,topMargin,1*PointsPerInch];
SetReal[defaultStyle,bottomMargin,1*PointsPerInch];
SetReal[defaultStyle,lineLength,6.5*PointsPerInch];
specialOp ← DefineSpecialOp[frame,"SpecialOp",SpecialOp];
getFreeVarOp ← DefineSpecialOp[frame,"GetFreeVarOp",GetFreeVarOp];
getFreeVarObjOp ← DefineSpecialOp[frame,"GetFreeVarObjOp",GetFreeVarObjOp];
JaMOps.RegisterExplicit[frame,"StyleParam",StyleParam];
JaMOps.RegisterExplicit[frame,"isComment",IsComment];
JaMOps.RegisterExplicit[frame,"isPrint",IsPrint];
JaMOps.RegisterExplicit[frame,"nestingLevel",NestingLevel];
the ← StyleLiteral[frame,"the"];
smaller ← StyleLiteral[frame,"smaller"];
bigger ← StyleLiteral[frame,"bigger"];
percent ← StyleLiteral[frame,"percent"];
regular ← StyleLiteral[frame,"regular"];
bold ← StyleLiteral[frame,"bold"];
italic ← StyleLiteral[frame,"italic"];
bolditalic ← StyleLiteral[frame,"bold+italic"];
plusbold ← StyleLiteral[frame,"+bold"];
plusitalic ← StyleLiteral[frame,"+italic"];
minusbold ← StyleLiteral[frame,"-bold"];
minusitalic ← StyleLiteral[frame,"-italic"];
capsAndLower ← StyleLiteral[frame,"caps+lowercase"];
capsAndSmallCaps ← StyleLiteral[frame,"caps+smallcaps"];
lowerOnly ← StyleLiteral[frame,"lowercase"];
capsOnly ← StyleLiteral[frame,"caps"];
all ← StyleLiteral[frame,"all"];
visible ← StyleLiteral[frame,"visible"];
lettersAndDigits ← StyleLiteral[frame,"letters+digits"];
none ← StyleLiteral[frame,"none"];
justified ← StyleLiteral[frame,"justified"];
flush ← StyleLiteral[frame,"flush"];
flushLeft ← StyleLiteral[frame,"flushLeft"];
flushRight ← StyleLiteral[frame,"flushRight"];
filled ← StyleLiteral[frame,"filled"];
outlined ← StyleLiteral[frame,"outlined"];
filled ← StyleLiteral[frame,"filled"];
filledAndOutlined ← StyleLiteral[frame,"filled+outlined"];
centered ← StyleLiteral[frame,"centered"];
fixed ← StyleLiteral[frame,"fixed"];
relative ← StyleLiteral[frame,"relative"];
looks ← StyleLiteral[frame,"looks"];
breakIfPast ← StyleLiteral[frame,"breakIfPast"];
spaceIfPast ← StyleLiteral[frame,"spaceIfPast"];
blank ← StyleLiteral[frame,"blank"];
leaders ← StyleLiteral[frame,"leaders"];
rule ← StyleLiteral[frame,"rule"];
rules ← StyleLiteral[frame,"rules"];
aligned ← StyleLiteral[frame,"aligned"];
congruent ← StyleLiteral[frame,"congruent"];
-- initialize the params
fontFaceOps ← TextNode.pZone.
NEW [OpsRec ← [FontFaceLoad, StoreError,
AddRealError, PercentError, FontFaceSetName]];
fontFaceParam ← TextNode.pZone.
NEW[misc ParamRec ← [fontFaceOps,
StyleCommand[frame,"face",FontFaceOp], misc[]]];
fontAlphabetsOps ← TextNode.pZone.
NEW [OpsRec ← [FontAlphabetsLoad, StoreError,
AddRealError, PercentError, FontAlphabetsSetName]];
fontAlphabetsParam ← TextNode.pZone.
NEW[misc ParamRec ← [fontAlphabetsOps,
StyleCommand[frame,"alphabets",FontAlphabetsOp], misc[]]];
underliningOps ← TextNode.pZone.
NEW [OpsRec ← [UnderliningLoad, StoreError,
AddRealError, PercentError, UnderliningSetName]];
underliningParam ← TextNode.pZone.
NEW [misc ParamRec ← [underliningOps,
StyleCommand[frame,"underlining",UnderliningOp], misc[]]];
strikeoutOps ← TextNode.pZone.
NEW [OpsRec ← [StrikeoutLoad, StoreError,
AddRealError, PercentError, StrikeoutSetName]];
strikeoutParam ← TextNode.pZone.
NEW [misc ParamRec ← [strikeoutOps,
StyleCommand[frame,"strikeout",StrikeoutOp], misc[]]];
lineFormattingOps ← TextNode.pZone.
NEW [OpsRec ← [LineFormattingLoad, StoreError,
AddRealError, PercentError, LineFormattingSetName]];
lineFormattingParam ← TextNode.pZone.
NEW [misc ParamRec ← [lineFormattingOps,
StyleCommand[frame,"lineFormatting",LineFormattingOp], misc[]]];
pathTypeOps ← TextNode.pZone.
NEW [OpsRec ← [PathTypeLoad, StoreError,
AddRealError, PercentError, PathTypeSetName]];
pathTypeParam ← TextNode.pZone.
NEW [misc ParamRec ← [pathTypeOps,
StyleCommand[frame,"pathType",PathTypeOp], misc[]]];
nameOps ← TextNode.pZone.
NEW [OpsRec ← [LoadNameParam, StoreError,
AddRealError, PercentError, SetNameParam]];
styleParam ← DefineNameOp[frame, "style", StyleNameOp, style];
fontFamilyParam ← DefineNameOp[frame, "family", FontFamilyOp, fontFamily];
realOps ← TextNode.pZone.
NEW [OpsRec ←
[RealOpLoad, RealOpSetReal, RealOpAddReal, RealOpPercent, SetNameError]];
glueOps ← TextNode.pZone.
NEW [OpsRec ←
[GlueOpLoad, GlueOpSetReal, GlueOpAddReal, GlueOpPercent, SetNameError]];
colorOps ← TextNode.pZone.
NEW [OpsRec ←
[ColorOpLoad, ColorOpSetReal, ColorOpAddReal, ColorOpPercent, SetNameError]];
fontSizeParam ← DefineRealOp[frame, "size", FontSizeOp, fontSize];
leftIndentParam ← DefineRealOp[frame, "leftIndent", LeftIndentOp, leftIndent];
rightIndentParam ← DefineRealOp[frame, "rightIndent", RightIndentOp, rightIndent];
firstIndentParam ← DefineRealOp[frame, "firstIndent", FirstIndentOp, firstIndent];
restIndentParam ← DefineRealOp[frame, "restIndent", RestIndentOp, restIndent];
topIndentParam ← DefineRealOp[frame, "topIndent", TopIndentOp, topIndent];
bottomIndentParam ←
DefineRealOp[frame, "bottomIndent", BottomIndentOp, bottomIndent];
lineLeadingSizeParam ←
DefineRealOp[frame, "leading", LineLeadingSizeOp, leading];
lineLeadingStretchParam ←
DefineRealOp[frame, "leadingStretch", LineLeadingStretchOp, leadingStretch];
lineLeadingShrinkParam ←
DefineRealOp[frame, "leadingShrink", LineLeadingShrinkOp, leadingShrink];
lineLeadingGlueParam ← DefineGlueOp[frame, "leadingGlue",
LineLeadingGlueOp, leading, leadingStretch, leadingShrink];
topLeadingSizeParam ←
DefineRealOp[frame, "topLeading", TopLeadingSizeOp, topLeading];
topLeadingStretchParam ←
DefineRealOp[frame, "topLeadingStretch", TopLeadingStretchOp, topLeadingStretch];
topLeadingShrinkParam ←
DefineRealOp[frame, "topLeadingShrink", TopLeadingShrinkOp, topLeadingShrink];
topLeadingGlueParam ← DefineGlueOp[frame, "topLeadingGlue",
TopLeadingGlueOp, topLeading, topLeadingStretch, topLeadingShrink];
bottomLeadingSizeParam ←
DefineRealOp[frame, "bottomLeading", BottomLeadingSizeOp, bottomLeading];
bottomLeadingStretchParam ←
DefineRealOp[frame, "bottomLeadingStretch",
BottomLeadingStretchOp, bottomLeadingStretch];
bottomLeadingShrinkParam ←
DefineRealOp[frame, "bottomLeadingShrink",
BottomLeadingShrinkOp, bottomLeadingShrink];
bottomLeadingGlueParam ← DefineGlueOp[frame, "bottomLeadingGlue",
BottomLeadingGlueOp, bottomLeading, bottomLeadingStretch, bottomLeadingShrink];
vshiftParam ←
DefineRealOp[frame, "vShift", VShiftOp, vshift];
tabStopsParam ←
DefineRealOp[frame, "tabStops", TabStopsOp, tabStops];
minLineGapParam ←
DefineRealOp[frame, "minLineGap", MinLineGapOp, minLineGap];
lineWeightParam ←
DefineRealOp[frame, "lineWeight", LineWeightOp, lineWeight];
pageWidthParam ←
DefineRealOp[frame, "pageWidth", PageWidthOp, pageWidth];
pageLengthParam ←
DefineRealOp[frame, "pageLength", PageLengthOp, pageLength];
leftMarginParam ←
DefineRealOp[frame, "leftMargin", LeftMarginOp, leftMargin];
rightMarginParam ←
DefineRealOp[frame, "rightMargin", RightMarginOp, rightMargin];
topMarginParam ←
DefineRealOp[frame, "topMargin", TopMarginOp, topMargin];
bottomMarginParam ←
DefineRealOp[frame, "bottomMargin", BottomMarginOp, bottomMargin];
headerMarginParam ←
DefineRealOp[frame, "headerMargin", HeaderMarginOp, headerMargin];
footerMarginParam ←
DefineRealOp[frame, "footerMargin", FooterMarginOp, footerMargin];
bindingMarginParam ←
DefineRealOp[frame, "bindingMargin", BindingMarginOp, bindingMargin];
lineLengthParam ←
DefineRealOp[frame, "lineLength", LineLengthOp, lineLength];
columnParam ←
DefineRealOp[frame, "column", ColumnOp, column];
textRotationParam ←
DefineRealOp[frame, "textRotation", TextRotationOp, textRotation];
areaHueParam ←
DefineRealOp[frame, "areaHue", AreaHueOp, areaHue];
areaSaturationParam ←
DefineRealOp[frame, "areaSaturation", AreaSaturationOp, areaSaturation];
areaBrightnessParam ←
DefineRealOp[frame, "areaBrightness", AreaBrightnessOp, areaBrightness];
areaColorParam ← DefineColorOp[frame, "areaColor",
AreaColorOp, areaHue, areaSaturation, areaBrightness];
outlineHueParam ←
DefineRealOp[frame, "outlineHue", OutlineHueOp, outlineHue];
outlineSaturationParam ←
DefineRealOp[frame, "outlineSaturation", OutlineSaturationOp, outlineSaturation];
outlineBrightnessParam ←
DefineRealOp[frame, "outlineBrightness", OutlineBrightnessOp, outlineBrightness];
outlineColorParam ← DefineColorOp[frame, "outlineColor",
OutlineColorOp, outlineHue, outlineSaturation, outlineBrightness];
textHueParam ←
DefineRealOp[frame, "textHue", TextHueOp, textHue];
textSaturationParam ←
DefineRealOp[frame, "textSaturation", TextSaturationOp, textSaturation];
textBrightnessParam ←
DefineRealOp[frame, "textBrightness", TextBrightnessOp, textBrightness];
textColorParam ← DefineColorOp[frame, "textColor",
TextColorOp, textHue, textSaturation, textBrightness];
pageBreakPenaltyParam ← DefineRealOp[frame, "pageBreakPenalty",
PageBreakPenaltyOp, pageBreakPenalty];
pageBreakPenalty2Param ← DefineRealOp[frame, "pageBreakAfterFirstLinePenalty",
PageBreakPenalty2Op, pageBreakAfterFirstLinePenalty];
pageBreakPenalty3Param ← DefineRealOp[frame, "pageBreakAfterLastLinePenalty",
PageBreakPenalty3Op, pageBreakAfterLastLinePenalty];
pageBreakPenalty4Param ← DefineRealOp[frame, "pageBreakBeforeFirstLinePenalty",
PageBreakPenalty4Op, pageBreakBeforeFirstLinePenalty];
pageBreakPenalty5Param ← DefineRealOp[frame, "pageBreakBeforeLastLinePenalty",
PageBreakPenalty5Op, pageBreakBeforeLastLinePenalty];
JaMOps.End[frame]; -- replace sysdict by userdict
JaMOps.Begin[frame,userdict];
END;