[Tex/LaTex] biblatex & TeX4HT: citations in footnotes = missing \begin{document}

biblatexcitingfootnoteshtmltex4ht

the following code, which I'm trying to run through TeX4HT and biber in order to create an .odt file, results in a »missing \begin{document}« error, pointing to the aux file. Something about the citation in the footnote seems to cause trouble. No trouble occurs when

  • I'm creating a pdf using ordinary pdflatex or lualatex, or
  • [which is the most interesting part] a biblatex style other than ›authoryear‹, like ›numeric‹, or
  • I remove the citation from the footnote

Unfortunately, I can't do without any of these three in this case, so I'd appreciate any thoughts on this issue. Thanks a lot! It might have to do with the biblatex adaption of tex4ht, so maybe what'S required here is a manual definition of a missing command, similar to what Ulrike replied to a different but related question.

PS: same problem occurs with \footcite{BoS99}; it also occurs when creating an .html rather than an .odt (option xhlatex).

PPS: I'm using
mk4ht oolatex [filename]
biber [filename]
mk4ht oolatex [filename]

\begin{filecontents}{testbib.bib}
@BOOK{BoS99,
  author = {Bowker, Geoffrey and Star, Susan Leigh},
  year = {1999},
  title = {Sorting Things Out: Classification and its Consequences},
  address = {Cambridge, MA},
  publisher = {MIT Press}
}
\end{filecontents}

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[backend=biber,style=authoryear]{biblatex}
\bibliography{testbib.bib}
\begin{document}
hat einer und gemacht zu werden%
\footnote{um von Buch wollen \cite{BoS99}}
\end{document}

error message:

! LaTeX Error: Missing \begin{document} in `'.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...

l.3 \abx@aux@fnpage{1}{1}

contents of the aux file:

\relax
\ifx\rEfLiNK\UnDef\gdef \rEfLiNK#1#2{#2}\fi
\abx@aux@fnpage{1}{1}

Best Answer

Okay, some further research turned up a few interesting things about tex4ht and its relationship with biblatex, plus a provisional fix for my problem. In a nutshell: the author of tex4ht passed away in 2009, and even though Karl Berry et al. took over maintenance, it is not yet fully compatible with the biblatex versions released since then. But they're working on it, and TeXLive 2012 already contains a more up-to-date version of biblatex.4ht (the file that's in charge of the interaction between the two). However, even that version doesn't contain what's necessary for my example to work. I found what I need, though, in an unofficial, anonymous version of biblatex.4ht mentioned here.

So what follows is basically a personal bugfix for my specific problem -- until tex4ht has regained full compatibility with biblatex. I think I should submit the issue to tex4ht's bug database, as it doesn't seem to be in there yet.

\begin{filecontents}{testbib.bib}
@BOOK{BoS99,
  author = {Bowker, Geoffrey and Star, Susan Leigh},
  year = {1999},
  title = {Sorting Things Out: Classification and its Consequences},
  address = {Cambridge, MA},
  publisher = {MIT Press}
}
\end{filecontents}

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[backend=biber,style=authoryear]{biblatex}
\bibliography{testbib.bib}
\makeatletter                    %[!]
\let\abx@aux@fnpage\@gobbletwo   %[!]
\makeatother                     %[!]
\begin{document}
hat einer und gemacht zu werden%
\footnote{um von Buch wollen \cite{BoS99}}
\end{document}