Re: HTML 3.0 Process

Dave Raggett (dsr@hplb.hpl.hp.com)
Fri, 9 Sep 94 07:53:39 EDT

HTML Math:

Oops! I forgot to enclose our current math markup proposal.
This is still experimental, and we will soon get a better
feeling when the implementation shapes up.

--
Best wishes,

Dave Raggett

----------------------------------------------------------------------------- <!-- Here is my revised DTD for maths. It looks like it will be quite easy to parse and layout, as well as being deliberately easy to import LaTeX. HTML-Math would clearly benefit from SHORTREF definitions to cut down on typing. Indeed it may be practical to use _{..} and ^{..} as short forms for SUB and SUP in this way. More work is needed to test this out.

Dave Raggett Thu 8-Sep-94 15:00:21 -->

<![ %HTML.math [

<!ENTITY % formulae "#PCDATA|BOX|ABOVE|BELOW|ROOT|ARRAY|SUB|SUP|B">

<!-- Use &thinsp; &emsp; etc to control spacing. TeX entity names are supported as a convenience when converting from LaTeX. -->

<!ELEMENT MATH - - ((%formulae;)*, LABEL?)> <!ATTLIST MATH id ID #IMPLIED>

<!ELEMENT LABEL - - (#PCDATA)* -- equation labels --> <!ELEMENT B - - (%formulae;)+ -- bold text enhancement -->

<!-- Subscripts and Superscripts

<SUB> and <SUP> are used for subscripts and superscripts.

i j X <SUP>i</SUP>Y<SUP>j</SUP> is X Y

i.e. the space following the X disambiguates the binding. An alternative offering better control at a cost of verbosity is:

<!ATTLIST (SUB|SUP) ALIGN (left|center|right) #IMPLIED> -->

<!ELEMENT (SUB|SUP) - - (%formulae;)+> <!ATTLIST (SUB|SUP) ALIGN (left|center|right) #IMPLIED>

<!-- The BOX element acts as brackets. Delimiters are optional and stretch to match the height of the box. The OVER element is used when you want a line between numerator and denominator. This line is suppressed with the alternative ATOP element. You can get oversize delimiters with the SIZE attribute. Delimiters are specified as a pair of characters, or as a space separated pair of string or entity names, e.g. "&lceil;&rceil;". You can suppress one of the delimiters by using the '.' character.

1 + X <BOX>1 + X<OVER>Y</BOX> is _______ Y

a + b <BOX>a + b<ATOP>c - d</BOX> is c - d

<BOX delim="(]">a</BOX> is (a]

<BOX delim="|| ||">a</BOX> is || a ||

The delimiters can also be expressed using the LEFT and RIGHT elements as in:

<BOX>[<LEFT>x + y<RIGHT>]</BOX> is [ x + y ]

This is useful with definite integrals when you want the integral sign to stretch to match the integrand, e.g.

<BOX>&int;<SUB>0</SUB><SUP>N</SUP><LEFT>f(x) dx</BOX>

Note that the default size of integral and related symbols is sufficient for most needs.

--> <!ELEMENT BOX - - ((%formulae;)*, (LEFT, (%formulae;)+), ((OVER|ATOP), (%formulae;)+), (RIGHT, (%formulae;)+))> <!ATTLIST BOX delim CDATA #IMPLIED -- optional stretchy delimiters -- size (normal|medium|large|huge) normal -- oversize delims -->

<!ELEMENT (OVER|ATOP|LEFT|RIGHT) - O (EMPTY)> <!ELEMENT SCOPE O O (%formulae;)*>

<!-- Horizontal line drawn ABOVE contents The symbol attribute allows authors to supply an entity name for an arrow symbol etc. --> <!ELEMENT ABOVE - - (%formulae;)+> <!ATTLIST ABOVE symbol ENTITY #IMPLIED>

<!-- Horizontal line drawn BELOW contents The symbol attribute allows authors to supply an entity name for an arrow symbol etc. --> <!ELEMENT BELOW - - (%formulae;)+> <!ATTLIST BELOW symbol ENTITY #IMPLIED>

<!-- Roots - default to square root --> <!ELEMENT ROOT - - (%formulae;)*> <!ATTLIST ROOT root CDATA #IMPLIED -- e.g. "3" for cube root -->

<!-- LaTeX like arrays. The coldef attribute specifies a single letter for each column, which also determines how the column should be aligned, e.g. coldef"=ccc"

"l" left "c" center "r" right

The DELIM attribute behaves the same as for BOX. When the LABELS attribute is present, the array is displayed with the first row and the first column as labels displaced from the other elements. In this case, the first element of the first row should normally be left blank.

Use &vdots; &vdots; and &ddots; for vertical, horizontal and diagonal ellipsis dots. Use &dotfill; to fill an array cell with horizontal dots. --> <!ELEMENT ARRAY - - (AROW)+> <!ATTLIST ARRAY coldef CDATA #REQUIRED delim CDATA #IMPLIED -- optional stretchy delimiters -- labels (labels) #IMPLIED -- TeX's \bordermatrix style -->

<!ELEMENT AROW - O (ITEM)*> <!ELEMENT ITEM - O (%formulae;)*> <!ATTLIST ITEM align CDATA #IMPLIED -- overide coldef alignment -- colspan NUMBER 1 -- merge columns as per TABLE -- rowspan NUMBER 1 -- merge rows as per TABLE --> ]]>