InstallDecorationClassesAA:
PROC [] ~ {
local declarations
subscriptClass, aboveClass, hatClass, superscriptClass, primeClass, boxClass: CompoundClass;
baseArg, subscriptArg, superscriptArg, hatArg, topArg, bottomArg, boxArg: Argument;
numerSpSym, denomSpSym: Symbol;
leftSideSym, rightSideSym, topSym, bottomSym: Symbol;
leftSpaceSym, rightSpaceSym, topSpaceSym, bottomSpaceSym: Symbol;
baseArg ← MakeArgument[$base, LIST[$aliasA, $aliasHot], normal];
subscriptArg ← MakeArgument[$subscript, LIST[$aliasB], script];
superscriptArg ← MakeArgument[$superscript, LIST[$aliasB], script];
hatArg ← MakeArgument[$hat, LIST[$aliasB], script];
define info for "box arg"
boxArg ← MakeArgument[$arg, LIST[$aliasA, $aliasHot], normal];
leftSideSym ← MakeSymbol[$leftSide, NIL, normal, MathConstructors.MakePlainSym['\174] ];
rightSideSym ← MakeSymbol[$rightSide, NIL, normal, MathConstructors.MakePlainSym['\174] ];
topSym ← MakeSymbol[$top, NIL, normal, MathConstructors.MakeLine[]];
bottomSym ← MakeSymbol[$bottom, NIL, normal, MathConstructors.MakeLine[]];
leftSpaceSym ← MakeSymbol[$leftSpace, NIL, normal, MathConstructors.MakeSpace[$medium]];
rightSpaceSym ← MakeSymbol[$rightSpace, NIL, normal, MathConstructors.MakeSpace[$medium]];
topSpaceSym ← MakeSymbol[$topSpace, NIL, normal, MathConstructors.MakeSpace[$medium]];
bottomSpaceSym ← MakeSymbol[$bottomSpace, NIL, normal, MathConstructors.MakeSpace[$medium]];
define info for "above top bottom"
topArg ← MakeArgument[$topArg, LIST[$aliasA, $aliasHot], normal];
bottomArg ← MakeArgument[$bottomArg, LIST[$aliasB], normal];
numerSpSym ← MakeSymbol[$topSpace, LIST[$aliasSpace], normal, MathConstructors.MakeSpace[$thin]];
denomSpSym ← MakeSymbol[$bottomSpace, LIST[$aliasSpace], normal, MathConstructors.MakeSpace[$thin]];
boxClass ← MakeCompoundClass[$box, other, "box a", LIST[boxArg], LIST[leftSideSym, rightSideSym, topSym, bottomSym, leftSpaceSym, rightSpaceSym, topSpaceSym, bottomSpaceSym], BoxBoxRule, BoxCompRule, "box $arg"];
subscriptClass ← MakeCompoundClass[$subscript, other, "a sub b", LIST[baseArg, subscriptArg], NIL, FixedSizeBoxRule, SubscriptCompRule, "$baseSub$subscript"];
superscriptClass ← MakeCompoundClass[$superscript, other, "a super b", LIST[baseArg, superscriptArg], NIL, FixedSizeBoxRule, SuperscriptCompRule, "$baseSuper$superscript"];
hatClass ← MakeCompoundClass[$hat, other, "a hat b", LIST[baseArg, hatArg], LIST[denomSpSym], FixedSizeBoxRule, HatCompRule, "$baseHat$hat"];
aboveClass ← MakeCompoundClass[$above, over, "a above b", LIST[topArg, bottomArg], LIST[numerSpSym, denomSpSym], FixedSizeBoxRule, AboveCompRule, "$topArg above $bottomArg"];
primeClass ← MakePostFixUnaryOpClass[$prime, $prime, $a, MathConstructors.MakePlainSym[''], "a prime", "$aPrime"];
MathDB.InstallCompoundClass[subscriptClass];
MathDB.AddOperator[subscriptClass, $Decoration];
MathDB.InstallCompoundClass[superscriptClass];
MathDB.AddOperator[superscriptClass, $Decoration];
MathDB.InstallCompoundClass[hatClass];
MathDB.AddOperator[hatClass, $Decoration];
MathDB.InstallCompoundClass[aboveClass];
MathDB.AddOperator[aboveClass, $Decoration];
MathDB.InstallCompoundClass[primeClass];
MathDB.AddOperator[primeClass, $Decoration];
MathDB.InstallCompoundClass[boxClass];
MathDB.AddOperator[boxClass, $Decoration];
};