Introduction of LaTeX2HTML Plugin

\title{Introduction to LaTeX2HTML Plugin}
\author{van abel}
\email{[email protected]}
\address{Southwest University}
\date{\today}
\keywords{Latex, Html}

Please notice that, this is the old user’s manual of LaTeX2HTML with version less than 1.2.3, the new manual is The User’s Manual of LaTeX2HTML 2.0.0.

\begin{abstract}
This is an introduction to write your blog using LaTeX language with the help of latex2html plugin. Before you testing it, please assure you have installed some plugin of MathJax, the simple-mathjax is recommend. The designing principle is to make you publish a post from your latex document more quickly and conveniently. With a litter pre-definition in your latex document, I find it works lovely.
\end{abstract}
\tableofcontents

\title{Introduction to LaTeX to HTML Plugin}
\author{van abel}
\title{Introduction to LaTeX to HTML Plugin}
\author{van abel}
\email{[email protected]}
\address{Southwest University}
\date{\today}
\keywords{Latex, Html}
\begin{abstract}
This is a introduction to write your blog use LaTeX language the help of \emph{latex2html} plugin. Before  you test of it, please assure you have installed some plugin of mathjax, the \emph{simple-mathjax} is recommend. The of design principle is to make you publish a post from your latex document more quickly and convenient. With a litter pre-definition in you latex document, I find it works lovely.
\end{abstract}
\tableofcontents

\section{One Words Before the Starting}
I will always post the code of the content right after it, which will make you more easy to follow my poor English.
\section{How to Write the Basic Information of Your Post}
Just as in LaTeX, you can use commands such as:\emph{\title}, \emph{\author}, \emph{\address}, \emph{\date}, \emph{\keywords} and the environment \emph{abstract} to produce the basic information of your post. These command has the same meaning as in LaTeX, what’s more,
\begin{itemize}
\item you can use \emph{\}\emph{today} in \emph{\date}
\item you can use \emph{\emph} to emphasis some thing
\item you can use \emph{\}\emph{tableofcontents} to get the table of contents
\item you can use \emph{\email} or \emph{\mailto} to set your mail, the first will be centered
\end{itemize}
\section{How to Write Section, Subsection and Subsubsection}

\section{How to Write Section, Subsection and Subsubsection}

Just like in Latex, isn’t it? Replace \emph{\section} with \emph{\subsection} and \emph{\subsubsection} if you want to write subsection and subsubsection, respectively. How about \emph{\subsubsubsection}? Sorry, there is no such command.

Maybe you are still wandering: how do I get the list of contents by \emph{\}\emph{tableofcontents} command, one key factor is that I added a link just before each section and subsection, by which you can refer to it. See the referring back to section (\ref{sec:7.3}) for detail.
\section{Itemize and Enumerate: How to List Stuffs}
As you have already saw, we can list the element as
\begin{itemize}
\item Firstly
\item Secondly
\end{itemize}

\begin{itemize}
\item Firstly
\item Secondly
\end{itemize}

What’s more you can nest them, for example
\begin{itemize}
\item Firstly
\item Secondly
\begin{itemize}
\item The first item of Second
\item The second item of Second
\begin{itemize}
\item The first item of the third item of second item
\end{itemize}
\end{itemize}
\end{itemize}

\begin{itemize}
\item Firstly
\item Secondly
\begin{itemize}
\item The first item of Second
\item The second item of Second
\begin{itemize}
\item The first item of the third item of second item
\end{itemize}
\end{itemize}
\end{itemize}

\emph{Enumerate} works almost the same as \emph{itemize}, except the style is different. For example replace \emph{enumerate} in the above example with \emph{enumerate}, then we get:
\begin{enumerate}
\item Firstly
\item Secondly
\begin{enumerate}
\item The first item of Second
\item The second item of Second
\begin{enumerate}
\item The first item of the third item of second item
\end{enumerate}
\end{enumerate}
\end{enumerate}
\section{The Color Scheme: How to Colorize You Content}
As we have already showed that you can emphasis you content by \emph{\emph}, one other way is use \emph{\underline}. Besides, there is a more powerful scheme, now you emphasis some content with different colors, even for formulae.
Firstly, you must decide which class your content belonged to, the \textcolor{green}{text} content or the \textcolor{green}{mathematics} content, since these two classes are processed by different scheme, \textcolor{green}{text} is by \emph{latex2html} and \textcolor{green}{mathematics} by \emph{mathjax}.
Just as in Latex, the you can set a color for your formula by \emph{\color}\emph{{color_name}}\emph{{color_formula}}. For example
\[
\color{red}{a+b},\quad\color{blue}{a+b},\quad\color{green}{a+b}
\]
\[
\frac{\color{cyan}{a+b}}{c+d}, \quad
\frac{a}{\color{magenta}{a+b}},\quad
\frac{a}{a+\color{yellow}{b}}
\]

