> From: Roger Hui
>
> http://www.jsoftware.com/jwiki/Essays/Boxed_Array_Display#HTML
> now incorporates the HTML ideas described by Ric Sherlock
> and are much simpler as a consequence.
The main issue with the current output is that the <style> tag info is only
required once per page, not once per table. In fact it is invalid HTML 4.01 to
include the <style> tag in the body of the page (although the browsers I've
tried seem to honour it).
I'd suggest that the contents of the JARRAYSTYLE noun not be incorporated into
the output of thh, but a note to the effect that it should be added to the page
header, or the CSS associated with the page.
It is possible to simplify the HTML further by replacing the individual divs
that currently wrap the contents of each table cell with one <div> of
class="jarray" that wraps the whole table.
This is the appropriate CSS info for that case.
JARRAYSTYLE=: 0 : 0
<style type="text/css">
.jarray {font-family:monospace;}
.jarray table {border-collapse:collapse;}
.jarray table td {border:solid black thin;vertical-align: top;padding:0.3em;}
.jarray table tr.spacer td {border:none;}
</style>
)
Here is the output (whitespace manually added for clarity) of my code with the
appropriate modifications. I'm sure the same should be possible with yours.
<div class="jarray"><table><tbody>
<tr>
<td></td>
<td>0</td>
<td>0 1</td></tr>
<tr><td>0 1 2</td>
<td>0 1 2 3</td>
<td>0 1 2 3 4</td></tr>
<tr class=spacer><td> </td></tr>
<tr>
<td>
<table><tbody>
<tr><td>a e<br>fghij</td></tr></tbody>
</table></td>
<td></td>
<td>0</td></tr>
<tr>
<td>0 1</td>
<td>0 1 2</td>
<td>0 1 2 3</td></tr></tbody></table>
</div>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm