I am not really sure, what you are looking for, purpose of questions and answers you linked to is exactly not to convert macros to html, to be processed with some tool like mathjax. Try this configuration file, with definitions of your macros for mathjax:
\usepackage{verbatim}
\Preamble{xhtml}
% Configure for mathjax
\Configure{VERSION}{}
\Configure{DOCTYPE}{\HCode{<!DOCTYPE html>\Hnewline}}
\Configure{HTML}{\HCode{<html>\Hnewline}}{\HCode{\Hnewline</html>}}
\Configure{@HEAD}{\HCode{
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
Macros: {
\unexpanded{La : "\\Lambda",
B: "\\beta",
twosilt: "\\textrm{2-silt}",}
}
},
extensions: ["tex2jax.js"],
tex2jax: {
\unexpanded{
inlineMath: [ ['\$','\$'], ["\\\\(","\\\\)"] ],
displayMath: [ ['$$','$$'], ["\\[","\\]"] ],}
processEscapes: true
}
});
</script>
}}
\Configure{@HEAD}{\HCode{<script type="text/javascript"\Hnewline
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"\Hnewline
></script>\Hnewline}}
\newtoks\eqtoks
\def\AltMath#1${\eqtoks{$#1$}%
\HCode{\the\eqtoks}$}
\Configure{$}{}{}{\expandafter\AltMath}
\def\AltlMathI#1){\eqtoks{(#1)}%
\HCode{\the\eqtoks}}
\Configure{()}{\AltlMathI}{}
\def\AltlDisplay#1]{\eqtoks{[#1]}%
\HCode{\the\eqtoks}}
\Configure{[]}{\AltlDisplay}{}
\begin{document}
\newcommand\VerbMath[1]{%
\renewenvironment{#1}{%
\NoFonts%
\string\begin{#1}%
\verbatim}{\endverbatim\string\end{#1}\EndNoFonts}%
}
\VerbMath{equation*}
\EndPreamble
I combined definitions from "leave equations unchanged", added definitions of your macros for mathjax and created new command, \VerbMath. You need to use this command for every math environment, like equation* in your case. It will leave also math environments unchanged. Name this file myconfig.cfg.
I also slightly edited your sample file:
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amssymb}
\newcommand{\La}{\Lambda}
\def\B{\beta}
\newcommand{\twosilt}{\mbox{\rm 2-silt}}
\begin{document}
In this section, we $\B$ recall some definitions and results.
Throughout $\alpha+\B$ this section, let ${\La}$ be a finite dimensional algebra.
\begin{equation}
\Phi:\Lambda\longrightarrow\twosilt\Lambda,; (X,P)\mapsto \Phi(X,P):=P_X\oplus P[1].
\end{equation}
\end{document}
I added fontenc package in order to correctly convert all characters and replaced \ \ \ in your equation with \;. I suppose that you wanted bigger space, but \ seems to be not supported by mathjax.
Now you can compile your file with:
htlatex mwo myconfig
you can see the result here
altattribute? – Balaji Mar 21 '14 at 06:45\AltlMathiIinstead of\AltlMathI. – alex.jordan Oct 05 '14 at 02:38author defined macros only need to changeand all the remaining$..$and$$...$$equations are unchanged? or Can i switch to LaTeX 2 mathml Conversion. It's possible againmathml 2 LaTeX equations conversion. – Balaji Jun 19 '15 at 07:22htlatex mwo "myconfig,mathmlif you want to try mathml – michal.h21 Jun 19 '15 at 08:14htlatex test "els, css, NoFonts, xhtml, mathml". How do revertmathml2latex equationsfor getting updated/changed (like author used macros) equations? – Balaji Jun 19 '15 at 08:30\verbmathin the config file all the equation cross-reference are not converted. Could you please advise what i have need to update in the.cfgfile? – Balaji Aug 14 '15 at 06:59