\[
\color{red}{a+b},\quad\color{blue}{a+b},\quad\color{green}{a+b}
\]
\[
\frac{\color{cyan}{a+b}}{c+d}, \quad
\frac{a}{\color{magenta}{a+b}},\quad
\frac{a}{a+\color{yellow}{b}}
\]

On the other hand, if you want to give color for your \textcolor{green}{text} content, then you should use
\emph{\textcolor{color_name}}\emph{{color_contents}}, for example
\textcolor{red}{red} and \textcolor{blue}{blue} and \textcolor{green}{green} and \textcolor{cyan}{cyan} and \textcolor{magenta}{magenta} and \textcolor{yellow}{yellow}.

\textcolor{red}{red} and
\textcolor{blue}{blue} and
\textcolor{green}{green} and
\textcolor{cyan}{cyan} and
\textcolor{magenta}{magenta} and
\textcolor{yellow}{yellow}

\section{How to Write a Theorem}
There are two group of environments, which process the content such as \emph{Theorem}. One is used for a post, in which you mainly state something formally, just like you do in a research paper; The other is used for problem-discussion situation, in which you ask questions and hope for some examples and answers.
Of course the border is not so strict, for example the \emph{examp} environment can used in both cases.
Here are the complete list of environments you can use (The example will be pop up at some time later), I take first few words of a environment to represent it, for example \emph{thm} for \emph{Theorem}:
\begin{itemize}
\item First group: \emph{defn}(Definition), \emph{lem}(Lemma), \emph{prop}(Proposition), \emph{thm}(Theorem), \emph{cor}(Corollary), \emph{rem}(Remark), \emph{excs}(Exercise), \emph{proof}(Proof)
\item Second group: \emph{prob}(Problem), \emph{answer}(Answer)
\item Mixed: \emph{examp}(Example), \emph{quote}(Quotation)
\end{itemize}
I will go through the two group one by one, let’s begin with the first group.
\subsection{Definition, Lemma, Proposition, Theorem, Corollary, Remark, Proof}

\subsection{Definition, Lemma, Proposition, Theorem, Corollary, Remark, Proof}

Firstly, you should keep in mind that: the distinguish between \emph{command} and \emph{environment} is
\begin{quote}
A \emph{command} begin with a \emph{\} and followed with the \emph{name}, at last the content of command. It looks like \emph{text}; A \emph{environment} must be wrapped by \emph{begin} and \emph{end}.
\end{quote}
\subsubsection{Basic Usage of Environments}
Here is an example of \emph{definition} environment:
\begin{defn}
Suppose that $(X,\mathcal M)$ and $(Y,\mathcal N)$ are measurable spaces, and $f:X\to Y$ is a map. We call $f$ is \emph{measurable} if for every $B\in\mathcal N$ the set $f^{-1}(B)$ is in $\mathcal M$.
\end{defn}

\begin{defn}
Suppose that $(X,\mathcal M)$ and $(Y,\mathcal N)$ are measurable spaces,
and $f:X\to Y$ is a map. We call $f$ is \emph{measurable} if for every $B\in\mathcal N$
the set $f^{-1}(B)$ is in $\mathcal M$.
\end{defn}

The other is similar, just replace \emph{defn} with any one of the above environment:
\begin{rem}
If $Y$ is a topological space, and $\mathcal N$ is the $\sigma$-algebra of Borel sets, then $f$ is measurable if and only if the following condition satisfied:
\begin{itemize}
\item For every open set $V$ in $Y$, the inverse image $f^{-1}(V)$ is measurable.
\end{itemize}
\end{rem}

\begin{rem}
If $Y$ is a topological space, and $\mathcal N$ is the $\sigma$-algebra of Borel sets,
then $f$ is measurable if and only if the following condition satisfied:
\begin{itemize}
\item For every open set $V$ in $Y$, the inverse image $f^{-1}(V)$ is measurable.
\end{itemize}
\end{rem}

\subsubsection{Assign a Name for Your Theorem}
You can even assign a name to these environment, just as you did in latex, use \emph{[text]} just behind the environment, for example:
\begin{lem}[fundamental lemma of integration]
Let $\set{f_n}$ be a Cauchy sequence of step mappings. Then there exists a subsequence which converges pointwise almost everywhere, and satisfies the additional property: given $\eps$ there exists a set $Z$ of measure $< \eps$ such that this subsequence converges absolutely and uniformly outside $Z$.
\end{lem}

\begin{lem}[fundamental lemma of integration]
Let $\set{f_n}$ be a Cauchy sequence of step mappings. Then there exists a subsequence
which converges pointwise almost everywhere, and satisfies the additional property:
given $\eps$ there exists a set $Z$ of measure $< \eps$ such that this subsequence
converges absolutely and uniformly outside $Z$.
\end{lem}

