# [texhax] Conditional Splitting of a Table

Bindu Varghese bv at fluent.co.in
Wed Jul 28 13:42:30 CEST 2004

Hi,

I have table that runs into three pages in print.

So that the column headings appear on each page in print (pdf) I have
split the table into three.
However, I would like an un-split single table when I convert it to HTML.

I tried enclosing the intermediate \end{table} \begin{table} ....
commands in \begin{latexonly}\end{latexonly}
but this gives an error and the second half of the table disappears even
in the latex version.

Is there any other way this can be done?

\begin{table}[hbtp]
\caption{Long Table}
\label{split-tab}
\begin{tabular}{|p{1in}|p{1.5in}|} \hline
{\bf 1} & {\bf 2} \\ \hline
a & b \\ \hline
c & d \\ \hline
*\begin{latexonly} *
\end{tabular}
\end{table}
\begin{table}[hbtp]
\begin{tabular}{|p{1in}|p{1.5in}|} \hline
{\bf 1} & {\bf 2 } \\ \hline
*\end{latexonly} *
e & f \\ \hline
g & h \\ \hline
\end{tabular}
\end{table}

Thanks

Bindu