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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

According to this document and my own experience. MiKTeX 2.9's version of tex4ht is not working. Using MiKTeX 2.8's tex4ht does work, but is obviously not prefered. Does anybody know how to fix MiKTeX 2.9's version of tex4ht?

share|improve this question

Did you install it using the 'user' package manager?

I've had a similar problem myself and did a clean and re-install, this time making sure I added tex4ht-base with the 'admin' package manager.

share|improve this answer

On the current MiKTeX 2.9 (December 2012) tex4ht works nicely with several example documents. What is slightly misleading that the extra scripts, e.g. mzlatex and others are not installed. Instead it is recommend to use the wrapper mk4ht.

Have you tried mk4ht mzlatex example.tex? This calls tex4ht and should create the correct output.

share|improve this answer

TeX4ht does work under MiKTeX 2.9 for Windows 7, although equations are often converted into bitmap pictures rather than MathML, unless the option "html,mathml" is used with the htlatex command.

Here's what I did:

  1. Installed MiKTeX 2.9 with both miktex-tex4ht-bin-2.9 and miktex-tex4ht-base-2.9 installed with the package manager in administrator mode, on Windows 7.

  2. Created a test.tex file in E:\downloads, as follows:



    Hello there. This is a test of $x_i^2=3$, where $$\int_0^\infty f(x) = 1.$$


  3. Converted the TeX file into an HTML file with the following MS DOS commands. It is important to note that as htlatex accepts filenames but not pathnames, it is important to set the current directory to where the tex file resides. If a pathname were given for the test file, e.g., e:\downloads\test.tex, the error "undefined command sequence" would be produced.


    cd Downloads

    "C:\Program Files (x86)\MiKTeX 2.9\scripts\tex4ht\htlatex.bat" test.tex "html,mathml"

Incidentally, this summarizes a more general question I asked in TeX4ht (htlatex) on MiKTeX 2.9 to convert LaTeX into MathML, and then into Office MathML with Word 2010.

Note that the linked solution calls TeX4ht via htlatex with the option "html,mathml". Calling it via mk4ht requires that a Perl interpreter be installed on Windows.

There's a problem with a second conversion into OMML but you might not be affected by that if an HTML file with or without MML is all you want.

share|improve this answer

Your Answer


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.