Is there way especially in math the user defined macros (even complicate definition) should get expand and the expanded version should stored in the respective equation.
Basically, this to retain the user defined macro expanded math as TeX equation in XHTML using TeX4ht.
Converting TeX to MathML and again converting to TeX gives more issues in conversion and unable to produce the user math output.
I also referred the discussion happened in LaTeX macro expander which is not dealing my requirement.
Here is an Example:
TeX:
\newcommand{\DelimiterGroup}[4]{\ifcase#1\relax#2 #4 #3
\or\bigl#2 #4 \bigr#3\or\Bigl#2 #4 \Bigr#3\or\biggl#2 #4 \biggr#3\or\Biggl#2 #4 \Biggr#3\or
\left#2 #4 \right#3\else\fi}
\newcommand{\Par}[2][0]{\DelimiterGroup{#1}{(}{)}{#2}}
$L^{\infty}\Par{D}$
XHTML:
$L^{\infty}(D)$
\letand\futureletthere is the possibility of different tokens denoting the same.There is also the possibility of the same token denoting different unexpandable things at different moments in time. – Ulrich Diez Nov 23 '23 at 16:34