1

I am using tex4ht to convert a tex to mathml coding.

I mentioned two types of equation.

MWE

\documentclass{article}

\usepackage{amsmath}

\begin{document}
\section{First Output}

\begin{equation} 
a+b_{2}^{3}
\end{equation} 

\section{Second Output}

\begin{equation} 
a+b_{2}{^{3}}
\end{equation} 


\end{document}

First equation by default i am getting the correct output. But the second equation is display the error "invalid-markup" in html view.

My PDF Output: enter image description here

My Html Output: enter image description here

My CFG file:

\Preamble{xhtml,mathml,NLM,charset=UTF-8,-xtpipes,NoFonts,no-DOCTYPE,refcaption}
% do you use some custom xml tags?
\Configure{section}{\HCode{<span>\Hnewline}}{\HCode{</span>\Hnewline}}
{\HCode{<sect>\Hnewline}}    {\HCode{</sect>\Hnewline}} 
\Configure{textit}{\HCode{<italic>}\NoFonts}{\HCode{</italic>}\EndNoFonts}
\Configure{textbf}{\HCode{<bold>}\NoFonts}{\HCode{</bold>}\EndNoFonts}
\Css{.textsuperscript{font-size:.7rem;}}
\Css{.textsubscript{font-size:.7rem;}}
\Configure{HtmlPar}
{\EndP\Tg<p>}
{\EndP\Tg<p>}
{\HCode{</p>\Hnewline}}
{\HCode{</p>\Hnewline}}
\begin{document}
\EndPreamble

Kindly advice how to resolve this problem.

CS Kumar
  • 1,253
  • if your intent is to "offset" the superscript, then you can code the second equation as a+b_{2}{}^{3}. mathml should recognize that as legitimate. – barbara beeton Sep 28 '15 at 15:07
  • @barbara the problem is not resolved by using above mentioned coding. Currently i am using this way a+b_{2}^{,3}. – CS Kumar Sep 29 '15 at 10:41

0 Answers0