verbatim Text is not expanding when using htlatex. How to turned on? My MWE is:

\def\myverbtext#1{{\bfseries #1}}
This is the sample paragraph.

This is the \myverbtext{verbatim} text.

\alpha + \beta = \gamma

\myverbtext{\rho} \alpha + \beta = \gamma


My tex4ht command is:

htlatex file.tex

  • In verbatim mode nothing is expanded
    – egreg
    Mar 14, 2016 at 9:55
  • @egreg: Thanks for your reply and it's possible any other way?
    – Balaji
    Mar 14, 2016 at 9:58
  • Please, be more specific about your aim.
    – egreg
    Mar 14, 2016 at 10:00
  • @egreg: I would like to convert LaTeX to DocX Conversion for official usage. All the LaTeX equations should be convert to MathType OLE Format. So i have decided to use htlatex without LaTeX equations changing.
    – Balaji
    Mar 14, 2016 at 10:07
  • @Balaji you should try to convert the document to odt with mk4ht oolatex and then convert it to docx using LibreOffice or Pandoc, maybe.
    – michal.h21
    Mar 14, 2016 at 10:35

1 Answer 1


What OP really wants is to convert LaTeX document with equations to DOCX format with math in Mathtype format. It is possible, but not straight forward, we need several conversion steps for best results:

  1. compile the document to OpenDocument format

    mk4ht oolatex filename

result of the compilation is filename.odt file.

  1. While current Word can open it, it is better to do some cleanup with LibreOffice, Word has sometimes problems with math in ODT produced by tex4ht. So open the filename.odt in LibreOffice and save it as filename.docx.

  2. Open filename.docx in Word, and from Mathtype bookmark select Convert Equations button:

enter image description here

Select all equation types to convert and select the whole document:

enter image description here

All your equations should be converted to Mathtype now

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .