outform.spad line 190 [edit on github]
This domain is used to create and manipulate mathematical expressions for output. It is intended to provide an insulating layer between the expression rendering software (e.g. TeX, or Script) and the output coercions in the various domains.
f * g
creates the equivalent infix form.
f + g
creates the equivalent infix form.
- f
creates the equivalent prefix form.
f - g
creates the equivalent infix form.
f / g
creates the equivalent infix form.
f < g
creates the equivalent infix form.
f <= g
creates the equivalent infix form.
f = g
creates the equivalent infix form.
f > g
creates the equivalent infix form.
f >= g
creates the equivalent infix form.
SEGMENT(x)
creates the prefix form: x..
.
SEGMENT(x, y)
creates the infix form: x..y
.
f ^ g
creates the equivalent infix form.
f and g
creates the equivalent infix form.
assign(f, g)
creates a form for the assignment f := g
.
binomial(n, m)
creates a form for the binomial coefficient of n
and m
.
blankSeparate(l)
creates the form separating the elements of l
by blanks.
box(f)
encloses f
in a box.
brace(f)
creates the form enclosing f
in braces (curly brackets).
brace(lf)
creates the form separating the elements of lf
by commas and encloses the result in curly brackets.
bracket(f)
creates the form enclosing f
in square brackets.
bracket(lf)
creates the form separating the elements of lf
by commas and encloses the result in square brackets.
center(f)
centers form f
in total space.
center(f, n)
centers form f
within space of width n
.
commaSeparate(l)
creates the form separating the elements of l
by commas.
differentiate(f, n)
creates a form for the n
th derivative of f
, e.g. f'
, f''
, f'''
, "f
super iv
".
dot(f)
creates the form with one dot overhead.
dot(f, n)
creates the form f
with n
dots overhead.
elt(op, l)
creates a form for application of op
to list of arguments l
.
empty()
creates an empty form.
exquo(f, g)
creates the equivalent infix form.
hconcat(f, g)
horizontally concatenate forms f
and g
.
hconcat(u)
horizontally concatenates all forms in list u
.
hspace(n)
creates white space of width n
.
infix(op, a, b)
creates a form which prints as: a op
b
.
infix(f, l)
creates a form depicting the n
-ary application of infix operation f
to a tuple of arguments l
.
infix?(op)
returns true
if op
is an infix operator, and false
otherwise.
int(expr)
creates the form prefixing expr
with an integral sign.
int(expr, lowerlimit)
creates the form prefixing expr
by an integral sign with a lowerlimit.
int(expr, lowerlimit, upperlimit)
creates the form prefixing expr
by an integral sign with both a lowerlimit
and upperlimit.
label(n, f)
gives form f
an equation label n
.
left(f)
left-justifies form f
in total space.
left(f, n)
left-justifies form f
within space of width n
.
matrix(llf)
makes llf
(a list of lists of forms) into a form which displays as a matrix.
message(s)
creates an form with no string quotes from string s
.
messagePrint(s)
prints s
without string quotes. Note: messagePrint(s)
is equivalent to print message(s)
.
not f
creates the equivalent prefix form.
f or g
creates the equivalent infix form.
outputForm(n)
creates a form for an integer.
outputForm(s)
creates a form for a string.
outputForm(s)
creates a form for a symbol.
over(f, g)
creates a form for the vertical fraction of f
over g
.
overbar(f)
creates the form f
with an overbar.
overlabel(x,f)
creates the form f
with "x
overbar" over the top.
paren(f)
creates the form enclosing f
in parentheses.
paren(lf)
creates the form separating the elements of lf
by commas and encloses the result in parentheses.
pile(l)
creates the form consisting of the elements of l
which displays as a pile, i.e. the elements begin on a new line and are indented right to the same margin.
postfix(op, a)
creates a form which prints as: a op
.
prefix(f, l)
creates a form depicting the n
-ary prefix application of f
to a tuple of arguments given by list l
.
presub(f, n)
creates a form for f
presubscripted by n
.
presuper(f, n)
creates a form for f
presuperscripted by n
.
prime(f)
creates the form f
followed by a suffix prime (single quote).
prime(f, n)
creates the form f
followed by n
primes.
print(u)
prints the form u
.
prod(expr)
creates the form prefixing expr
by a capital pi
.
prod(expr, lowerlimit)
creates the form prefixing expr
by a capital pi
with a lowerlimit.
prod(expr, lowerlimit, upperlimit)
creates the form prefixing expr
by a capital pi
with both a lowerlimit
and upperlimit.
f quo g
creates the equivalent infix form.
quote(f)
creates the form f
with a prefix quote.
rarrow(f, g)
creates a form for the mapping f -> g
.
f rem g
creates the equivalent infix form.
right(f)
right-justifies form f
in total space.
right(f, n)
right-justifies form f
within space of width n
.
root(f)
creates a form for the square root of form f
.
root(f, n)
creates a form for the n
th root of form f
.
rspace(n, m)
creates rectangular white space, n
wide by m
high.
scripts(f, l)
where l
is [sub, super, presuper, presub]
creates a form for f
with scripts on all 4 corners. If l
has less than 4 elements corresponding scripts are absent.
semicolonSeparate(l)
creates the form separating the elements of l
by semicolons.
slash(f, g)
creates a form for the horizontal fraction of f
over g
.
sub(f, n)
creates a form for f
subscripted by n
.
sum(expr)
creates the form prefixing expr
by a capital sigma.
sum(expr, lowerlimit)
creates the form prefixing expr
by a capital sigma with a lowerlimit.
sum(expr, lowerlimit, upperlimit)
creates the form prefixing expr
by a capital sigma with both a lowerlimit
and upperlimit.
super(f, n)
creates a form for f
superscripted by n
.
supersub(a, [sub1, super1, sub2, super2, ...])
creates a form with each subscript aligned under each superscript.
tensor(a, b)
creates a form for a tensor b
vconcat(f, g)
vertically concatenates forms f
and g
.
vconcat(u)
vertically concatenates all forms in list u
.
vspace(n)
creates white space of height n
.
zag(f, g)
creates a form for the continued fraction form for f
over g
.
f ~= g
creates the equivalent infix form.