In book style (and no doubt many others), tex4ht generates an <hr> before and after floats. While I don't pretend to understand the mechanics, it looks like it is created by this snippet from the html4.4ht file:
\Configure{float}
   {\ifOption{refcaption}{}{\csname par\endcsname\ShowPar \leavevmode}}
   {\:xhtml{\IgnorePar\EndP}\HCode{<hr class="float"\xml:empty><div
     class="float"\Hnewline>}}
   {\ifvmode \IgnorePar \fi\EndP
    \HCode{</div><hr
        class="endfloat" />}\csname par\endcsname\ShowPar}

I tried adding the above code, minus the <hr ..> tags to my cfg, but then my latex file fails to run through tex4ht. I get a "Missing $ inserted" error when a \begin{center} is encountered after \begin{table}. Here's a simple example:
\documentclass{book}
\begin{document}
\chapter{Simple Example}
\begin{table}
\begin{center}
\hbox{
\begin{tabular}{|l|c|c|}\hline
entry1&entry2&entry3\\
entry4&entry5&entry6\\ \hline
\end{tabular}}
\end{center}
\caption{a caption}
\end{table}
\end{document}

I then tried just placing an unmodified copy of the \Configure{float} ... in my .cfg file and still get the error, so I guess I'm not supposed to put that chunk of code into my .cfg

So, how do I achieve my goal?
Thanks.

Reply via email to