# [tex4ht] Conversion to ODT missing several features

Michal Hoftich michal.h21 at gmail.com
Wed Jan 9 14:33:32 CET 2019

Hi Paulo,

> Is this something I should put in a tex4ht config file?
>

No, it would need to be included in the main TeX file, so it is not an
option. I've found another issue with the angled brackets around the
mail. LibreOffice seems to render it incorrectly even if correct
characters are used, it seems like a bug when single math operator is
used. I think we experienced this bug in the past already.

It would be better to use \textless and \textgreater instead, it it is possible.

> Probably not unless I preprocess the output of the generator before
> sending it into tex4ht. What would custom configurations look like?
> Would these be tex macros?
>

Save the following code as myconfig.cfg:

%%%%%%%%%%%%%%
\Preamble{xhtml}
\renewcommand\RktVal[1]{\HCode{<text:span
text:style-name="RktVal">}#1\HCode{</text:span>}}
\renewcommand\RktRes[1]{\HCode{<text:span
text:style-name="RktRes">}#1\HCode{</text:span>}}
\NewConfigureOO{RktVal}
\NewConfigureOO{RktRes}
\ConfigureOO{RktVal}{<style:style style:name="RktVal"
style:family="text"><style:text-properties fo:color="\#FF6600"
/></style:style>}
\ConfigureOO{RktRes}{<style:style style:name="RktRes"
style:family="text"><style:text-properties fo:color="\#FF0066"
/></style:style>}
\begin{document}
\EndPreamble
%%%%%%%%%%%%%%

It redefines the \RktVal and \RktRes to produce colored text. The RGB
color can be specified in the \ConfigureOO command, as the fo:color
attribute.

The configuration file can be requested using -c option for make4ht:

make4ht -uf odt -c myconfig.cfg test.tex

> Yes, I did some research and came to the same conclusion. It doesn't
> seem there's support for margin notes in OpenDocument (I am surprised!
> to say the least).
>

There seem to be a trick to do that using frames, but it seems bit fragile.