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

Following mwe.tex works with htlatex mwe.tex. With htlatex mwe.tex "xhtml, mathml" it gives correct C_5 but \S is like S5, not S_5.




Group $C_5$ is subgroup of \S.


Too many things to tweak with htlatex... For example "xhtml, mathml" fixed problem that I asked two days ago.

share|improve this question
Why don't you leave out the \ensuremath and use \S in math mode? However, it seems that the mathml option isn't able to see the subscript in the macro. – egreg Jul 4 '13 at 13:19
up vote 4 down vote accepted

Sub- and super-scripts are redefined on several places by tex4ht. \S command doesn't work because in the document preamble they have different meaning than in the document text. If you want to activate them, use command line option early_ for subscripts and early^ for superscripts. So in your case, compile the document with:

htlatex filename "xhtml, mathml, early_"

for info about more command line options, see this page. On that blog, there are more interesting articles, if you are interested in more advanced usage of tex4ht.

share|improve this answer
Thanks! Again one more working bit if html! – Jori Mäntysalo Jul 5 '13 at 7:39

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.