Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.