I've tried with:



This is for test $a+b=c$

This is for test $d+e=f$


My expectation is, I need to convert both the inline math and display math into either outlined EPS format or SVG format separately, is it possible by executing htlatex? Please advise

1 Answer 1


In general, picture math is the worst option for the accesibility, it also doesn't look really well. It is better to use MathML with MathJax rendering, or just MathJax. Both of these options are supported by TeX4ht. If you really want to use pictures, you can use various options that starts with pic-. For example, for inline math, you can use pic-m, and for the align* environment, pic-align. There is also the svg option for SVG pictures.

If you have many equations and inline math, the compilation can take a lot of time, as each picture needs to be converted separately. You can use the dvisvgm_hashes make4ht extension for speed-up. It converts only math environments that were changed since the last compilation, and it also runs parallel conversion, so it is much faster.

This is the command that you can use:

$ make4ht -f html5+dvisvgm_hashes -m draft -a debug sample.tex "svg,pic-m,pic-align"

See also the picture math How-to.

This is the result:

enter image description here

If you want to produce EPS images (note that they are not supported by web browsers, so I am not sure that it is a good idea), you need to do two things: change the extension of generated graphics, and declare command that can convert DVI to EPS.

You can change the extension using this config file:


And EPS can be created using dvips. Try this build file, build.lua:

Make:image("eps$", "dvips  -E -o ${output} -pp ${page} ${source}")

You can then compile your file using:

$ make4ht -c config.cfg -e build.lua filename.tex "pic-m,pic-align"
  • Thanks for the suggestion, based on your reply, may I assume that there is no possibility to convert into outlined EPS format? please suggest...
    – MadyYuvi
    Dec 13, 2022 at 9:47
  • 1
    @MadyYuvi you can convert to eps, you just need to use a build file and declare command for DVI to EPS conversion, see kodymirus.cz/make4ht/make4ht-doc.html#image-conversion Note that EPS format is not supported by web browsers, so I am not sure if it is really useful.
    – michal.h21
    Dec 13, 2022 at 10:47
  • 1
    @MadyYuvi I've updated my answer with instructions for EPS
    – michal.h21
    Dec 13, 2022 at 11:22
  • Fantastic, exactly matched with the requirement, thanks a lot
    – MadyYuvi
    Dec 13, 2022 at 11:32

You must log in to answer this question.

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