\subsubsection{The Proof Environment}
The following are the \emph{proof} environment, and some more examples, if you are impatient to other contents, then just skip this subsection by click \ref{sec:6.2}.
\begin{proof}
For each integer $k$ there exists $N_k$ such that if $m,n\geq N_k$, then
\[
\|f_m-f_n\|_1< \frac{1}{2^{2k}}.
\]
We let our subsequence be $g_k=f_{N_k}$, taking the $N_k$ inductively to be strictly increasing. Then we have for all $m,n$:
\[
\|g_m-g_n\|_1 \]
We shall show that the series
\[
g_1(x)+\sum_{k=1}^\infty\left(g_{k+1}(x)-g_k(x)\right)
\]
converges absolutely for almost all $x$ to an element of $E$, and in fact we shall prove that this convergence is uniform except on a set of arbitrarily small measure.
Let $Y_n$ be the set of $x\in X$ such that
\[
|g_{n+1}(x)-g_n(x)|\geq\frac{1}{2^n}.
\]
Since $g_n$ and $g_{n+1}$ are step mappings, it follows that $Y_n$ has finite measure. On $Y_n$ we have the inequality
\[
\frac{1}{2^n}\leq|g_{n+1}-g_n|
\]
whence
\[
\frac{1}{2^n}\mu(Y)=\int_{Y_n}\frac{1}{2^n}\leq\int_X|g_{n+1}-g_{n}|\leq\frac{1}{2^{2n}}.
\]
Hence
\[
\mu(Y_n)\leq\frac{1}{2^n}.
\]
Let
\[
Z_n=Y_n\cup Y_{n+1}\cup\cdots.
\]
Then
\[
\mu(Z_n)\leq \frac{1}{2^{n-1}}.
\]
If $x\not\in Z_n$, then for $k\geq n$ we have
\[
|g_{k+1}(x)-g_k(x)| \]
and from this we conclude that our series
\[
\sum_{k=n}^\infty\left(g_{k+1}(x)-g_{k}(x)\right)
\]
is absolutely and uniformly convergent, for $x\not\in Z_n$. This proves the statement concerning the uniform convergence. If we let $Z$ be the intersection of all $Z_n$, then $Z$ has measure $0$, and if $x\not\in Z$, then $x\not\in Z_n$ for some $n$, whence our series converges for this $x$. This proves the lemma.
\end{proof}

\begin{proof}
For each integer $k$ there exists $N_k$ such that if $m,n\geq N_k$, then
\[
\|f_m-f_n\|_1< \frac{1}{2^{2k}}.
\]
We let our subsequence be $g_k=f_{N_k}$, taking the $N_k$ inductively to be strictly increasing. Then we have for all $m,n$:
\[
\|g_m-g_n\|_1 \]
We shall show that the series
\[
g_1(x)+\sum_{k=1}^\infty\left(g_{k+1}(x)-g_k(x)\right)
\]
converges absolutely for almost all $x$ to an element of $E$, and in fact we shall prove that this convergence is uniform except on a set of arbitrarily small measure.
Let $Y_n$ be the set of $x\in X$ such that
\[
|g_{n+1}(x)-g_n(x)|\geq\frac{1}{2^n}.
\]
Since $g_n$ and $g_{n+1}$ are step mappings, it follows that $Y_n$ has finite measure. On $Y_n$ we have the inequality
\[
\frac{1}{2^n}\leq|g_{n+1}-g_n|
\]
whence
\[
\frac{1}{2^n}\mu(Y)=\int_{Y_n}\frac{1}{2^n}\leq\int_X|g_{n+1}-g_{n}|\leq\frac{1}{2^{2n}}.
\]
Hence
\[
\mu(Y_n)\leq\frac{1}{2^n}.
\]
Let
\[
Z_n=Y_n\cup Y_{n+1}\cup\cdots.
\]
Then
\[
\mu(Z_n)\leq \frac{1}{2^{n-1}}.
\]
If $x\not\in Z_n$, then for $k\geq n$ we have
\[
|g_{k+1}(x)-g_k(x)| \]
and from this we conclude that our series
\[
\sum_{k=n}^\infty\left(g_{k+1}(x)-g_{k}(x)\right)
\]
is absolutely and uniformly convergent, for $x\not\in Z_n$. This proves the statement concerning the uniform convergence. If we let $Z$ be the intersection of all $Z_n$, then $Z$ has measure $0$, and if $x\not\in Z$, then $x\not\in Z_n$ for some $n$, whence our series converges for this $x$. This proves the lemma.
\end{proof}

\subsubsection{More Examples of Environments}
\begin{thm}
Let $f_n$ be a Cauchy sequence in $\mathcal L^1$ which is $L^1$-convergent to an element $f$ in $\mathcal L^1$. Then there exists a subsequence which converges to $f$ almost everywhere, and also such that given $\eps$, there exists a set $Z$ of measure $< \eps$ such that the convergence is uniform on the complement of $Z$.
\end{thm}

\begin{thm}
Let $f_n$ be a Cauchy sequence in $\mathcal L^1$ which is $L^1$-convergent to an element $f$ in $\mathcal L^1$. Then there exists a subsequence which converges to $f$ almost everywhere, and also such that given $\eps$, there exists a set $Z$ of measure $< \eps$ such that the convergence is uniform on the complement of $Z$.
\end{thm}

\begin{cor}
An element $f\in\mathcal L^1$ has seminorm $\|f\|_1=\int_X|f|\rd\mu=0$ if and only if $f$ is equal to $0$ almost everywhere.
\end{cor}

\begin{cor}
An element $f\in\mathcal L^1$ has seminorm $\|f\|_1=\int_X|f|\rd\mu=0$ if and only if $f$ is equal to $0$ almost everywhere.
\end{cor}

\begin{prop}[Monotone Convergence Theorem]
Let $\set{f_n}$ be an increasing (resp. decreasing) sequence of real valued functions in $\mathcal L^1$ such that the integrals
\[
\int_X f_n\rd\mu
\]
are bounded. Then $\set{f_n}$ is a Cauchy sequence, and is both $\mathcal L^1$ and almost everywhere convergent to some function $f\in\mathcal L^1$.
\end{prop}

\begin{cor}
An element $f\in\mathcal L^1$ has seminorm $\|f\|_1=\int_X|f|\rd\mu=0$ if and only if $f$ is equal to $0$ almost everywhere.
\end{cor}

\begin{prop}[Fatou’s Lemma]
Let $\set{f_n}$ be a sequence of real valued non-negative functions in $\mathcal L^1$. Assume that
\[
\liminf\|f_n\|_1
\]
is exists (so is a real number $\geq0$). Then $\liminf f_n(x)$ exists for almost all $x$, the function $\liminf f_n$ is in $\mathcal L^1$, and we have
\[
\int_X\liminf f_n\rd \mu\leq\liminf\int_X f_n\rd\mu=\liminf\|f_n\|_1.
\]
\end{prop}

