[tex4ht] Crossreferences/Labels in OpenOffice conversion

Michal Hoftich michal.h21 at gmail.com
Thu Mar 31 11:27:26 CEST 2016

Hi Georg

On Thu, Mar 31, 2016 at 10:37 AM, Hans Georg Schaathun
<georg+tex at schaathun.net> wrote:
> Hi,
> I have some experience using tex4ht to produce web pages.
> Trying an OpenOffice conversion for the first time, I find
> that labels/crossreferences do not work.

> In fact, there are two errors.  Citations (using bibtex)
> show empty brackets in the text.  They are correct in the
> bibliography.  Secondly, captions start with just the colon
> without the preceding Figure/Table and number.
> Furthermore the abstract text is missing.

The `nik.cls` doesn't seem to be included in TL. I've found some
version on Google though, so I can compile your document. It seems
that it redefines some default commands and environments, abstract
among them, so it will probably need some custom configuration.

But it seems that real problem is use of
`$\langle$georg at schaathun.net$\rangle$}` in the \author command, this
causes postprocessing with xtpipes to fail:

System call: java -classpath
/usr/local/texlive/2014/texmf-dist/tex4ht/bin/tex4ht.jar xtpipes -i
tpipes/ -o minimal-m2.4om minimal-m2.tmp
org.xml.sax.SAXParseException; lineNumber: 10; columnNumber: 34; The
element type "math:mrow" must be terminated by the matching end-tag

The xml needs postprocessing with xtpipes in order to fix all
references. When I removed the angles around mail addresses, it
worked. even the abstract. The author block seems weird though.

> I compile with
> latex article
> bibtex article
> latex article
> latex article
> latex article
> htlatex article.tex "xhtml,ooffice,bib-,mathml-" " -cmozhtf" "-coo"

I think

latex  article
bibtex article
mk4ht oolatex article

would be more than enough :)

> This gives me an OpenOffice document which I can open in libreoffice,
> and it is acceptable except for the missing labels and abstract.
> If I remove the ooffice option for htlatex, I get a correct
> HTML page with all the labels as they should be, even with
> the hyperlinks as they should.
> Is there a simple fix for this?  Any pointers at all?
> If a minimal(ish) example is useful, there is one here:
>   http://kerckhoffs.schaathun.net/test/minimal.tex
>   http://kerckhoffs.schaathun.net/test/minimal.odt
>   http://kerckhoffs.schaathun.net/test/minimal.html

It seems that we need also bibtex files :)

Best regards,

More information about the tex4ht mailing list