Prev Up Next
Go backward to 7.6 Figures and other floating bodies
Go up to 7 Carrying on
Go forward to 7.8 Simulating typed text

7.7 Lining it up in columns

The tabular environment is available in Hyperlatex.

If you use \htmllevel{html2}, then Hyperlatex has to display the table using preformatted text. In that case, Hyperlatex removes all the & markers and the \\ or \\* commands. The result is not formatted any more, and simply included in the HTML-document as a "preformatted" display. This means that if you format your source file properly, you will get a well-formatted table in the HTML-document--but it is fully your own responsibility. You can also use the \hline command to include a horizontal rule.

If you use any \htmllevel higher than html2, then Hyperlatex can use tags for making tables. The argument to tabular may only contain the specifiers |, c, l, and r. The | specifier is silently ignored. You can force borders around your table (and every single cell) by using \htmlattributes*{TABLE}{BORDER} immediately before your tabular environment. You can use the \multicolumn command. \hline is understood and ignored.

The \htmlcaption has to be used right after the \begin{tabular}. It sets the caption for the HTML table. (In HTML, the caption is part of the tabular environment. However, you can as well use \caption outside the environment.)

If you have made the & character non-special, you can use the macro \htmltab as a replacement.

Here is an example:

    \begin{table}[htp]
    \T\caption{Keyboard shortcuts for \textit{Ipe}}
    \begin{center}
    \begin{tabular}{|l|lll|}
    \htmlcaption{Keyboard shortcuts for \textit{Ipe}}
    \hline
                & Left Mouse      & Middle Mouse  & Right Mouse      \\
    \hline
    Plain       & (start drawing) & move          & select           \\
    Shift       & scale           & pan           & select more      \\
    Ctrl        & stretch         & rotate        & select type      \\
    Shift+Ctrl  &                 &               & select more type \T\\
    \hline
    \end{tabular}
    \end{center}
    \end{table}
The example is typeset as follows:
Keyboard shortcuts for Ipe
Left Mouse Middle Mouse Right Mouse
Plain (start drawing) move select
Shift scale pan select more
Ctrl stretch rotate select type
Shift+Ctrl select more type

Note that the netscape browser treats empty fields in a table specially. If you don't like that, put a single ~ in that field.

A more complicated example:

type style
smart red short
rather silly puce tall

To create certain effects you need to employ the \htmlattributes command:

gnats gram $13.65
each .01
gnu stuffed 92.50
emu 33.33
armadillo frozen 8.99

Otfried Schwarzkopf, September 2, 1997

Prev Up Next