Index of values


(*./) [Mlpost.Num.Infix]
alias for Num.multf
(*/) [Mlpost.Num.Infix]
alias for Num.multn
(++) [Mlpost.Command]
Abbreviation for append
(+/) [Mlpost.Num.Infix]
alias for Num.addn
(-/) [Mlpost.Num.Infix]
alias for Num.subn
(/./) [Mlpost.Num.Infix]
alias for Num.divf
(//) [Mlpost.Num.Infix]
alias for Num.divn

A
add [Mlpost.Point]
add_belt [Mlpost.Arrow]
Add an arrow head at any point of an arrow.
add_foot [Mlpost.Arrow]
Add a foot (an inverted head) at the beginning of the arrow.
add_head [Mlpost.Arrow]
Add a head at the end of the arrow.
add_line [Mlpost.Arrow]
Add a line to a body.
addn [Mlpost.Num]
Useful operations on Nums
append [Mlpost.Command]
Append two commands to form a compound command
append [Mlpost.Path]
Append a path to another using joint style
arrow [Mlpost.Diag]
arrow d n1 n2 adds an arrow between n1 and n2 in the diagram d, by side effect.

B
bbox [Mlpost.Picture]
Get the bounding box of a picture (with default padding, as in MetaPost)
below [Mlpost.Picture]
below p1 p2 returns a picture in which p2 is placed below p1
beside [Mlpost.Picture]
beside p1 p2 returns a picture in which p2 is placed right to p1
bin [Mlpost.Tree]
bin label l r creates a binary node with label label and children l and r.
black [Mlpost.Color]
blue [Mlpost.Color]
box [Mlpost.Box]
box b creates a new box containing the box b
box_arrow [Mlpost.Helpers]
box_label_arrow [Mlpost.Helpers]
box_label_line [Mlpost.Helpers]
box_labelbox_arrow [Mlpost.Helpers]
box_line [Mlpost.Helpers]
bp [Mlpost.Num.Scale]
bp [Mlpost.Num]
bpath [Mlpost.Box]
Get the bounding path of a box
bpp [Mlpost.Point]
build_cycle [Mlpost.Path]
Build a cycle from a set of intersecting paths

C
center [Mlpost.Box]
center pt x centers the object x at the point pt
center [Mlpost.Picture]
Place a picture centered at some point
circle [Mlpost.Box]
circle pic creates a circle box containing the picture pic.
circle [Mlpost.Shapes]
circle [Mlpost.Pen]
A circular pen of diameter 1 bp
classic [Mlpost.Arrow]
A simple arrow with one line and two straight lines for the head.
clear_stroke [Mlpost.Box]
clip [Mlpost.Picture]
clip pic path limits pic to the cyclic path path; all elements outside of path are cut off.
cm [Mlpost.Num.Scale]
cm [Mlpost.Num]
cmp [Mlpost.Point]
cmyk [Mlpost.Color]
cmyk c m y k constructs the color that corresponds to the color code CMYK(c,m,y,k)
cmyka [Mlpost.Color]
similar to cmyk, but takes the factor of transparency
color [Mlpost.Color]
color n returns the RGB color associated to name n (as defined in /etc/X11/rgb.txt).
concat [Mlpost.Path]
Add a knot at the end of a path
corner_bbox [Mlpost.Picture]
Get the bounding box of a picture, according to its corners and supplied padding dx and dy.
cpath [Mlpost.Box]
the path that connects 2 boxes and stops at the box boundaries
create [Mlpost.Diag]
Create a diagram that consists of the given nodes
ctr [Mlpost.Box]
ctr [Mlpost.Picture]
curl [Mlpost.Path]
cut_after [Mlpost.Path]
cut_after p1 p2 cuts p2 after the intersection with p1.
cut_before [Mlpost.Path]
Same as Path.cut_after, but cuts before
cyan [Mlpost.Color]
cycle [Mlpost.Path]
Close a path using direction dir and style style

D
darkgray [Mlpost.Color]
default [Mlpost.Color]
the default color is black
default [Mlpost.Pen]
The default pen; it corresponds to Pen.scale (Num.bp 0.5) (Pen.circle ())
defaultjoint [Mlpost.Path]
The default joint style (JLine)
deg2rad [Mlpost.Num]
Converts degrees into radians
dir [Mlpost.Point]
dir f is the point at angle f on the unit circle.
direction [Mlpost.Path]
direction f p returns the direction of the tangent at point f p.
directionn [Mlpost.Path]
Same as direction but for a Num.t.
divf [Mlpost.Num]
divn [Mlpost.Num]
dotlabel [Mlpost.Command]
Works like label, but puts a dot at point p as well
dotlabels [Mlpost.Helpers]
down [Mlpost.Point]
draw [Mlpost.Diag]
Draws the diagram.
draw [Mlpost.Arrow]
Draw an arrow following the given path.
draw [Mlpost.Box]
Draws a box
draw [Mlpost.Command]
Draw a path
draw2 [Mlpost.Arrow]
Use draw2 a b to draw an arrow from a to b.
draw_arrow [Mlpost.Command]
Draw a path with an arrow head; the optional arguments are the same as for Command.draw
draw_axes [Mlpost.Plot]
draw_func [Mlpost.Plot]
draw_grid [Mlpost.Plot]
draw_label_arrow [Mlpost.Helpers]
draw_labelbox_arrow [Mlpost.Helpers]
draw_pic [Mlpost.Command]
draws a picture
draw_simple_arrow [Mlpost.Helpers]
draw_simple_axes [Mlpost.Plot]
draw_thick [Mlpost.Arrow]
Draw a thick arrow.
dump [Mlpost.Metapost]
dump ?prelude ?pdf f builds a Metapost file f.mp for all figures, then runs Metapost on it, and renames figure files according to the names specified to emit.
dump_tex [Mlpost.Metapost]
dump_tex ?prelude f builds a LaTeX file f.tex for all the figures, using LaTeX prelude prelude if given.

E
east [Mlpost.Box]
ellipse [Mlpost.Box]
ellipse p pic creates a elliptic box containing the picture pic.
ellipse [Mlpost.Shapes]
ellipse rx ry returns an ellipse of great axis rx and small axis ry.
elts [Mlpost.Box]
elts b returns the sub-boxes of b; returns the empty array for the empty box or a box containing a picture.
emit [Mlpost.Metapost]
empty [Mlpost.Arrow]
The empty kind with no line nor head.
empty [Mlpost.Box]
the empty box
evenly [Mlpost.Dash]
The pattern composed of evenly spaced dashes
externalimage [Mlpost.Command]
insert an image given its filename

F
fill [Mlpost.Command]
Fill a contour given by a closed path
from_path [Mlpost.Pen]
Construct a pen from a closed path
fullcircle [Mlpost.Path]
A full circle of radius 1 and centered on the origin

G
generate_mp [Mlpost.Metapost]
generate_tex [Mlpost.Generate]
get [Mlpost.Box]
get n b returns the sub-box of b of name n, if any, and raises Invalid_argument otherwise.
get_fill [Mlpost.Box]
get_name [Mlpost.Box]
get_pen [Mlpost.Box]
get_stroke [Mlpost.Box]
gmean [Mlpost.Num]
the geometric mean of two nums : sqrt(a * a + b * b)
gray [Mlpost.Color]
green [Mlpost.Color]
grid [Mlpost.Box]
Aligns the given boxes in a way that is similar to hblock and vblock: boxes are aligned in a grid where all cells have the same size.
gridi [Mlpost.Box]
similar to gridi, but using a matrix defined with a function
gridl [Mlpost.Box]
similar to grid, but using lists instead of arrays
group [Mlpost.Box]
group bl groups a list of boxes bl into a single box

H
halfcircle [Mlpost.Path]
The upper half of fullcircle
hblock [Mlpost.Box]
hblock bl aligns the boxes of bl horizontally and surround them with new rectangular boxes of the same height; all these new boxes are packed together into the returned box.
hbox [Mlpost.Box]
aligns the given boxes horizontally and returns a box containing these boxes as sub-components.
head_classic [Mlpost.Arrow]
A simple head with two straight lines.
head_triangle [Mlpost.Arrow]
Same as head_classic except that the two lines are joined together to form a triangle.
head_triangle_full [Mlpost.Arrow]
Same as head_triangle except that the triangle is not drawn (hence the absence of pen properties) but is filled with the given color.
height [Mlpost.Box]
return the height of the object
height [Mlpost.Picture]

I
id [Mlpost.Transform]
The identity transformation
inch [Mlpost.Num.Scale]
inch [Mlpost.Num]
inp [Mlpost.Point]
is_opaque [Mlpost.Color]
test if the color is opaque
iter [Mlpost.Command]
iter m n f builds a command that corresponds to the sequence of commands f m; f (m+1); ... ; f(n)
iterl [Mlpost.Command]
iterl f l builds a command that corresponds to the sequence of commands f x1; f x2; ... ; f xn for l = [x1;x2;...;xn]

J
jControls [Mlpost.Path]
jCurve [Mlpost.Path]
jCurveNoInflex [Mlpost.Path]
jLine [Mlpost.Path]
jTension [Mlpost.Path]
jointpath [Mlpost.Path]
Build a path from n float_pairs and n-1 joints, with default directions
jointpathk [Mlpost.Path]
Build a path from n knots and n-1 joints
jointpathn [Mlpost.Path]
jointpathp [Mlpost.Path]
Build a path from n points and n-1 joints, with default directions

K
knot [Mlpost.Path]
Build a knot from a pair of floats
knotlist [Mlpost.Path]
knotn [Mlpost.Path]
Build a knot from a Num.t pair; the optional arguments are as in Path.knot
knotp [Mlpost.Path]
Build a knot from a point; the optional arguments are the incoming directions

L
label [Mlpost.Command]
label ~pos:`Left pic p puts picture pic at the left of point p
leaf [Mlpost.Tree]
Creation
left [Mlpost.Point]
length [Mlpost.Path]
Number of nodes in a path, minus one.
length [Mlpost.Point]
length p is the length of vector from the origin to p
lightblue [Mlpost.Color]
lightcyan [Mlpost.Color]
lightgray [Mlpost.Color]
lightgreen [Mlpost.Color]
lightmagenta [Mlpost.Color]
lightred [Mlpost.Color]
lightyellow [Mlpost.Color]
llcorner [Mlpost.Picture]
lrcorner [Mlpost.Picture]

M
magenta [Mlpost.Color]
make [Mlpost.Picture]
Make a picture from a drawing command
map_bp [Mlpost.Point]
map_cm [Mlpost.Point]
map_in [Mlpost.Point]
map_mm [Mlpost.Point]
map_pt [Mlpost.Point]
maxn [Mlpost.Num]
mediumgray [Mlpost.Color]
minn [Mlpost.Num]
mk_skeleton [Mlpost.Plot]
mk_skeleton w h dx dy builds a skeleton of width w and height h, each cell being dx units wide and dy units high.
mm [Mlpost.Num.Scale]
mm [Mlpost.Num]
mmp [Mlpost.Point]
mult [Mlpost.Point]
multf [Mlpost.Num]
multn [Mlpost.Num]

N
neg [Mlpost.Num]
noDir [Mlpost.Path]
node [Mlpost.Diag]
Construct a node at a given position with a given content in Latex format and a box style
node [Mlpost.Tree]
node label children creates a node with label label and a list of children children.
nop [Mlpost.Command]
A command that has no effect
north [Mlpost.Box]
north_east [Mlpost.Box]
north_west [Mlpost.Box]
nth [Mlpost.Box]
nth i b returns the i-th sub-box of b.

O
off [Mlpost.Dash]
on [Mlpost.Dash]
one [Mlpost.Num]
opaque [Mlpost.Color]
make a color opaque
orange [Mlpost.Color]
origin [Mlpost.Point]

P
p [Mlpost.Point]
Builds a point from a pair of floats
patatoid [Mlpost.Box]
patatoid p pic creates an undefined, vaguely rectangular box containing the picture pic.
patatoid [Mlpost.Shapes]
path [Mlpost.Box]
path p creates a new box containing the path p
path [Mlpost.Path]
Build a path from a list of pairs of floats
pathk [Mlpost.Path]
Same as path, but uses a knot list
pathn [Mlpost.Path]
Same as path, but uses a Num.t list
pathp [Mlpost.Path]
Same as path but uses a point list
pattern [Mlpost.Dash]
This function, together with the type on_off permits to construct custom dash patterns, by giving a list of on / off constructors, with corresponding lengths
pi [Mlpost.Num]
3 .14159
pic [Mlpost.Box]
pic p creates a new box containing the picture p
place_bot_left [Mlpost.Picture]
Place a picture with its bottom left corner at some point
place_bot_right [Mlpost.Picture]
Place a picture with its bottom right corner at some point
place_up_left [Mlpost.Picture]
Place a picture with its upper left corner at some point
place_up_right [Mlpost.Picture]
Place a picture with its upper right corner at some point
point [Mlpost.Path]
point f p returns a certain point on the path p; f is given "in control points": 0. means the first control point, 1. the second and so on; intermediate values are accepted.
pointn [Mlpost.Path]
Same as point but for a Num.t.
pt [Mlpost.Point]
Construct a point from two numeric values
pt [Mlpost.Num.Scale]
pt [Mlpost.Num]
pt are PostScript points.
ptlist [Mlpost.Point]
Same as p, but builds a list of points
ptp [Mlpost.Point]
purple [Mlpost.Color]

Q
quartercircle [Mlpost.Path]
The right half of halfcircle

R
read_prelude_from_tex_file [Mlpost.Metapost]
read the prelude from a tex file, until the end of file or the text "\begin{document}" if it is outside a comment
rect [Mlpost.Box]
rect p pic creates a rectangular box containing the picture pic.
rectangle [Mlpost.Shapes]
rectangle w h returns a rectangle of width w and height h.
red [Mlpost.Color]
reflect [Mlpost.Transform]
Reflect an object with respect to the line that goes through the two given points
rgb [Mlpost.Color]
rgb r g b constructs the color that corresponds to the color code RGB(r,g,b)
rgb8 [Mlpost.Color]
similar to rgb, but takes integers between 0 and 255 as argument
rgb8a [Mlpost.Color]
similar to rgb8, but takes the factor of transparency
rgba [Mlpost.Color]
similar to rgb, but takes the factor of transparency
right [Mlpost.Point]
rotate [Mlpost.Picture]
rotate [Mlpost.Pen]
rotate [Mlpost.Path]
rotate [Mlpost.Point]
Rotate a point by an angle in degrees
rotate_around [Mlpost.Transform]
Rotate an object by an angle given in degrees, around a given point
rotate_around [Mlpost.Point]
rotate_around p1 f p2 rotates p2 around p1 by an angle f in degrees
rotated [Mlpost.Transform]
Rotate an object by an angle given in degrees
round_rect [Mlpost.Box]
round_rect p pic creates a rectangular box containing the picture pic, with rounded corners.
round_rect [Mlpost.Shapes]
round_rect w h rx ry returns a rectangle of width w and height h with rounded corners.

S
scale [Mlpost.Picture]
scale [Mlpost.Pen]
scale [Mlpost.Path]
scale [Mlpost.Point]
Multiply a point by a scalar
scaled [Mlpost.Transform]
Scale an object by a constant factor.
scaled [Mlpost.Dash]
Scale a dash pattern
segment [Mlpost.Point]
segment f p1 p2 is the point (1-f)p1 + fp2.
seq [Mlpost.Command]
Group a list of commands to a single command
set_fill [Mlpost.Box]
set_name [Mlpost.Box]
set_pen [Mlpost.Box]
set_stroke [Mlpost.Box]
shadow [Mlpost.Box]
shift [Mlpost.Box]
shift pt x shifts the object x about the point pt
shift [Mlpost.Picture]
shift [Mlpost.Pen]
shift [Mlpost.Path]
shift [Mlpost.Point]
Sum two points
shifted [Mlpost.Transform]
Shift an object with respect to a point
shifted [Mlpost.Dash]
Shift a dash pattern
slanted [Mlpost.Transform]
Slant an object: the point (x,y) becomes (x+ay,y), with slanting factor a
slideshow [Mlpost.Metapost]
takes a list of figures and returns a list of figures of exactly the same size (the size of the biggest figure).
south [Mlpost.Box]
south_east [Mlpost.Box]
south_west [Mlpost.Box]
spin [Mlpost.Picture]
square [Mlpost.Pen]
A pen in form of a square, of length 1 bp
start [Mlpost.Path]
Create a simple path with one knot
sub [Mlpost.Point]
Substract two points
subn [Mlpost.Num]
subpath [Mlpost.Path]
subpath start end path selects the subpath of path that lies between start and end.
subpathn [Mlpost.Path]
Same as subpathn but using Num.t.

T
tabular [Mlpost.Box]
aligns the given boxes both vertically and horizontally and returns a box containing all these boxes (with rows as first sub-components, and then individual boxes as sub-components of each row).
tabulari [Mlpost.Box]
similar to tabular, but using a matrix defined with a function
tabularl [Mlpost.Box]
similar to tabular, but using lists instead of arrays
tex [Mlpost.Box]
tex s creates a new box containing the LaTeX string s
tex [Mlpost.Picture]
Take a string in Latex format and transform it into a picture
transform [Mlpost.Picture]
Apply a transformation to a picture
transform [Mlpost.Pen]
Apply a transformation to pens
transform [Mlpost.Path]
Apply a transformation to a path
transform [Mlpost.Point]
Apply a transformation to a point
transparent [Mlpost.Color]
transparent f c multiplies by f the factor of transparency of c
triangle [Mlpost.Arrow]
A simple arrow with a triangular head.
triangle_full [Mlpost.Arrow]
A simple arrow with a triangular head filled with black.
two [Mlpost.Num]
Shortcuts for bp 0., bp 1. and bp 2..

U
ulcorner [Mlpost.Picture]
unitsquare [Mlpost.Path]
A full square of size 1 and centered on the origin
up [Mlpost.Point]
urcorner [Mlpost.Picture]

V
vblock [Mlpost.Box]
similar to hblock, with vertical alignment.
vbox [Mlpost.Box]
aligns the given boxes vertically and returns a box containing these boxes as sub-components.
vec [Mlpost.Path]

W
west [Mlpost.Box]
white [Mlpost.Color]
width [Mlpost.Box]
return the width of the object
width [Mlpost.Picture]
withdots [Mlpost.Dash]
The pattern composed of evenly spaced dots

X
xpart [Mlpost.Point]
xpart p is the x coordinate of point p
xscale [Mlpost.Picture]
xscale [Mlpost.Pen]
Shortcuts for transformations of pens
xscale [Mlpost.Path]
Shortcuts for transformations of Paths
xscale [Mlpost.Point]
Scales the X coordinate of a point by a scalar
xscaled [Mlpost.Transform]
Scale an object by a constant factor, but only in the x direction

Y
yellow [Mlpost.Color]
ypart [Mlpost.Point]
ypart p is the y coordinate of point p
yscale [Mlpost.Picture]
yscale [Mlpost.Pen]
yscale [Mlpost.Path]
yscale [Mlpost.Point]
Scales the Y coordinate of a point by a scalar
yscaled [Mlpost.Transform]
Scale an object by a constant factor, but only in the y direction

Z
zero [Mlpost.Num]
zscaled [Mlpost.Transform]
Zscaled multiplies points of the object by the given point, using "complex" multiplication: (x,y) * (a,b) = (ax - by, bx + ay); its effect is to rotate and scale so as to map (1,0) into (a,b)