OutputForm¶
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.
- and: (%, %) -> %
f and g
creates the equivalent infix form.
- assign: (%, %) -> %
assign(f, g)
creates a form for the assignmentf := g
.
- binomial: (%, %) -> %
binomial(n, m)
creates a form for the binomial coefficient ofn
andm
.
- blankSeparate: List % -> %
blankSeparate(l)
creates the form separating the elements ofl
by blanks.
- box: % -> %
box(f)
enclosesf
in a box.
- brace: % -> %
brace(f)
creates the form enclosingf
in braces (curly brackets).
- brace: List % -> %
brace(lf)
creates the form separating the elements oflf
by commas and encloses the result in curly brackets.
- bracket: % -> %
bracket(f)
creates the form enclosingf
in square brackets.
- bracket: List % -> %
bracket(lf)
creates the form separating the elements oflf
by commas and encloses the result in square brackets.
- center: % -> %
center(f)
centers formf
in total space.
- center: (%, Integer) -> %
center(f, n)
centers formf
within space of widthn
.
- coerce: % -> OutputForm
from CoercibleTo OutputForm
- commaSeparate: List % -> %
commaSeparate(l)
creates the form separating the elements ofl
by commas.
- convert: % -> InputForm
from ConvertibleTo InputForm
- differentiate: (%, NonNegativeInteger) -> %
differentiate(f, n)
creates a form for then
th derivative off
, e.g.f'
,f''
,f'''
,"f
superiv
“.
- dot: % -> %
dot(f)
creates the form with one dot overhead.
- dot: (%, NonNegativeInteger) -> %
dot(f, n)
creates the formf
withn
dots overhead.
- elt: (%, List %) -> %
elt(op, l)
creates a form for application ofop
to list of argumentsl
.
- empty: () -> %
empty()
creates an empty form.
- exquo: (%, %) -> %
exquo(f, g)
creates the equivalent infix form.
- hconcat: (%, %) -> %
hconcat(f, g)
horizontally concatenate formsf
andg
.
- hconcat: List % -> %
hconcat(u)
horizontally concatenates all forms in listu
.
- hspace: Integer -> %
hspace(n)
creates white space of widthn
.
- infix?: % -> Boolean
infix?(op)
returnstrue
ifop
is an infix operator, andfalse
otherwise.
- infix: (%, %, %) -> %
infix(op, a, b)
creates a form which prints as: aop
b
.
- infix: (%, List %) -> %
infix(f, l)
creates a form depicting then
-ary application of infix operationf
to a tuple of argumentsl
.
- int: % -> %
int(expr)
creates the form prefixingexpr
with an integral sign.
- int: (%, %) -> %
int(expr, lowerlimit)
creates the form prefixingexpr
by an integral sign with a lowerlimit.
- int: (%, %, %) -> %
int(expr, lowerlimit, upperlimit)
creates the form prefixingexpr
by an integral sign with both alowerlimit
and upperlimit.
- label: (%, %) -> %
label(n, f)
gives formf
an equation labeln
.
- latex: % -> String
from SetCategory
- left: % -> %
left(f)
left-justifies formf
in total space.
- left: (%, Integer) -> %
left(f, n)
left-justifies formf
within space of widthn
.
- matrix: List List % -> %
matrix(llf)
makesllf
(a list of lists of forms) into a form which displays as a matrix.
- message: String -> %
message(s)
creates an form with no string quotes from strings
.
- messagePrint: String -> Void
messagePrint(s)
printss
without string quotes. Note:messagePrint(s)
is equivalent toprint message(s)
.
- not: % -> %
not f
creates the equivalent prefix form.
- or: (%, %) -> %
f or g
creates the equivalent infix form.
- outputForm: Integer -> %
outputForm(n)
creates a form for an integer.
- outputForm: String -> %
outputForm(s)
creates a form for a string.
- outputForm: Symbol -> %
outputForm(s)
creates a form for a symbol.
- over: (%, %) -> %
over(f, g)
creates a form for the vertical fraction off
overg
.
- overbar: % -> %
overbar(f)
creates the formf
with an overbar.
- overlabel: (%, %) -> %
overlabel(x,f)
creates the formf
with"x
overbar” over the top.
- paren: % -> %
paren(f)
creates the form enclosingf
in parentheses.
- paren: List % -> %
paren(lf)
creates the form separating the elements oflf
by commas and encloses the result in parentheses.
- pile: List % -> %
pile(l)
creates the form consisting of the elements ofl
which displays as a pile, i.e. the elements begin on a new line and are indented right to the same margin.
- postfix: (%, %) -> %
postfix(op, a)
creates a form which prints as: aop
.
- prefix: (%, List %) -> %
prefix(f, l)
creates a form depicting then
-ary prefix application off
to a tuple of arguments given by listl
.
- presub: (%, %) -> %
presub(f, n)
creates a form forf
presubscripted byn
.
- presuper: (%, %) -> %
presuper(f, n)
creates a form forf
presuperscripted byn
.
- prime: % -> %
prime(f)
creates the formf
followed by a suffix prime (single quote).
- prime: (%, NonNegativeInteger) -> %
prime(f, n)
creates the formf
followed byn
primes.
- print: % -> Void
print(u)
prints the formu
.
- prod: % -> %
prod(expr)
creates the form prefixingexpr
by a capitalpi
.
- prod: (%, %) -> %
prod(expr, lowerlimit)
creates the form prefixingexpr
by a capitalpi
with a lowerlimit.
- prod: (%, %, %) -> %
prod(expr, lowerlimit, upperlimit)
creates the form prefixingexpr
by a capitalpi
with both alowerlimit
and upperlimit.
- quo: (%, %) -> %
f quo g
creates the equivalent infix form.
- quote: % -> %
quote(f)
creates the formf
with a prefix quote.
- rarrow: (%, %) -> %
rarrow(f, g)
creates a form for the mappingf -> g
.
- rem: (%, %) -> %
f rem g
creates the equivalent infix form.
- right: % -> %
right(f)
right-justifies formf
in total space.
- right: (%, Integer) -> %
right(f, n)
right-justifies formf
within space of widthn
.
- root: % -> %
root(f)
creates a form for the square root of formf
.
- root: (%, %) -> %
root(f, n)
creates a form for then
th root of formf
.
- scripts: (%, List %) -> %
scripts(f, l)
wherel
is[sub, super, presuper, presub]
creates a form forf
with scripts on all 4 corners. Ifl
has less than 4 elements corresponding scripts are absent.
- SEGMENT: % -> %
SEGMENT(x)
creates the prefix form:x..
.
- SEGMENT: (%, %) -> %
SEGMENT(x, y)
creates the infix form:x..y
.
- semicolonSeparate: List % -> %
semicolonSeparate(l)
creates the form separating the elements ofl
by semicolons.
- slash: (%, %) -> %
slash(f, g)
creates a form for the horizontal fraction off
overg
.
- sub: (%, %) -> %
sub(f, n)
creates a form forf
subscripted byn
.
- sum: % -> %
sum(expr)
creates the form prefixingexpr
by a capital sigma.
- sum: (%, %) -> %
sum(expr, lowerlimit)
creates the form prefixingexpr
by a capital sigma with a lowerlimit.
- sum: (%, %, %) -> %
sum(expr, lowerlimit, upperlimit)
creates the form prefixingexpr
by a capital sigma with both alowerlimit
and upperlimit.
- super: (%, %) -> %
super(f, n)
creates a form forf
superscripted byn
.
- supersub: (%, List %) -> %
supersub(a, [sub1, super1, sub2, super2, ...])
creates a form with each subscript aligned under each superscript.
- tensor: (%, %) -> %
tensor(a, b)
creates a form for a tensorb
- vconcat: (%, %) -> %
vconcat(f, g)
vertically concatenates formsf
andg
.
- vconcat: List % -> %
vconcat(u)
vertically concatenates all forms in listu
.
- vspace: Integer -> %
vspace(n)
creates white space of heightn
.
- zag: (%, %) -> %
zag(f, g)
creates a form for the continued fraction form forf
overg
.