1signature MAKE_LIM_OP = 2sig 3 val makeLimOp: BasicTypes.style -> BasicTypes.dist -> BoxTypes.node -> 4 BoxTypes.box option -> BoxTypes.box option -> BoxTypes.box 5end (* signature MAKE_LIM_OP *) 6(*----------*) 7 8structure MakeLimOp: MAKE_LIM_OP = 9struct 10 open BasicTypes; open BoxTypes 11 open General; open Distance; open StyleParams 12 open BasicBox; open MakeVBox; open BoxPack 13 14 fun LimDist distFun posFun st size = Int.max (distFun st, posFun st - size) 15 16 val LimSupDist = LimDist BigOpSupDist BigOpSupPos 17 val LimSubDist = LimDist BigOpSubDist BigOpSubPos 18 19 fun LimList distFun sizeFun st rightShift w pad = 20 optFold [] (fn box: box => 21 let val dist = distFun st (sizeFun box) 22 in [Kern dist, Box (rightShift, rebox w box), Kern pad] end) 23 24 val SupList = LimList LimSupDist #depth 25 val SubList = LimList LimSubDist #height 26 27 fun makeLimOp st itCorr nucNode supOptBox subOptBox = 28 let val nucBox = boxList (extend itCorr nucNode) 29 val optWidth = optFold zero (#width: box -> dist) 30 val w = Max [optWidth supOptBox, #width nucBox, optWidth subOptBox] 31 val pad = BigOpPadding st 32 val shift = half itCorr 33 val supList = SupList st shift w pad supOptBox 34 val subList = SubList st (~shift) w pad subOptBox 35 val nucItem = Box0 (rebox w nucBox) 36 in makeVBox w nucItem supList subList end 37end (* structure MakeLimOp *) 38