Some types of equations
- - - has been used for displayed
code, to make sure no typos have crept in.
Other comments for this appear below the tables.
(Watch out for poor alignment with and .)
(This is safer.)
type 4: |
|
## |
= |
##### |
|
|
= |
## |
+ |
### |
|
| | |
+ |
##### |
|
(4) |
type 4: |
|
## |
= |
##### |
|
|
= |
## |
+ |
### |
|
| | |
+ |
##### |
|
(4) |
Naturally, there was the question of whether CSS boxes or
old-fashioned tables ought to be used to set equations. For now,
I am sticking with tables because they appear to be giving me better control
of horizontal and vertical alignment. That is not to say I am perfectly
satisfied with them, and I might get rid of the tables
if CSS boxes can be made to work better.
There were two relatively easy ways to do (note - equation - number) with
tables.
(1) Table-in-table: The essential structure is
( text-align:left ) |
( often a string of td's ) |
|
( text-align:right ) |
and the result is:
( text-align:left ) |
( often a string of td's ) |
|
( text-align:right ) |
(2)Push-and-shove: The essential structure is
( push ) |
( often a string of td's ) |
( shove ) |
and the result is
( push ) |
( often a string of td's ) |
( shove ) |
The basic idea for the second style is here, at
mathrec.org.
The outer cells are each set to fill half of the viewport, and that causes
the table to center the inner cell and fill the viewport at the same time.
(Wish I had thought of that!) The identifiers, lft, rgt and ctr, are defined in
the stylesheet, eqns.css, and they set text-align:left, right and center.
Either way,
there is a problem with old browsers (Netscape 4) that don't pay attention
to white-space:nowrap. They can squeeze the equation into a column rather
than a row. The fixup, use <td nowrap> whenever it
matters, is easy and only a little bit irritating. In
<td nowrap> <table> the nowrap appears to be
inherited, and some of the examples use that.
One more ugly little bug: after a table with a specified width or a
table that contains a <td> with a specified width, Netscape 4 forgets what font
it was using, and it may forget other things too. The easy, but truly irritating
fixup there was to make every such table an out-of-body experience.
Here again are the ingredients: