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.

All the display equations/centered equations are no need to convert to MathML or PNG and need to retain in LaTeX coding only.

If it is possible convert to HTML tag in-between text part only convert to HTML tag.

But no need to convert to same positions of Superscript and Subscript, Same positions of Limits Superscript and Subscript and so on in the text part.

\documentclass{book}

\usepackage{amssymb,amsmath}

\begin{document}

Schematic representation of the model, including the following populations: $e$ vaue is $e=2$ and `%e and e=2 convert to html tag`
thalamic reticular nucleus; $s^2_3$ `%s^2_3 should be in latex as its tag`
primary and secondary thalamic relay nuclei themselves with gains $\pi + 2\pi n (n=0,1,\ldots)$ `%\pi + 2\pi n (n=0,1,\ldots) convert to html tag`
and $G_{ii}$ `%G_{ii} convert to html tag. Schematic to and $G_{ii}$ is a text part position`

\end{document}
share|improve this question
    
may be it is just me, but I am having a hard time understanding the question. Could please try to ask it again? What is it you are asking for? Are you getting an error from htlatex? What command did you use? What is the error? –  Nasser Feb 20 '13 at 7:35
    
aren't you looking for tex.stackexchange.com/q/27510/2891 and tex.stackexchange.com/q/33708/2891 ? –  michal.h21 Feb 20 '13 at 7:56
    
@Balakrishnan I think your needs are covered with questions linked in my previous comment –  michal.h21 Feb 20 '13 at 9:37

1 Answer 1

up vote 2 down vote accepted

After my research i have found the link http://www.tug.org/applications/tex4ht/mn5.html#QQ1-5-23. Because i have need to maintain centered/display/SUB SUP equations in LaTeX format only and no need PNG/MathML format. After that i will convert LaTeX Equations to Math Type OLE format. htlatex Config file:

\Preamble{html}
\newtoks\eqtoks 

\def\EquationAlt{\afterassignment\setimg\eqtoks}  
\def\setimg{\Picture*[\HCode{\the\eqtoks}]{}\the\eqtoks\EndPicture}  

\def\SubSupOp#1{%  
   \edef\temp{\expandafter\gobble\string#1}%  
   \expandafter\let\csname old\temp\endcsname=#1  
   \edef\temp{\noexpand\SUBSUPOP{\expandafter\noexpand  
                   \csname old\temp\endcsname}}%  
   \HLet#1=\temp  
}  
\def\gobble#1{}  
\def\SUBSUPOP#1{\let\curOP=#1%  
   \let\next=\putOP \let\OPsub=\empty \let\OPsup=\empty  
   \futurelet\nextop\getOP}  
\def\getOP{%  
  \ifx _\nextop \let\next=\getsub  
     \else\ifx ^\nextop \let\next=\getsup\fi\fi \next}  
\def\getsub#1#2{\def\OPsub{#2}\let\next=\putOP  
   \futurelet\nextop\getOP}  
\def\getsup#1#2{\def\OPsup{#2}\let\next=\putOP  
   \futurelet\nextop\getOP}  
\def\putOP{\Picture+{  align="middle"}{\curOP_{\OPsub}^{\OPsup}}\EndPicture}  

\SubSupOp\sum  
\SubSupOp\int


\begin{document}

 \Configure{graphics*}  
        {png}  
        {\Link[\csname Gin@base\endcsname .png]{}{}%  
           \Picture[pict]{\csname Gin@base\endcsname .png  
              \space width="40px" height="40px" }%  
         \EndLink  
         } 
\EndPreamble

shell command is:

htlatex myfile.tex test.cfg

share|improve this answer
    
A tip: If you indent lines by 4 spaces, they'll be marked as a code sample. You can also highlight the code and click the "code" button (with "{}" on it). –  texenthusiast Feb 27 '13 at 6:13

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.