TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

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

Can we enable -shell-escape through any option without editing the default htlatex program? OR Can we achieve this using mk4ht ht?

share|improve this question
try mk4ht htlatex <file> "--shell-escape" – Herbert Jul 24 '13 at 13:21
@Herbert: Sorry that argument is for the cfg! But, thanks it give me a hint to trace and finally I got the answer. – Jagath Jul 24 '13 at 13:59
up vote 5 down vote accepted

Finally I got the answer:

The -shell-escape option should be passed as the fifth argument to htlatex.

htlatex <filename> <cfg> <ht-font-dir-for-tex4ht> <option-to-t4ht-program> <tex-command-line-option>

So an example would be:

htlatex test.tex config.cfg "xhtml,charset=utf-8" -utf8 -shell-escape
htlatex test.tex config.cfg "" "" -shell-escape

Source: htlatex.bat

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.