When using newfloat to create a new type of float, tex4ht swallows the first line of text inside the float when it converts to .odt format.

In the MWE, the new float is example; this works the same as table when compiling with pdflatex, but tex4ht treats the two environments differently in the.odt.




See example~\ref{ex:music}.

% First line will disappear in ODT
Explanatory text.

More explanatory text.

\caption{Musical example}

See table~\ref{table}.

% All text will appear in ODT
Explanatory text.

More explanatory text.



PDF output from pdflatex file (twice):

enter image description here

ODT output from pdflatex file && mk4ht oolatex file && libreoffice file.odt

enter image description here

  • The same thing happens if I use the float package. – musarithmia Mar 28 '16 at 20:10

Did you ever try plastex?

call with

 plastex --theme minimal --sec-num-depth 0 --split-level 0 <filename>.tex

I have tried it, but I cannot get an odt file directly. I opened the html file via open office....currently. enter image description here

Have a look...

  • 1
    I haven't: does it produce better results? – musarithmia Apr 3 '16 at 2:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.