1

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.

\documentclass{article}

\usepackage{xspace}
\renewcommand*{\S}{\ensuremath{S_5}\xspace}

\begin{document}

Group $C_5$ is subgroup of \S.

\end{document}

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

1
  • 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
    Commented Jul 4, 2013 at 13:19

1 Answer 1

5

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.

0

You must log in to answer this question.

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