\begin{prop}[Fatou's Lemma]
Let $\set{f_n}$ be a sequence of real valued non-negative functions in $\mathcal L^1$. Assume that
\[
\liminf\|f_n\|_1
\]
is exists (so is a real number $\geq0$). Then $\liminf f_n(x)$ exists for almost all $x$, the function $\liminf f_n$ is in $\mathcal L^1$, and we have
\[
\int_X\liminf f_n\rd \mu\leq\liminf\int_X f_n\rd\mu=\liminf\|f_n\|_1.
\]
\end{prop}

\subsection{The Problem, Answer Environments}
The second group of environments are provided for discussion, after all, this is a discussion platform. They are: \emph{prob} for Problem, \emph{examp} for Example, and \emph{answer} for Answer.
It almost works the same as the first group, for example
\begin{prob}[Egoroff’s theorem]
Assume that $\mu$ is $\sigma$-finite. Let $f:X\to E$ be a map and assume that $f$ is the pointwise limit of a sequence of simple maps $\set{\varphi_n}$. Given $\eps$, show that there exists a set $Z$ with $\mu(Z)< \eps$ such that the convergence of $\set{\varphi_n}$ is uniform on the complement of $Z$.
\end{prob}

\begin{prob}[Egoroff's theorem]
Assume that $\mu$ is $\sigma$-finite. Let $f:X\to E$ be a map and assume that $f$ is the pointwise limit of a sequence of simple maps $\set{\varphi_n}$. Given $\eps$, show that there exists a set $Z$ with $\mu(Z)< \eps$ such that the convergence of $\set{\varphi_n}$ is uniform on the complement of $Z$.
\end{prob}

But, the differences between them is that, the \emph{answer} is numbered with \emph{prob} (the \emph{examp}, \emph{excs}, \emph{rem} will numbered independently), to see this, for example:
\begin{answer}
Assume first that $\mu(X)$ is finite. Let $A_k$ be the set where $|f|\geq k$. The intersection of all $A_k$ is empty so their measures tend to $0$. Excluding a set of small measure, you can assume that $f$ is bounded, in which case $f$ is in $\mathcal L^1(\mu)$ and you can use the fundamental lemma of integration.
\end{answer}

\begin{answer}
Assume first that $\mu(X)$ is finite. Let $A_k$ be the set where $|f|\geq k$. The intersection of all $A_k$ is empty so their measures tend to $0$. Excluding a set of small measure, you can assume that $f$ is bounded, in which case $f$ is in $\mathcal L^1(\mu)$ and you can use the fundamental lemma of integration.
\end{answer}

\begin{answer}
This is another answer for the problem.
\end{answer}
You should note that the number of answer is reset to 1 by \emph{prob}, of course, more sensible. For example:
\begin{prob}
Why we should firstly process the positive measurable functions, then the real measurable functions and at last the complex measurable functions for the integral of measurable functions?
\end{prob}

\begin{prob}
Why we should firstly process the positive measurable functions, then the real measurable functions and at last the complex measurable functions for the integral of measurable functions?
\end{prob}

There are the answers for this problem:
\begin{answer}
In fact, you can define the integral of complex function directly.
\end{answer}

\begin{answer}
In fact, you can define the integral of complex function directly.
\end{answer}

\begin{answer}
There is another more instructive answer…
\end{answer}

\begin{answer}
There is another instructive answer...
\end{answer}

\subsection{The Exercise Environment}
Maybe, at somewhere, you want the reader consider about something, then you can use \emph{excs} environment for Exercise. Please keep in mind that it will have independent numbering, just as \emph{prob}, but will \emph{not reset} the number of answer. Here is an example:
\begin{excs}
Suppose $(X,\mu)$ is a measure space, and that $f$ is measurable, then $\int_X f\rd \mu=0$ if and only if $f\equiv0$ almost everywhere.
\end{excs}

\begin{excs}
Suppose $(X,\mu)$ is a measure space, and that $f$ is measurable, then $\int_X f\rd \mu=0$ if and only if $f\equiv0$ almost everywhere.
\end{excs}

\subsection{The Quote Environment}
Sometimes, there are some words or comments on the content, it is like a remark, but it is not so formal. And, if you are write a lecture notes, these words may be the lecturer said before or after an important thing, such as theorems. I have defined a new environment \emph{quote} to deal with these stuff. For example:
Before the theorem
\begin{thm}
Let $\Omega\subset\R^n$ and $u:\Omega\to\R$, then
\begin{enumerate}
\item If $u\in C^2(\Omega)$ is harmonic in $\Omega$, then $u$ satisfies MVP;
\item If $u\in C(\Omega)$ satisfies MVP, then $u$ is smooth and harmonic.
\end{enumerate}
\end{thm}

\begin{thm}
  Let $\Omega\subset\R^n$ and $u:\Omega\to\R$, then
  \begin{enumerate}
    \item If $u\in C^2(\Omega)$ is harmonic in $\Omega$, then $u$ satisfies MVP;
    \item If $u\in C(\Omega)$ satisfies MVP, then $u$ is smooth and harmonic.
  \end{enumerate}
\end{thm}

we want to add a comment on it, then you can use
\begin{quote}
A function satisfying mean-value properties is only required to be continuous. However, a harmonic function is required to be $C^2$. Thus, the equivalence of this two kind of functions will be significant.
\end{quote}

\begin{quote}
A function satisfying mean-value properties is only required to be continuous. However, a harmonic function is required to be $C^2$. Thus, the equivalence of this two kind of functions will be significant.
\end{quote}

\section{Auto Numbering and Referring Back}
\textcolor{red}{PLEASE NOTE THAT: since1.2.3, the auto number scheme is done by MathJax, not my plugin any more, so please visit mathjax for how to use the auto-numbering scheme)}
\subsection{Auto Numbering and Referring Back to Equations}
\subsubsection{Basic Usage of Mathematical Environments}
All the \emph{mathematical} environments: equation, align, multline, gather will auto-numbering. For example
\begin{equation}\begin{cases}
3=2x+y\\
3=y+2x\end{cases}
\end{equation}

\begin{equation}\begin{cases}
3=2x+y\\
3=y+2x\end{cases}
\end{equation}

An example of \emph{multline}, which will make the last line flush right:
\begin{multline}\label{eq:2}
\int_a^b \biggl\{ \int_a^b [ f(x)^2 g(y)^2 + f(y)^2 g(x)^2 ]
-2f(x) g(x) f(y) g(y) \,dx \biggr\} \,dy \\
=\int_a^b \biggl\{ g(y)^2 \int_a^b f^2 + f(y)^2
\int_a^b g^2 – 2f(y) g(y) \int_a^b fg \biggr\} \,dy
\end{multline}

\begin{multline}\label{eq:2}
\int_a^b \biggl\{ \int_a^b [ f(x)^2 g(y)^2 + f(y)^2 g(x)^2 ]
-2f(x) g(x) f(y) g(y) \,dx \biggr\} \,dy \\
=\int_a^b \biggl\{ g(y)^2 \int_a^b f^2 + f(y)^2
\int_a^b g^2 - 2f(y) g(y) \int_a^b fg \biggr\} \,dy
\end{multline}

The next example will show how to numbered the equation at a given line:
\begin{gather}
\begin{split}
\varphi(x,z)
&= z – \gamma_{10} x – \sum_{m+n\ge2} \gamma_{mn} x^m z^n\\
&= z – M r^{-1} x – \sum_{m+n\ge2} M r^{-(m+n)} x^m z^n
\end{split}\tag{4}\\
\begin{split}
\zeta^0 &= (\xi^0)^2, \\
\zeta^1 &= \xi^0 \xi^1
\end{split}\notag
\end{gather}

\begin{gather}
\begin{gather}
\begin{split}
\varphi(x,z) 
&= z – \gamma_{10} x – \sum_{m+n\ge2} \gamma_{mn} x^m z^n\\ 
&= z – M r^{-1} x – \sum_{m+n\ge2} M r^{-(m+n)} x^m z^n 
\end{split}\tag{4}\\ 
\begin{split} 
\zeta^0 &= (\xi^0)^2, \\ 
\zeta^1 &= \xi^0 \xi^1 
\end{split}\notag
\end{gather}

\subsubsection{Auto Numbering Scheme of Equations}
I hope you have already noticed that the above equations are numbered automatically, in fact, this is my first goal to write a plugin to process the latex code. Mathjax process mathematical perfectly, the only non-advantage is that it can’t automatically add number for equations. When I got a way to add number for the equations automatically, I found that I can go a litter far
\begin{enumerate}
\item automatically numbering theorems, which can be realize by set \emph{CSS}’s \emph{before} element with a \emph{counter}, but it may not work for IE6;
\item automatically numbering sections, and which can produce a table of contents, as you have already see.
\end{enumerate}
Then, when did the equation should be added number automatically?
Here is the rule:
\begin{enumerate}
\item If you use either one of these environments: \emph{equation,align,multline,gather};
\item If you do use these environments, then \emph{latex2html} will search \emph{tag,notag} sign inside these environments;
\item If it find a \emph{tag}, then it will reset the number of equation (\emph{$eqn}); one reason is that, \emph{\tag{eqn_num}} will set the present equation with number \emph{eqn_num}, another more important reason is that you can set the equation number as \emph{2.a, 2.b, 3.a.b, 3.a.c} and so on.
\item If it find \emph{notag} in the equation body, then it will make this equation without number
\item If neither \emph{tag} nor \emph{notag} have found, then it will assign a new number to the equation, i.e., \emph{$eqn};
\end{enumerate}
\subsubsection{How to Numbered Equations by 3.a and 3.b}
Here is an example with varied number:
\begin{align}
x^2+y^2&=z^2,\quad{x,y,z\in\mathbb{Z}}\tag{5.a}\\
x^3+y^3&=z^3,\quad{x,y,z\in\mathbb{Z}}\tag{5.b}
\end{align}
\begin{equation}
x^4+y^4=z^4,\quad{x,y,z\in\mathbb{Z}}\tag{7.a.b}
\end{equation}

\begin{align}
x^2+y^2&=z^2,\quad{x,y,z\in\mathbb{Z}}\tag{5.a}\\
x^3+y^3&=z^3,\quad{x,y,z\in\mathbb{Z}}\tag{5.b}
\end{align}
\begin{equation}
x^4+y^4=z^4,\quad{x,y,z\in\mathbb{Z}}\tag{7.a.b}
\end{equation}

I want to say a liter words about this scheme, i.e., numbering with \emph{num.lower-case-alpha}:
\begin{itemize}
\item first, the style of tag must be number plus lower-case-alpha, with dot split them, and there may be more than one lower-case-alpha, but the first one must be a number, of course may be more than one digit;
\item these scheme is designed for the group of equations are similar, thus their numbering is almost the same
\item in order to refer to these equations, you should use something like \emph{\eqref}\emph{{eq:5.a}} or \emph{\eqref}\emph{{eq:5.b}}, see \ref{sec:7.1.5} for more details.
\item the number of the next equation will be \emph{num}+1
\end{itemize}
For example, if you write another equation, which you would like to numbered automatically, then this equation will be numbered as \emph{(8)} in the present situation, since we already used \emph{7} in \emph{7.a.b}. For example,
\begin{gather}
\int_a^b \biggl\{ \int_a^b [ f(x)^2 g(y)^2 + f(y)^2 g(x)^2 ]
-2f(x) g(x) f(y) g(y) \,dx \biggr\} \,dy \\
=\int_a^b \biggl\{ g(y)^2 \int_a^b f^2 + f(y)^2
\int_a^b g^2 – 2f(y) g(y) \int_a^b fg \biggr\} \,dy
\end{gather}

\begin{gather}
\int_a^b \biggl\{ \int_a^b [ f(x)^2 g(y)^2 + f(y)^2 g(x)^2 ]
-2f(x) g(x) f(y) g(y) \,dx \biggr\} \,dy \\
=\int_a^b \biggl\{ g(y)^2 \int_a^b f^2 + f(y)^2
\int_a^b g^2 - 2f(y) g(y) \int_a^b fg \biggr\} \,dy
\end{gather}

\subsubsection{Skip Auto Numbering of Equations}
Any one of the following thing will make the auto-numbering scheme false:
\begin{itemize}
\item use the stared version of environments, for example you use \emph{equation*} instead of \emph{equation}
\item use the \emph{\tag{your_number}} that will make the equation numbered by \emph{your_number} given in \emph{\tag}
\item use \emph{\notag} that will make the equation \emph{without number}, but there should be no manually set \emph{\tag}
\item (\textcolor{red}{This drawback has already fixed by removing the \emph{\}\emph{label{*}} before processing the equation}) Another not-so-perfect thing is that you should not write a \emph{\label} or \emph{\notag} just behind the \emph{begin} part. (\textcolor{red}{Since the label now is process by mathjax, the following is not appear anymore!})For example, if you write something like
\begin{equation}\label{eq:3}
a+b=c\quad \text{it not numbered, since you have set a }\textbf{\label}\text{ for it}
\end{equation}
The code of above equation is:

\begin{equation}\label{eq:3}
a+b=c\quad \text{it not numbered, since you have set a }\textbf{\label}\text{ for it}
\end{equation}

Considering this drawback, I try to fix it by warping the automatic added \emph{lable} and \emph{\notag} with an \emph{{}} to distinguish these are added manually. In other words, this will make the following equation auto-number:

\begin{equation}{\label{eq:3}}
a+b=c\quad \text{it not numbered, since you have set a }\textbf{\label}\text{ for it}
\end{equation}

\end{itemize}
\subsubsection{How to Refer back to Equation Number}
You can refer back to a \emph{numbered equation} by \emph{\eqref}, please note that the \emph{\ref} is used for another stuff, so please use \emph{\eqref} for equations, and which will add \emph{()} automatically.
For example:
can you see the difference between \eqref{eq:2} and \eqref{eq:8}?

can you see the difference between \eqref{eq:2} and \eqref{eq:8}?

Please note that the difference is that \eqref{eq:8} is \emph{centered} for all lines.
The important thing in using \emph{\eqref} is that it must looks like \emph{\eqref{eq:number}}, here the \emph{eq:} inside {} is fixed, and the \emph{number} is the number for your equation, which either auto-added by \emph{latex2html} or set manually by you.
If you want refer back to the equation with number \emph{5.a} or \emph{5.b}, it should be exactly as \eqref{eq:5.a} or \eqref{eq:5.b}, and no equation has associated with \eqref{eq:5}. Please have a check that which one of the above link works?

If you want refer back to the equation with number \emph{5.a} or \emph{5.b}, it should be exactly as
\eqref{eq:5.a} or \eqref{eq:5.b}, and no equation has associated with \eqref{eq:5}. Please have
a check that which one of the above link works?

\subsubsection{My Suggestion on “How to Write Equations”}
\begin{enumerate}
\item if you use \emph{>} or \emph{< } for \emph{greater} and \emph{lesser} in math, please add a blank-space before \emph{>} and a blank-space after \emph{< }. Or you will make the HTML translation program confused, since \emph{} are standard tags for HTML language(code).
\item use\emph{$$} for inline math
\item use\emph{\[}\emph{\]} for oneline unnumbered display math
\item use star version for multiline unnumbered display math, for example, use \emph{gather*} environment for centered multiline equations
\item use \emph{equation} environment for oneline numbered display math
\item use \emph{align} environment for multiline numered display math, if you want make them aligned at some position( use & to set the point of align)
\end{enumerate}
\subsection{Auto Numbering and Referring Back to Environments}
\subsubsection{Auto Numbering of Environments}
All the environments except \emph{proof} are auto numbered by \emph{latex2html}, and the \emph{rem}, \emph{prob}, \emph{excs} are numbered independently, what’s more, \emph{answer}’s number will be reset by \emph{prob}. The other environment will numbered continuously in one post (on one page, which means, if you use the <!–nextpage–> to have another page, then the number will all over begin from 1, if you consider this as an bug, sorry, I can’t fix it.)
\subsubsection{Referring Back to Environments}
You can refer to the \emph{Theorem}, \emph{Lemma}, \emph{Corollary}, \emph{Definition}, \emph{Proposition}, \emph{Remark}, \emph{Problem}, \emph{Exercise}, and \emph{Answer} environments by \emph{\ref{env_name:env_num}}. For example:
From \ref{defn:1} we know that…
From \ref{prop:4} we know that…
From \ref{answer:2.1} we know that…

From \ref{defn:1}  we know that...
From \ref{prop:4} we know that...
From \ref{answer:2.1} we know that...

Just like the referring back to the equations, when you use \emph{\ref{env_name:env_num}} to refer to the exist environments, you should note that
\begin{itemize}
\item the environments, such as \emph{thm}, are auto numbered by \emph{latex2html};
\item \emph{env_name} is the name of environment, such as \emph{thm}, \emph{answer} and so on.
\item \emph{env_num} is the number of the environment, you must assure that it is exists, which means that should matched with your environment. For example, if you write something such as \emph{\ref}\emph{{prop:6}} that will not work, since there isn’t a \emph{Proposition} numbered with \emph{6}
\item Referring to the \emph{answer} is a litter different, the \emph{env_num} looks like \emph{2.1}, in other words, it should be exactly as the number in the post.
\item The style of \emph{\ref} must looks like \emph{\ref}\emph{{lem:2}}, which means, the \emph{:} is important.
\end{itemize}
\subsection{Referring Back to Section}
You can use \emph{\ref}\emph{{sec:1}} to refer back to \ref{sec:1}, and \emph{\ref}\emph{{sec:6.1}} to refer back to Subsection 1 of Section 6, which will looks like \ref{sec:6.1}, and \emph{\ref}\emph{{sec:7.1.3}} to refer back to Subsubsection 3 of Subsection 1 of Section 7, which will looks like \ref{sec:7.1.3}.

You can use \emph{\ref}\emph{{sec:1}} to refer back to \ref{sec:1}, and \emph{\ref}\emph{{sec:6.1}} to refer back to Subsection 1 of Section 6, which will looks like \ref{sec:6.1}, and \emph{\ref}\emph{{sec:7.1.3}} to refer back to Subsubsection 3 of Subsection 1 of Section 7, which will looks like \ref{sec:7.1.3}.

\section{To-be Stuff}
Maybe in what follows I will try to make the \emph{cite} of \emph{Bibitem} available, but that’s just maybe, since my programming with \emph{php} is badly poor, I hope somebody will make these thing become true.
\section{The Pre-definition in Your TeX File}
In order to make publish a post from your TeX code become more easy, I suggest add the following code in your Tex document:

%new theorem
\newtheorem{defn}{Definiton}
\newtheorem{prop}[defn]{Proposition}
\newtheorem{lem}[defn]{Lemma}
\newtheorem{thm}[defn]{Theorem}
\newtheorem{cor}[defn]{Corollary}
\newtheorem{rem}{Remark}

\newtheorem{prob}{Problem}
\newtheorem{excs}{Exercise}
\newtheorem{answer}{Answer}[prob]

%newcommand
\newcommand{\eps}{\varepsilon}
\newcommand{\R}{\bm{R}}
\newcommand{\rd}{\operatorname{d}}
\newcommand{\set}[1]{\left\{#1\right\}}

%new environments
%the quote
\renewenvironment{quote}{%
\par\vspace{1.5\baselineskip}%
\hspace{\stretch{0.2}}\minipage[c]{.9\textwidth}\itshape}{%
\endminipage\hspace{\stretch{1}}\vspace{1.5\baselineskip}\par}

You can added your own definition of \emph{symbols} to the post by \emph{$}\emph{your_definition_of_symbols}\emph{$}, and place it at the beginning of the post. For example, if you add \emph{$}\newcommand{\curl}{\mathrm{curl}}\emph{$} at the beginning of a post content, then you can use \emph{\curl} in formula to get the upward form of curl(旋度).
\section{Last Words and Feed Back}
This document contains the usage of the plugin \emph{latex2html}, and if you find any errors, or have any suggestions even bugs of the plugin, you can leave a word here, or sent a mail to me: \mailto{[email protected]}.

It takes me about one week to write the plugin, I’m too tired to feel glad when I finally finished it. I don’t know whether it will help you a litter to post mathematics with latex language or not, but if it do have any, I will fell much better.
\subsection{How to Jump Between Links}
If you have just click on a link, then you can go back where you were just by \emph{Alt+←}

Now what? Just enjoy the \emph{latex2html} plugin!!

\section{How to Get it?}
You can download it here by right-click the following download link and save it as…, then you can install it as the usual plugins.
Downlad LaTeX2HTML

To get it, visit the plugin in wordpress: http://wordpress.org/extend/plugins/latex2html/

15 条关于 “Introduction of LaTeX2HTML Plugin”的评论

  1. [
    color{red}{a+b},quadcolor{blue}{a+b},quadcolor{green}{a+b}
    ]
    [
    frac{color{cyan}{a+b}}{c+d}, quad
    frac{a}{color{magenta}{a+b}},quad
    frac{a}{a+color{yellow}{b}}
    ]

  2. Thank you for your plugin, it is so cool !
    I noticed that it doesn’t work with bbpress, did I miss something ?
    Btw happy new year !

    • This plugin just replace the contents of post by matching of regular expression, I don’t know how bbpress work, if it has the standard functions as WP, then it should work.

      Another thing is that, as a scheme of acceleration, the plugin is designed to work on posts NOT on Home/Index page by default, you can have a check of the option.

    • After a while, I figured it out that the mathjax script is not loaded for `wp_content()` where the math is not included, you can have a test of it by adding a new page without math formular, then LaTeX2HTML will not add mathjax script in the footer of your page, since there is not math to proceed!!

      Ok, back to the problem, you will find BBPress is not use the standard `wp_content()` function to output the content of a topic, I believe that is the problem.

回复 dsad 取消回复

您的邮箱地址不会被公开。 必填项已用 * 标注

*

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理