Документ взят из кэша поисковой машины. Адрес оригинального документа : http://comet.sai.msu.ru/webdesign/html-3.0/arrays.html
Дата изменения: Thu Dec 19 13:30:33 1996
Дата индексирования: Tue Oct 2 01:23:31 2012
Кодировка:
HTML Math

The ARRAY element

Permitted Context: %math
Content Model: one or more ROWs, each containing one or more ITEMs

The <ARRAY> element is used for LaTeX-like arrays. It can only be used within MATH elements. For example:

    a      a    ...   a
     11     12         1n
     
    :      :    ...    :

    a      a    ...   a
     n1     n2         nn

This is represented in HTML math by:

    <array>
     <row><item>a_11_<item>a_12_<item>&cdots;<item>a_1n_
     <row><item>&vdots;<item>&vdots;<item>&ddots;<item>&vdots;
     <row><item>a_n1_<item>a_n2_<item>&cdots;<item>a_nn_
    </array>

You can specify the "+", "-" or "=" characters as column separators:

    a   x   +  a   x   +  ...  +  a   x    =   b
     11  1      12  2              1n  n        1

    a   x   +  a   x   +  ...  +  a   x    =   b
     22  1      22  2              2n  n        2
 
    .............................................

    a   x   +  a   x   +  ...  +  a   x    =   b
     n2  1      n2  2              nn  n        n

This is represented by:

<array coldef="C+C+C+C=C">
 <row><item>a_11_x_1_<item>a_12_x_2_<item>&cdots;<item>a_1n_x_n_<item>b_1_
 <row><item>a_21_x_1_<item>a_22_x_2_<item>&cdots;<item>a_2n_x_n_<item>b_2_
 <row><item colspan=5>&dotfill;
 <row><item>a_n1_x_1_<item>a_n2_x_2_<item>&cdots;<item>a_nn_x_n_<item>b_n_
</array>

The number of rows and colums is left to the parser to work out for itself by counting the number of ROW elements, and the number of ITEMs on each row. This is slightly complicated by the possibility that some items may span several rows and columns. If a row has less than the expected number of items after accounting for merged items, the missing items are assumed to be on the righthandside, and should be treated as empty. The row count should be based on the ROW elements, and additional rows, implied by items spanning rows beyond the end of the array, should be ignored.

Permitted Attributes

ALIGN
By default, arrays are vertically positioned so that preceding and following expressions are aligned with the mid point of the array. The ALIGN attribute can take on of the following values:

TOP
The top row of the array is aligned with the same baseline as the preceding or following expression.
MIDDLE
The middle row of the array is aligned with the same baseline as the preceding or following expression. This is the default. If there are an even number of rows, the midpoint of the array is used instead.
BOTTOM
The bottom row of the array is aligned with the same baseline as the preceding or following expression.
COLDEF
By default the columns are centered. This attribute can be used to specify the horizontal alignment for each column with character string formed by one capital letter per column, with L for left, C for center and R to right alignment, e.g. "LLCR" for a 4 column table.

The COLDEF attribute can also be used to place a "+", "-" or "=" between the columns, e.g. coldef="C+C+C+C=C". Whitespace within the COLDEF attribute is ignored.

LDELIM
An entity or character for the left delimiter, e.g. ldelim="[" for a left square bracket or ldelim="|". The default is no delimiter.
RDELIM
An entity name or character for the right delimiter, e.g. rdelim="}" or rdelim="|". The default is no delimiter.
LABELS
The presence of this attribute has the same effect as TeX's bordermatrix command. The first row and column are separated from the rest of the array.

Example of a labelled array:

      i     j     k
      
 a  (X     X     X  )
    ( 11    21    31)    <array ldelim="(" rdelim=")" labels>
    (               )     <row><item>dummy<item>i<item>j<item>k
 b  (X     X     X  )     <row><item>a<item>X_11_<item>X_21_<item>X_31_
    ( 12    22    32)     <row><item>b<item>X_12_<item>X_22_<item>X_32_
    (               )     <row><item>c<item>X_31_<item>X_32_<item>X_33_
 c  (X     X     X  )    </array>
    ( 13    23    33)

Note: An item is always required for the first item of the first row, although its contents will be ignored for labelled arrays. This has been emphasized above with the value "dummy".