When processing a LaTeX source with tex4ht, I can't seem to reliably convert subscripts in text mode to <sub>
tags in the HTML output. My only solution so far is to switch to math mode. But for some reason, if I define the same math code as a macro with \newcommand
(to avoid typos when typing long math expressions), the <sub>
tags are gone again!
Example source:
\documentclass[10pt]{article}
\usepackage{subscript}
\newcommand{\tsub}{$a_b$}
\begin{document}
x\textsuperscript{n}
y\textsubscript{1}
$a_b$
\tsub{}
\end{document}
... which I process using:
htlatex example.tex 'html, charset=utf-8' ' -cunihtf -utf8'
Is there an easy way to make tex4ht honor \textsubscript
or $_{}$
commands in \newcommand
macros?
Thanks for any suggestion,
--Mathieu
\newcommand{\foo}{$foo_{bar}$}
still fails silently, but\newcommand{\foo}{foo\textsubscript{bar}}
fulfills my needs.\textsubscipt
much better