mlpost
Library
Module
Module type
Parameter
Class
Class type
type t = Box.t
A triangular shape is a box. In the following, we simply call it a "triangle".
val create :
?brush:Brush.t ->
?stroke:Color.t option ->
?pen:Pen.t ->
?dash:Dash.t ->
?fill:Color.t ->
?left:float ->
?right:float ->
?width:Num.t ->
depth:Num.t ->
unit ->
Box.t
create depth
creates a triangular shape of depth depth
. The width is equal to depth
, unless specified using width
. left
and right
control the horizontal position of the root; they default to 0.5
i.e. the root is centered. Negative values for left
and right
are allowed.
val pic :
?brush:Brush.t ->
?stroke:Color.t option ->
?pen:Pen.t ->
?dash:Dash.t ->
?fill:Color.t ->
?dx:float ->
?dy:float ->
Picture.t ->
t
builds a triangle surrounding a picture
val tex :
?brush:Brush.t ->
?stroke:Color.t option ->
?pen:Pen.t ->
?dash:Dash.t ->
?fill:Color.t ->
?dx:float ->
?dy:float ->
string ->
t
builds a triangle surrounding a picture
builds a triangle surrounding a LaTeX label
val root_label : ?pos:Command.position -> Picture.t -> t -> t
val tex_root_label : ?pos:Command.position -> string -> t -> t
Attach a label to the root.
a point inside a triangle is denoted using two coordinates x
and depth
. Coordinate x
controls horizontal placement, with 0.0 for left and 1.0 for right (negative values are allowed). Coordinate depth
controls vertical placement, with 0.0 for root and 1.0 for bottom line (negative values are allowed). x
defaults to 0.5
(centered) and depth
defaults to 1.0
(bottom).
val label :
?x:float ->
?depth:float ->
?pos:Command.position ->
Picture.t ->
t ->
t
val tex_label :
?x:float ->
?depth:float ->
?pos:Command.position ->
string ->
t ->
t
Attach a label to the point (x, depth). Coordinate depth
defaults to 0.7, so that label is likely to fit nicely in the triangle (otherwise, you may consider using functions pic
and tex
above).
anchor t2 t1
moves triangle t1
at position (x, depth) in triangle t2
pose t2 t1
moves triangle t1
so that its south point is at position (x, depth) in triangle t2
pose t2 t1
moves triangle t1
so that its south point is at position (x, depth) in triangle t2