ARRAY
TagARRAY
tag is designed for rendering matrices, though
it can also be pressed into service for a number of other tabular
alignment tasks.
The syntax of the ARRAY
tag is illustrated in the
following example:
<ARRAY LDELIM=( RDELIM=)> <ROW><ITEM>1</ITEM><ITEM>z^2^</ITEM></ROW> <ROW><ITEM>0</ITEM><ITEM>1</ITEM></ROW> </ARRAY>
Output:
The </ITEM>
and </ROW>
tags are
optional.
The LDELIM
and RDELIM
parameters are
optional. The same effect can also be achieved by wrapping a matrix
in a BOX
tag. WebEQ accepts any character as the value
of the LDELIM
or RDELIM
parameters. Of
course, most of them do not stretch vertically, and give nonsense
results. The stretchy delimiters are [,],(,),{,}, and |.
The ARRAY
tag also accepts an optional ALIGN
parameter which accepts the values TOP
,
BOTTOM
and MIDDLE
. The default is
MIDDLE
.
<ARRAY LDELIM=[ RDELIM=] ALIGN=BOTTOM> <ROW><ITEM>1<ITEM>2<ITEM>3<ROW><ITEM>4<ITEM>5<ITEM>6</ARRAY> <ARRAY LDELIM=[ RDELIM=] ALIGN=TOP> <ROW><ITEM>1<ITEM>2<ROW><ITEM>3<ITEM>4<ROW><ITEM>5<ITEM>6</ARRAY> =<ARRAY LDELIM=[ RDELIM=]> <ROW><ITEM>14<ITEM>32<ROW><ITEM>32<ITEM>77</ARRAY>
Output:
The most powerful parameter the ARRAY
tag recognizes is
the optional COLDEF
parameter. The value of
COLDEF
is a formatting string that determines the
alignment of the array columns, and sets optional column separator
characters. The alignment characters are L
,
R
and C
for flush left, flush right and
centered alignment. The valid separators are +,- and =.
F(x) = <ARRAY LDELIM={ COLDEF=CLL><ROW><ITEM>x<ITEM><T>if</T><ITEM>x>0 <ROW><ITEM>x^2^<ITEM><T>if</T><ITEM>x>0</ARRAY>
Output:
<ARRAY COLDEF=C+C=C><ROW><ITEM>3x<ITEM>4y<ITEM>16 <ROW><ITEM>-2x<ITEM>7y<ITEM>-2</ARRAY>
Output:
Comments to:
rminer@geom.umn.edu
Created: Fri Sep 8 11:39:00 1995 ---
Last modified: Thu Mar 28 11:37:59 1996