{"id":2374,"date":"2013-01-24T10:58:53","date_gmt":"2013-01-24T02:58:53","guid":{"rendered":"http:\/\/wamath.sinaapp.com\/?p=2374"},"modified":"2013-01-24T10:58:53","modified_gmt":"2013-01-24T02:58:53","slug":"latex2html-demonstration-latex-doc","status":"publish","type":"post","link":"https:\/\/lttt.vanabel.cn\/?p=2374","title":{"rendered":"LaTeX2HTML Demonstration LaTeX Doc"},"content":{"rendered":"<p>\\documentclass[12pt, reqno, b5size]{amsart}<br \/>\n\\usepackage{color}<br \/>\n\\usepackage{bm}<br \/>\n\\usepackage{hyperref}<br \/>\n\\hypersetup{<br \/>\n    pdfstartview=FitH,<br \/>\n    bookmarks=true,<br \/>\n    CJKbookmarks=true,<br \/>\n    pdfstartview=FitH,<br \/>\n    colorlinks=true,<br \/>\n    linkcolor=blue<br \/>\n}<br \/>\n%new theorem<br \/>\n\\newtheorem{defn}{Definiton}<br \/>\n\\newtheorem{prop}[defn]{Proposition}<br \/>\n\\newtheorem{lem}[defn]{Lemma}<br \/>\n\\newtheorem{thm}[defn]{Theorem}<br \/>\n\\newtheorem{cor}[defn]{Corollary}<br \/>\n\\newtheorem{rem}{Remark}<\/p>\n<p>\\newtheorem{prob}{Problem}<br \/>\n\\newtheorem{excs}{Exercise}<br \/>\n\\newtheorem{answer}{Answer}[prob]<\/p>\n<p>%newcommand<br \/>\n\\newcommand{\\eps}{\\varepsilon}<br \/>\n\\newcommand{\\R}{\\bm{R}}<br \/>\n\\newcommand{\\rd}{\\operatorname{d}}<br \/>\n\\newcommand{\\set}[1]{\\left\\{#1\\right\\}}<\/p>\n<p>%new environments<br \/>\n%the quote<br \/>\n\\renewenvironment{quote}{%<br \/>\n\\par\\vspace{1.5\\baselineskip}%<br \/>\n\\hspace{\\stretch{0.2}}\\minipage[c]{.9\\textwidth}\\itshape}{%<br \/>\n\\endminipage\\hspace{\\stretch{1}}\\vspace{1.5\\baselineskip}\\par}<br \/>\n\\begin{document}<br \/>\n\\title{LaTeX2HTML Demonstration LaTeX Doc}<br \/>\n\\author{van abel}<br \/>\n\\email{van141.abel@gmail.com}<br \/>\n\\address{Southwest University}<br \/>\n\\date{\\today}<br \/>\n\\keywords{Latex, Html}<br \/>\n\\begin{abstract}<br \/>\nThis doc is the demonstration of LaTeX doc which can be directly use in a new post. You can copy and paste all the content of this document into a new post (in HTML mode), and see the demonstration.<br \/>\n\\end{abstract}<!--more--><br \/>\n\\maketitle<br \/>\n\\tableofcontents<br \/>\n\\section{What did This Doc Do}<br \/>\nTo demonstrate my plugins LaTeX2HTML, I write this demo-Doc of LaTeX, which can be compiled by LaTeX or PDFLaTeX on one hand, and can publish on your blog by directly copy and paste all the content into a new post in HTML mode.<br \/>\n\\section{How to Get this Doc}<br \/>\nThis doc has published with the LaTeX2HTML plugin with version higher than 1.1.0, the LaTeX2HTML plugin can be download at WordPress.com.<br \/>\n\\section{Itemize and Enumerate: How to List Stuffs}<br \/>\nAs you have already saw, we can list the element as<br \/>\n\\begin{itemize}<br \/>\n\\item Firstly<br \/>\n\\item Secondly<br \/>\n\\end{itemize}<br \/>\nWhat&#8217;s more you can nest them, for example<br \/>\n\\begin{itemize}<br \/>\n\\item Firstly<br \/>\n\\item Secondly<br \/>\n\\begin{itemize}<br \/>\n\\item The first item of Second<br \/>\n\\item The second item of Second<br \/>\n\\begin{itemize}<br \/>\n\\item The first item of the third item of second item<br \/>\n\\end{itemize}<br \/>\n\\end{itemize}<br \/>\n\\end{itemize}<br \/>\n\\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:<br \/>\n\\begin{enumerate}<br \/>\n\\item Firstly<br \/>\n\\item Secondly<br \/>\n\\begin{enumerate}<br \/>\n\\item The first item of Second<br \/>\n\\item The second item of Second<br \/>\n\\begin{enumerate}<br \/>\n\\item The first item of the third item of second item<br \/>\n\\end{enumerate}<br \/>\n\\end{enumerate}<br \/>\n\\end{enumerate}<br \/>\n\\section{The Color Scheme: How to Colorize You Content}<br \/>\nFirstly, 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 proceeded by different scheme, \\textcolor{green}{text} is by \\emph{latex2html} and \\textcolor{green}{mathematics} by \\emph{mathjax}.<\/p>\n<p>Just as in Latex, the you can set a color for your formula, for example<br \/>\n\\[<br \/>\n\\color{red}{a+b},\\quad\\color{blue}{a+b},\\quad\\color{green}{a+b}<br \/>\n\\]<br \/>\n\\[<br \/>\n\\frac{\\color{cyan}{a+b}}{c+d}, \\quad<br \/>\n\\frac{a}{\\color{magenta}{a+b}},\\quad<br \/>\n\\frac{a}{a+\\color{yellow}{b}}<br \/>\n\\]<br \/>\nOn the other hand, if you want to give color for your \\textcolor{green}{text} content, then you should use something like this:<\/p>\n<p>\\textcolor{red}{red} and \\textcolor{blue}{blue} and \\textcolor{green}{green} and \\textcolor{cyan}{cyan} and \\textcolor{magenta}{magenta} and \\textcolor{yellow}{yellow}.<br \/>\n\\section{How to Write a Theorem}<br \/>\nThere are two group of environments, which proceed 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.<\/p>\n<p>Of course the border is not so strict, for example the \\emph{examp} environment can used in both cases.<\/p>\n<p>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}:<br \/>\n\\begin{itemize}<br \/>\n\\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)<br \/>\n\\item Second group: \\emph{prob}(Problem), \\emph{answer}(Answer)<br \/>\n\\item Mixed: \\emph{examp}(Example), \\emph{quote}(Quotation)<br \/>\n\\end{itemize}<br \/>\nI will go through the two group one by one, let&#8217;s begin with the first group.<br \/>\n\\subsection{Definition, Lemma, Proposition, Theorem, Corollary&#8230;}<br \/>\n\\subsubsection{Basic Usage of Environments}<br \/>\nHere is an example of \\emph{definition} environment:<br \/>\n\\begin{defn}<br \/>\nSuppose that $(X,\\mathcal M)$ and $(Y,\\mathcal N)$ are measurable spaces,<br \/>\nand $f:X\\to Y$ is a map. We call $f$ is \\emph{measurable} if for every $B\\in\\mathcal N$<br \/>\nthe set $f^{-1}(B)$ is in $\\mathcal M$.<br \/>\n\\end{defn}<br \/>\nThe other is similar, just replace \\emph{defn} with any one of the above environment:<br \/>\n\\begin{rem}<br \/>\nIf $Y$ is a topological space, and $\\mathcal N$ is the $\\sigma$-algebra of Borel sets,<br \/>\nthen $f$ is measurable if and only if the following condition satisfied:<br \/>\n\\begin{itemize}<br \/>\n\\item For every open set $V$ in $Y$, the inverse image $f^{-1}(V)$ is measurable.<br \/>\n\\end{itemize}<br \/>\n\\end{rem}<br \/>\n\\subsubsection{Assign a Name for Your Theorem}<br \/>\nYou can even assign a name to these environment, just as you did in latex, use \\emph{[text]} just behind the environment, for example:<br \/>\n\\begin{lem}[fundamental lemma of integration]<br \/>\nLet $\\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$.\n\\end{lem}\n\\subsubsection{The Proof Environment}\nThe 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:5.2}.\n\\begin{proof}\nFor each integer $k$ there exists $N_k$ such that if $m,n\\geq N_k$, then\n\\[\n\\|f_m-f_n\\|_1< \\frac{1}{2^{2k}}.\n\\]\nWe 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$:\n\\[\n\\|g_m-g_n\\|_1 \\]\nWe shall show that the series\n\\[\ng_1(x)+\\sum_{k=1}^\\infty\\left(g_{k+1}(x)-g_k(x)\\right)\n\\]\nconverges 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.\nLet $Y_n$ be the set of $x\\in X$ such that\n\\[\n|g_{n+1}(x)-g_n(x)|\\geq\\frac{1}{2^n}.\n\\]\nSince $g_n$ and $g_{n+1}$ are step mappings, it follows that $Y_n$ has finite measure. On $Y_n$ we have the inequality\n\\[\n\\frac{1}{2^n}\\leq|g_{n+1}-g_n|\n\\]\nwhence\n\\[\n\\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}}.\n\\]\nHence\n\\[\n\\mu(Y_n)\\leq\\frac{1}{2^n}.\n\\]\nLet\n\\[\nZ_n=Y_n\\cup Y_{n+1}\\cup\\cdots.\n\\]\nThen\n\\[\n\\mu(Z_n)\\leq \\frac{1}{2^{n-1}}.\n\\]\nIf $x\\not\\in Z_n$, then for $k\\geq n$ we have\n\\[\n|g_{k+1}(x)-g_k(x)| \\]\nand from this we conclude that our series\n\\[\n\\sum_{k=n}^\\infty\\left(g_{k+1}(x)-g_{k}(x)\\right)\n\\]\nis 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.\n\\end{proof}\n\\subsubsection{More Examples of Environments}\n\\begin{thm}\nLet $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$.\n\\end{thm}\n\\begin{cor}\nAn 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.\n\\end{cor}\n\\begin{prop}[Monotone Convergence Theorem]\nLet $\\set{f_n}$ be an increasing (resp. decreasing) sequence of real valued functions in $\\mathcal L^1$ such that the integrals\n\\[\n\\int_X f_n\\rd\\mu\n\\]\nare 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$.\n\\end{prop}\n\\begin{prop}[Fatou's Lemma]\nLet $\\set{f_n}$ be a sequence of real valued non-negative functions in $\\mathcal L^1$. Assume that\n\\[\n\\liminf\\|f_n\\|_1\n\\]\nis 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\n\\[\n\\int_X\\liminf f_n\\rd \\mu\\leq\\liminf\\int_X f_n\\rd\\mu=\\liminf\\|f_n\\|_1.\n\\]\n\\end{prop}\n\\subsection{The Problem, Answer Environments}\\label{sec:5.2}\nThe 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.\nIt almost works the same as the first group, for example\n\\begin{prob}[Egoroff's theorem]\nAssume 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$.\n\\end{prob}\nBut, 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:\n\\begin{answer}\nAssume 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.\n\\end{answer}\n\\begin{answer}\nThis is another answer for the problem.\n\\end{answer}\nYou should note that the number of answer is reset to 1 by \\emph{prob}, of course, more sensible. For example:\n\\begin{prob}\nWhy 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?\n\\end{prob}\nThere are the answers for this problem:\n\\begin{answer}\nIn fact, you can define the integral of complex function directly.\n\\end{answer}\n\\begin{answer}\nThere is another more instructive answer...\n\\end{answer}\n\\subsection{The Exercise Environment}\nMaybe, at somewhere, you want the reader consider about something, then you can use \\emph{excs} environment for Exercise. \\textcolor{red}{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:\n\\begin{excs}\nSuppose $(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.\n\\end{excs}\n\\subsection{The Quote Environment}\nSometimes, 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:\n\nBefore the theorem\n\\begin{thm}\nLet $\\Omega\\subset\\R^n$ and $u:\\Omega\\to\\R$, then\n\\begin{enumerate}\n\\item If $u\\in C^2(\\Omega)$ is harmonic in $\\Omega$, then $u$ satisfies MVP;\n\\item If $u\\in C(\\Omega)$ satisfies MVP, then $u$ is smooth and harmonic.\n\\end{enumerate}\n\\end{thm}\nwe want to add a comment on it, then you can use\n\\begin{quote}\nA 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.\n\\end{quote}\n\\section{Auto Numbering and Referring Back}\n\\subsection{Auto Numbering and Referring Back to Equations}\n\\subsubsection{Basic Usage of Mathematical Environments}\nAll the \\emph{mathematical} environments: \\emph{equation}, \\emph{align}, \\emph{multline}, \\emph{gather} will auto-numbering. For example\n\\begin{equation}\\begin{cases}\n3=2x+y\\\\\n3=y+2x\\end{cases}\n\\end{equation}\nAn example of \\emph{multline}, which will make the last line flush right:\n\\begin{multline}\n\\int_a^b \\biggl\\{ \\int_a^b [ f(x)^2 g(y)^2 + f(y)^2 g(x)^2 ]\n-2f(x) g(x) f(y) g(y) \\,dx \\biggr\\} \\,dy \\\\\n=\\int_a^b \\biggl\\{ g(y)^2 \\int_a^b f^2 + f(y)^2\n\\int_a^b g^2 - 2f(y) g(y) \\int_a^b fg \\biggr\\} \\,dy\n\\end{multline}\nThe next example will show how to numbered the equation at a given line:\n\\begin{gather}\n\\begin{split}\n\\varphi(x,z) \n&#038;= z \u2013 \\gamma_{10} x \u2013 \\sum_{m+n\\ge2} \\gamma_{mn} x^m z^n\\\\ \n&#038;= z \u2013 M r^{-1} x \u2013 \\sum_{m+n\\ge2} M r^{-(m+n)} x^m z^n \n\\end{split}\\tag{4}\\\\ \n\\begin{split} \n\\zeta^0 &#038;= (\\xi^0)^2, \\\\ \n\\zeta^1 &#038;= \\xi^0 \\xi^1 \n\\end{split}\\notag\n\\end{gather}\n\\subsubsection{Auto Numbering Scheme of Equations}\nI hope you have already noticed that the above equations are numbered automatically, in fact, this is my first goal to write a plugin to proceed the latex code. Mathjax proceed 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\n\\begin{enumerate}\n\\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;\n\\item automatically numbering sections, and which can produce a table of contents, as you have already see.\n\\end{enumerate}\n\\subsubsection{How to Numbered Equations by 3.a and 3.b}\nHere is an example with varied number:\n\\begin{align}\nx^2+y^2&#038;=z^2,\\quad{x,y,z\\in\\mathbb{Z}}\\tag{5.a}\\\\\nx^3+y^3&#038;=z^3,\\quad{x,y,z\\in\\mathbb{Z}}\\tag{5.b}\n\\end{align}\n\\begin{equation}\nx^4+y^4=z^4,\\quad{x,y,z\\in\\mathbb{Z}}\\tag{7.a.b}\n\\end{equation}\nFor 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,\n\\begin{gather}\n\\int_a^b \\biggl\\{ \\int_a^b [ f(x)^2 g(y)^2 + f(y)^2 g(x)^2 ]\n-2f(x) g(x) f(y) g(y) \\,dx \\biggr\\} \\,dy \\\\\n=\\int_a^b \\biggl\\{ g(y)^2 \\int_a^b f^2 + f(y)^2\n\\int_a^b g^2 - 2f(y) g(y) \\int_a^b fg \\biggr\\} \\,dy\n\\end{gather}\n\\end{document}\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\\documentclass[12pt, reqno, b5size]{amsa &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"https:\/\/lttt.vanabel.cn\/?p=2374\"> <span class=\"screen-reader-text\">LaTeX2HTML Demonstration LaTeX Doc<\/span> \u9605\u8bfb\u66f4\u591a &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[352,535],"class_list":["post-2374","post","type-post","status-publish","format-standard","hentry","category-admin","tag-demo-doc","tag-latex2html"],"_links":{"self":[{"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=\/wp\/v2\/posts\/2374","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2374"}],"version-history":[{"count":0,"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=\/wp\/v2\/posts\/2374\/revisions"}],"wp:attachment":[{"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2374"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2374"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2374"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}