Problems building article with oolatex and hyperref [duplicate]

I'm getting into a bit of trouble, trying to convert a Latex article to OpenOffice. First of all, I'm using Ubuntu 11.04, with a texlive 2011 installation (installed via tlmgr).

EDIT1: There is now a MWE based on the test case given (which is a shell script) - see at end of post

Here is the test case I'm working with:

mkdir tmp && cd tmp
unzip latex_singlecolumn_2010.zip
cd Single-column/Single-column/
ln -s ../../singlecol-new.cls . # symlink class file in top dir

# make a copy to a test latex file:
cp IJDMB-4$$4$$07-MullahandEguchi.tex mytemp.tex
# hack temp latex file; end of its preamble at "\spaceskip=3.5pt..." line
sed -ri 's_^\\spaceskip(.*)_\
\\spaceskip\1\
\
\\usepackage{times}\
\\usepackage{url}\
\\usepackage{breakurl}\
% hack for math in sections:\
\\let\\oldsection\\section\
\\def\\tmpl{\\oldsection[]}\
\\let\\section\\tmpl\
\
_' mytemp.tex

# do a test run
pdflatex mytemp.tex
# OK: Output written on mytemp.pdf (12 pages, 249090 bytes).


Good enough for now - but I'd like to use oolatex now on this doc; and since there's no oolatex in texlive, I try this:

mk4ht oolatex mytemp.tex


... and the process fails at:

...
Package hyperref Message: Driver: htex4ht.
...
! Undefined control sequence.
{/burl@stx null def /BU.S { /burl@stx null def } de...
l.306 }


Now, I found somewhere the line \def\headerps@out#1{\special{! #1}}%, and if I add it to my preamble here:

...
\spaceskip=3.5pt plus1.47pt minus0.77pt \makeatother

\makeatletter
\makeatother

\usepackage{times}
...


then it seems to get registered - and if I try to build again, the process fails with another error:

\citep{Basu98}.

\begin{thebibliography}{10}

\bibitem[\protect\citeauthoryear{Basu et~al.}{1998}]{Basu98}
Basu, A., Harris, I.R., Hjort, N.L. and Jones, M.C. (1998)
Robust and efficient estimation by minimising a density power
divergence', {\it Biometrika}, Vol.~85, pp.549--559.

\bibitem[\protect\citeauthoryear{Zeng}{1994}]{Zeng94}
Zeng, Z.B. (1994) Precision mapping of quantitative trait
loci', {\it Genetics}, Vol.~136, \h{pp.1457--1468}.

\end{thebibliography}

\end{document}

-

marked as duplicate by krlmlr, Peter Jansson, Guido, Jesse, Martin SchröderFeb 18 '14 at 11:38

Ah darn it - I should have looked better ;)

Well, if we look at the second error more closely:

! Undefined control sequence.
<argument> ...\a:mathml columnlines="\columnlines
" \a:mathml equalcolumns="...


... it is quite noticeable, due to the linebreak, that \columnlines is the problem; so I searched a bit more on that - and it turns out it's a know bug from 2009: [tex4ht] Bug Report: oolatex broken:

That was due to the uninialized macro, \columnlines. A quick and dirty trick will be to insert the following line at the top of your document:

\let\columnlines\empty

The bug will be fixed in the next release of TeX4ht which is not far off.

So, as noted in the post, just add \let\columnlines\empty right after the \def\headerps@out part - and finally, mk4ht oolatex ... passes without a problem :) (I'm noting however, that math is rendered as images in the .odt, and pagination is not preserved - as page margins (and apparently font sizes) are not preserved...).

Well, hope this helps others too,
Cheers!

EDIT: Darn it - and it turns out, the \columnlines thing is essentially a duplicate here: mathmode - Latex to ODF/DOC using mk4ht oolatex failing on equation arrays - TeX - LaTeX - Stack Exchange ... ah, nevermind :)

-