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 * gcreates the equivalent infix form.
- +: (%, %) -> %
f + gcreates the equivalent infix form.
- -: % -> %
- fcreates the equivalent prefix form.
- -: (%, %) -> %
f - gcreates the equivalent infix form.
- /: (%, %) -> %
f / gcreates the equivalent infix form.
- <=: (%, %) -> %
f <= gcreates the equivalent infix form.
- <: (%, %) -> %
f < gcreates the equivalent infix form.
- >=: (%, %) -> %
f >= gcreates the equivalent infix form.
- >: (%, %) -> %
f > gcreates the equivalent infix form.
- ^: (%, %) -> %
f ^ gcreates the equivalent infix form.
- and: (%, %) -> %
f and gcreates 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 ofnandm.
- blankSeparate: List % -> %
blankSeparate(l)creates the form separating the elements oflby blanks.
- box: % -> %
box(f)enclosesfin a box.
- brace: % -> %
brace(f)creates the form enclosingfin braces (curly brackets).
- brace: List % -> %
brace(lf)creates the form separating the elements oflfby commas and encloses the result in curly brackets.
- bracket: % -> %
bracket(f)creates the form enclosingfin square brackets.
- bracket: List % -> %
bracket(lf)creates the form separating the elements oflfby commas and encloses the result in square brackets.
- center: % -> %
center(f)centers formfin total space.
- center: (%, Integer) -> %
center(f, n)centers formfwithin space of widthn.
- coerce: % -> OutputForm
from CoercibleTo OutputForm
- commaSeparate: List % -> %
commaSeparate(l)creates the form separating the elements oflby commas.
- convert: % -> InputForm
from ConvertibleTo InputForm
- differentiate: (%, NonNegativeInteger) -> %
differentiate(f, n)creates a form for thenth derivative off, e.g.f',f'',f''',"fsuperiv“.
- dot: % -> %
dot(f)creates the form with one dot overhead.
- dot: (%, NonNegativeInteger) -> %
dot(f, n)creates the formfwithndots overhead.
- elt: (%, List %) -> %
elt(op, l)creates a form for application ofopto list of argumentsl.
- empty: () -> %
empty()creates an empty form.
- exquo: (%, %) -> %
exquo(f, g)creates the equivalent infix form.
- hconcat: (%, %) -> %
hconcat(f, g)horizontally concatenate formsfandg.
- hconcat: List % -> %
hconcat(u)horizontally concatenates all forms in listu.
- hspace: Integer -> %
hspace(n)creates white space of widthn.
- infix?: % -> Boolean
infix?(op)returnstrueifopis an infix operator, andfalseotherwise.
- infix: (%, %, %) -> %
infix(op, a, b)creates a form which prints as: aopb.
- infix: (%, List %) -> %
infix(f, l)creates a form depicting then-ary application of infix operationfto a tuple of argumentsl.
- int: % -> %
int(expr)creates the form prefixingexprwith an integral sign.
- int: (%, %) -> %
int(expr, lowerlimit)creates the form prefixingexprby an integral sign with a lowerlimit.
- int: (%, %, %) -> %
int(expr, lowerlimit, upperlimit)creates the form prefixingexprby an integral sign with both alowerlimitand upperlimit.
- label: (%, %) -> %
label(n, f)gives formfan equation labeln.
- latex: % -> String
from SetCategory
- left: % -> %
left(f)left-justifies formfin total space.
- left: (%, Integer) -> %
left(f, n)left-justifies formfwithin 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)printsswithout string quotes. Note:messagePrint(s)is equivalent toprint message(s).
- not: % -> %
not fcreates the equivalent prefix form.
- or: (%, %) -> %
f or gcreates 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 offoverg.
- overbar: % -> %
overbar(f)creates the formfwith an overbar.
- overlabel: (%, %) -> %
overlabel(x,f)creates the formfwith"xoverbar” over the top.
- paren: % -> %
paren(f)creates the form enclosingfin parentheses.
- paren: List % -> %
paren(lf)creates the form separating the elements oflfby commas and encloses the result in parentheses.
- pile: List % -> %
pile(l)creates the form consisting of the elements oflwhich 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 offto a tuple of arguments given by listl.
- presub: (%, %) -> %
presub(f, n)creates a form forfpresubscripted byn.
- presuper: (%, %) -> %
presuper(f, n)creates a form forfpresuperscripted byn.
- prime: % -> %
prime(f)creates the formffollowed by a suffix prime (single quote).
- prime: (%, NonNegativeInteger) -> %
prime(f, n)creates the formffollowed bynprimes.
- print: % -> Void
print(u)prints the formu.
- prod: % -> %
prod(expr)creates the form prefixingexprby a capitalpi.
- prod: (%, %) -> %
prod(expr, lowerlimit)creates the form prefixingexprby a capitalpiwith a lowerlimit.
- prod: (%, %, %) -> %
prod(expr, lowerlimit, upperlimit)creates the form prefixingexprby a capitalpiwith both alowerlimitand upperlimit.
- quo: (%, %) -> %
f quo gcreates the equivalent infix form.
- quote: % -> %
quote(f)creates the formfwith a prefix quote.
- rarrow: (%, %) -> %
rarrow(f, g)creates a form for the mappingf -> g.
- rem: (%, %) -> %
f rem gcreates the equivalent infix form.
- right: % -> %
right(f)right-justifies formfin total space.
- right: (%, Integer) -> %
right(f, n)right-justifies formfwithin space of widthn.
- root: % -> %
root(f)creates a form for the square root of formf.
- root: (%, %) -> %
root(f, n)creates a form for thenth root of formf.
- scripts: (%, List %) -> %
scripts(f, l)wherelis[sub, super, presuper, presub]creates a form forfwith scripts on all 4 corners. Iflhas 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 oflby semicolons.
- slash: (%, %) -> %
slash(f, g)creates a form for the horizontal fraction offoverg.
- sub: (%, %) -> %
sub(f, n)creates a form forfsubscripted byn.
- sum: % -> %
sum(expr)creates the form prefixingexprby a capital sigma.
- sum: (%, %) -> %
sum(expr, lowerlimit)creates the form prefixingexprby a capital sigma with a lowerlimit.
- sum: (%, %, %) -> %
sum(expr, lowerlimit, upperlimit)creates the form prefixingexprby a capital sigma with both alowerlimitand upperlimit.
- super: (%, %) -> %
super(f, n)creates a form forfsuperscripted 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 formsfandg.
- 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 forfoverg.