1signature AXIS_CENTER  =
2sig
3  val axisCenter: BasicTypes.style -> BoxTypes.box -> BoxTypes.node
4end  (* signature AXIS_CENTER *)
5(*----------*)
6
7structure AxisCenter: AXIS_CENTER  =
8struct
9  open BasicTypes;  open BoxTypes
10  open Distance;  open StyleParams
11  fun axisCenter st box  =
12  let val axh  =  AxisHeight st
13      val h  =  #height box   and  d  =  #depth box
14      val shift  =  half (h - d)  -  axh
15  in  Box (shift, box)  end
16  (* now the effective height is  h - shift = (h + d)/2 + axh,
17     and the effective depth  is  d + shift = (h + d)/2 - axh.
18     These are the values which Knuth directly assigns to height and depth. *)
19end  (* structure AxisCenter *)
20