1signature GEN_FRACTION = 2sig 3 val makeGenFraction: BasicTypes.style -> BasicTypes.dist option -> 4 BasicTypes.delim -> BasicTypes.delim -> BoxTypes.box -> BoxTypes.box -> 5 BoxTypes.box 6end (* signature GEN_FRACTION *) 7(*----------*) 8 9structure GenFraction: GEN_FRACTION = 10struct 11 open BasicTypes; open BoxTypes 12 open General; open Distance; open StyleParams 13 open Delimiter; open BoxPack 14 open MakeAtop; open MakeFract 15 16 fun makeGenFraction st thickness left right numBox denBox = 17 let val width = Int.max (#width numBox, #width denBox) 18 val numBox' = rebox width numBox and denBox' = rebox width denBox 19 val th = optVal (RuleThickness st) thickness 20 val middle = if th = zero then makeAtop st numBox' denBox' 21 else makeFract st th width numBox' denBox' 22 val leftNode = makeDelimiter st left 23 val rightNode = makeDelimiter st right 24 in boxList [leftNode, middle, rightNode] end 25end (* structure GenFraction *) 26