Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am trying to convert a LaTeX document to opendocument with TeX4ht (on Windows/MiKTeX 2.9 32-bit). I am using the following command (as suggested on the TeX4ht website):

D:\latex>htlatex mwe.tex "xhtml,ooffice" "ooffice/! -cmozhtf" "-coo -cvalidate"

My mwe.tex reads:

\documentclass{minimal}
\begin{document}
Hello World
\end{document}

The LaTeX calls of htlatex.bat are running fine, but the tex4ht call is giving an error Illegal storage address:

D:\latex>tex4ht mwe.tex  -i/tex4ht/ht-fonts/"ooffice/! -cmozhtf" -ewin32/tex4ht.env
----------------------------
tex4ht.c (2010-12-16-08:39 Windows MiKTeX)
tex4ht mwe.tex
  -i/tex4ht/ht-fonts/ooffice/!
  -cmozhtf
  -ewin32/tex4ht.env
(C:/Program Files (x86)/MiKTeX 2.9/tex4ht/base/win32/tex4ht.env)
(C:/Program Files (x86)/MiKTeX 2.9/fonts/tfm/public/amsfonts/cmextra/cmbsy5.tfm)

(C:/Program Files (x86)/MiKTeX 2.9/tex4ht/ht-fonts/alias/cm/cmbsy.htf)
Searching `cmsy.htf' for `cmbsy5.htf'
(C:/Program Files (x86)/MiKTeX 2.9/tex4ht/ht-fonts/unicode/cm/cmsy.htf)
--- error --- Illegal storage address    

D:\latex>t4ht mwe.tex "-coo -cvalidate" -ewin32/tex4ht.env
----------------------------
t4ht.c (2010-12-16-08:47 MiKTeX)
t4ht mwe.tex
  -coo
  -cvalidate
  -ewin32/tex4ht.env
(C:/Program Files (x86)/MiKTeX 2.9/tex4ht/base/win32/tex4ht.env)
Entering mwe.lg
Entering mwe.css
Entering mwe.tmp

cmbsy.htf and cmsy.htf are at the designated locations. So what is wrong here?

I have found this workaround by Ulrike Fischer (in German), but my tex4ht.env already contains relative paths (tex4ht.env is dated 12 Jul 2011 and the workaround is from 17 Jun 2011, so I guess that problem is fixed already) and I do not have a oolatex.bat in C:\Program Files (x86)\MiKTeX 2.9\scripts\tex4ht. The htlatex.bat in the scripts folder reads:

latex %5 \makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode %2.a.b.c.\input  %1
latex %5 \makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode %2.a.b.c.\input  %1
latex %5 \makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode %2.a.b.c.\input  %1
tex4ht %1  -i/tex4ht/ht-fonts/%3 -ewin32/tex4ht.env
t4ht %1 %4 -ewin32/tex4ht.env
share|improve this question
    
I get the same error with your MWE, and with another MWE: tex.stackexchange.com/questions/119012/… –  mmj Jun 14 '13 at 17:55
add comment

1 Answer

The first problem here is that the minimal is obviously not supported by tex4ht conversion to odt, there are probably some missing configurations. But minimal doc class isn't recommended for normal usage, so it should be no issue. Just use article document class.

The second problem is with your command line, it is better to use

mk4ht oolatex mwe

instead of your version

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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