# tex4ht problems with footnotes

I have a problem with footnotes and tex4ht. The following document has a wrong next pointer in subsection 1 and a bad previous pointer in subsection 3:

\documentclass{book}
\begin{document}
\chapter{chap}
\section{A}
\subsection{aa}
xxx\footnote{A}yyy
\subsection{ab}
text
\subsection{ac}
text
\end{document}


The command I use to generate html files is: htlatex main xhtml,4,next. To reproduce: open main.html and click on 1.1.1 "aa" and then click on "next" to go to 1.1.3 (instead of 1.1.2).

When running the above command a second time, everything works fine. What is the correct way to get a sane document at the first run? That is with a directory that contains only the .tex file and no intermediate files?

-
Just an observation: I don't know about tex4ht, but I just rendered your example to html using plastex and it behaves correctly on the first run. plastex.sourceforge.net –  Tim A Mar 30 '12 at 14:55
I took the liberty to open a bug at the tex4ht bug database. I will report here any informations from the devs others than a bug fix. –  ppr Oct 25 '13 at 14:25