<> <> <]. Run it after MathExprClassesList and it will override the defn of quote[] there.>> DIRECTORY MathExpr, MathRules, MathDB, MathTypes, MathBox, Imager, Rope, Vector, MathConstructors; ChangeQuote: CEDAR PROGRAM IMPORTS MathBox, MathRules, MathExpr, MathDB, MathConstructors ~ BEGIN <> EXPR: TYPE ~ MathExpr.EXPR; BOX: TYPE ~ MathBox.BOX; ROPE: TYPE ~ Rope.ROPE; VEC: TYPE ~ Vector.VEC; CompoundBoxProc: TYPE ~ MathRules.CompoundBoxProc; CompositionProc: TYPE ~ MathRules.CompositionProc; Alignment2D: TYPE ~ MathRules.Alignment2D; Offset: TYPE ~ MathRules.Offset; Size: TYPE ~ MathRules.Size; Argument: TYPE ~ MathExpr.Argument; Symbol: TYPE ~ MathExpr.Symbol; CompoundClass: TYPE ~ MathExpr.CompoundClass; FormatClass: TYPE ~ MathTypes.FormatClass; Style: TYPE ~ MathTypes.Style; <> MakeArgument: PROC[name: ATOM, aliases: LIST OF ATOM, size: Size] RETURNS[Argument] ~ MathExpr.MakeArgument; MakeSymbol: PROC[name: ATOM, aliases: LIST OF ATOM, size: Size, value: EXPR] RETURNS[Symbol] ~ MathExpr.MakeSymbol; MakeCompoundClass: PROC[name: ATOM, formatClass: FormatClass, description: ROPE, args: LIST OF Argument, syms: LIST OF Symbol, boxRule: CompoundBoxProc, compBox: CompositionProc, cvtAS, cvtReduce, cvtSMP, cvtOther: ROPE _ NIL] RETURNS[CompoundClass] ~ MathExpr.MakeCompoundClass; <> smallGap: REAL = 0.05; medGap: REAL = 0.10; bigGap: REAL = 0.25; <> SquareBoxRule: CompoundBoxProc ~ { <> <<>> leftSquareBox: BOX _ MathBox.GetBox[$leftSquare, boxes]; rightSquareBox: BOX _ MathBox.GetBox[$rightSquare, boxes]; aBox: BOX _ MathBox.GetBox[$a, boxes]; <> scaleFactor: REAL _ MAX[0.25, 1.1 * aBox.Height[] / leftSquareBox.Height[]]; leftSquareBox _ MathBox.Scale[leftSquareBox, [scaleFactor, scaleFactor]]; rightSquareBox _ MathBox.Scale[rightSquareBox, [scaleFactor, scaleFactor]]; RETURN[LIST[aBox, leftSquareBox, rightSquareBox]]; }; <> SquareCompRule: CompositionProc ~ { <> << $leftSquare and $rightSquare>> tempBox: BOX; tempBoxes: LIST OF BOX; alignments: LIST OF Alignment2D _ LIST[ [$leftSquare, [$a, [right], [left]], [$a, [center], [center]]], [$rightSquare, [$a, [left], [right]], [$a, [center], [center]]]]; [tempBox, tempBoxes] _ MathRules.Compose[boxes, alignments, [$leftSquare, [origin]], [$self, [center, -0.25]]]; RETURN[tempBox, tempBoxes]; }; <> wrongBoxType: PUBLIC ERROR = CODE; <> InstallListClassesAA: PROC [] ~ { <> quoteClass: CompoundClass; aSquareArg: Argument; leftQuoteSym, rightQuoteSym: Symbol; aSquareArg _ MakeArgument[$a, LIST[$aliasA, $aliasHot], normal]; leftQuoteSym _ MakeSymbol[$leftSquare, NIL, normal, MathConstructors.MakePlainRope["///"] ]; rightQuoteSym _ MakeSymbol[$rightSquare, NIL, normal, MathConstructors.MakePlainRope["///"] ]; quoteClass _ MakeCompoundClass[$quote, paren, "' a", LIST[aSquareArg], LIST[leftQuoteSym, rightQuoteSym], SquareBoxRule, SquareCompRule, "quote($a)"]; MathDB.KillCompoundClass[$quote]; MathDB.InstallCompoundClass[quoteClass]; MathDB.AddOperator[quoteClass, $List]; }; <> InstallListClassesAA[]; END.