LaTeX2HTML Demonstration LaTeX Docvan abelvan141.abel@gmail.comSouthwest University01/24/2013Keywords. Latex, Html
Abstract. This 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.
1. What did This Doc Do
To 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. 2. How to Get this Doc
This doc has published with the LaTeX2HTML plugin with version higher than 1.1.0, the LaTeX2HTML plugin can be download at WordPress.com. 3. Itemize and Enumerate: How to List Stuffs
As you have already saw, we can list the element as
Firstly
Secondly
What’s more you can nest them, for example
Firstly
Secondly
The first item of Second
The second item of Second
The first item of the third item of second item
Enumerate works almost the same as itemize, except the style is different. For example replace enumerate in the above example with enumerate, then we get:
Firstly
Secondly
The first item of Second
The second item of Second
The first item of the third item of second item
4. The Color Scheme: How to Colorize You Content
Firstly, you must decide which class your content belonged to, the text content or the mathematics content, since these two classes are proceeded by different scheme, text is by latex2html and mathematics by mathjax.
Just as in Latex, the you can set a color for your formula, for example a+b,a+b,a+b
a+bc+d,aa+b,aa+b
On the other hand, if you want to give color for your text content, then you should use something like this:
red and blue and green and cyan and magenta and yellow. 5. How to Write a Theorem
There are two group of environments, which proceed the content such as 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 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 thm for Theorem:
First group: defn(Definition), lem(Lemma), prop(Proposition), thm(Theorem), cor(Corollary), rem(Remark), excs(Exercise), proof(Proof)
Second group: prob(Problem), answer(Answer)
Mixed: examp(Example), quote(Quotation)
I will go through the two group one by one, let’s begin with the first group. 5.1. Definition, Lemma, Proposition, Theorem, Corollary…5.1.1. Basic Usage of Environments
Here is an example of definition environment:
Definition 1. Suppose that (X,M) and (Y,N) are measurable spaces,
and f:X→Y is a map. We call f is measurable if for every B∈N
the set f−1(B) is in M.
The other is similar, just replace defn with any one of the above environment:
Remark 1. If Y is a topological space, and N is the σ-algebra of Borel sets,
then f is measurable if and only if the following condition satisfied:
For every open set V in Y, the inverse image f−1(V) is measurable.
5.1.2. Assign a Name for Your Theorem
You can even assign a name to these environment, just as you did in latex, use [text] just behind the environment, for example:
Lemma 2 (fundamental lemma of integration). Let {fn} be a Cauchy sequence of step mappings. Then there exists a subsequence which converges pointwise almost everywhere, and satisfies the additional property: given ε there exists a set Z of measure <ε such that this subsequence converges absolutely and uniformly outside Z.
5.1.3. The Proof EnvironmentThe following are the proof environment, and some more examples, if you are impatient to other contents, then just skip this subsection by click 5.2.
Proof . For each integer k there exists Nk such that if m,n≥Nk, then
‖fm−fn‖1<122k.
We let our subsequence be gk=fNk, taking the Nk inductively to be strictly increasing. Then we have for all m,n:
‖gm−gn‖1
We shall show that the series
g1(x)+∞∑k=1(gk+1(x)−gk(x))
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 Yn be the set of x∈X such that
|gn+1(x)−gn(x)|≥12n.
Since gn and gn+1 are step mappings, it follows that Yn has finite measure. On Yn we have the inequality
12n≤|gn+1−gn|
whence
12nμ(Y)=∫Yn12n≤∫X|gn+1−gn|≤122n.
Hence
μ(Yn)≤12n.
Let
Zn=Yn∪Yn+1∪⋯.
Then
μ(Zn)≤12n−1.
If x∉Zn, then for k≥n we have
|gk+1(x)−gk(x)|
and from this we conclude that our series
∞∑k=n(gk+1(x)−gk(x))
is absolutely and uniformly convergent, for x∉Zn. This proves the statement concerning the uniform convergence. If we let Z be the intersection of all Zn, then Z has measure 0, and if x∉Z, then x∉Zn for some n, whence our series converges for this x. This proves the lemma.
5.1.4. More Examples of Environments
Theorem 3. Let fn be a Cauchy sequence in L1 which is L1-convergent to an element f in L1. Then there exists a subsequence which converges to f almost everywhere, and also such that given ε, there exists a set Z of measure <ε such that the convergence is uniform on the complement of Z.
Corollary 4. An element f∈L1 has seminorm ‖f‖1=∫X|f|dμ=0 if and only if f is equal to 0 almost everywhere.
Proposition 5 (Monotone Convergence Theorem). Let {fn} be an increasing (resp. decreasing) sequence of real valued functions in L1 such that the integrals
∫Xfndμ
are bounded. Then {fn} is a Cauchy sequence, and is both L1 and almost everywhere convergent to some function f∈L1.
Proposition 6 (Fatou’s Lemma). Let {fn} be a sequence of real valued non-negative functions in L1. Assume that
lim inf‖fn‖1
is exists (so is a real number ≥0). Then lim inffn(x) exists for almost all x, the function lim inffn is in L1, and we have
∫Xlim inffndμ≤lim inf∫Xfndμ=lim inf‖fn‖1.
5.2. The Problem, Answer Environments
The second group of environments are provided for discussion, after all, this is a discussion platform. They are: prob for Problem, examp for Example, and answer for Answer.
It almost works the same as the first group, for example
Problem 1 (Egoroff’s theorem). Assume that μ is σ-finite. Let f:X→E be a map and assume that f is the pointwise limit of a sequence of simple maps {φn}. Given ε, show that there exists a set Z with μ(Z)<ε such that the convergence of {φn} is uniform on the complement of Z.
But, the differences between them is that, the answer is numbered with prob (the examp, excs, rem will numbered independently), to see this, for example:
Answer 1.1. Assume first that μ(X) is finite. Let Ak be the set where |f|≥k. The intersection of all Ak 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 L1(μ) and you can use the fundamental lemma of integration.
Answer 1.2. This is another answer for the problem.
You should note that the number of answer is reset to 1 by prob, of course, more sensible. For example:
Problem 2. 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?
There are the answers for this problem:
Answer 2.1. In fact, you can define the integral of complex function directly.
Answer 2.2. There is another more instructive answer…
5.3. The Exercise Environment
Maybe, at somewhere, you want the reader consider about something, then you can use excs environment for Exercise. Please keep in mind that it will have independent numbering, just as prob, but will not reset the number of answer. Here is an example:
Exercise 1. Suppose (X,μ) is a measure space, and that f is measurable, then ∫Xfdμ=0 if and only if f≡0 almost everywhere.
5.4. 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 quote to deal with these stuff. For example:
Before the theorem
Theorem 7. Let Ω⊂Rn and u:Ω→R, then
If u∈C2(Ω) is harmonic in Ω, then u satisfies MVP;
If u∈C(Ω) satisfies MVP, then u is smooth and harmonic.
we want to add a comment on it, then you can use
A function satisfying mean-value properties is only required to be continuous. However, a harmonic function is required to be C2. Thus, the equivalence of this two kind of functions will be significant.
6. Auto Numbering and Referring Back6.1. Auto Numbering and Referring Back to Equations6.1.1. Basic Usage of Mathematical EnvironmentsAll the mathematical environments: equation, align, multline, gather will auto-numbering. For example
{3=2x+y3=y+2x
An example of multline, which will make the last line flush right:
∫ba{∫ba[f(x)2g(y)2+f(y)2g(x)2]−2f(x)g(x)f(y)g(y)dx}dy=∫ba{g(y)2∫baf2+f(y)2∫bag2–2f(y)g(y)∫bafg}dy
The next example will show how to numbered the equation at a given line:
φ(x,z)=z–γ10x–∑m+n≥2γmnxmzn=z–Mr−1x–∑m+n≥2Mr−(m+n)xmznζ0=(ξ0)2,ζ1=ξ0ξ1
6.1.2. Auto Numbering Scheme of EquationsI 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
automatically numbering theorems, which can be realize by set CSS‘s before element with a counter, but it may not work for IE6;
automatically numbering sections, and which can produce a table of contents, as you have already see.
6.1.3. How to Numbered Equations by 3.a and 3.bHere is an example with varied number:
x2+y2=z2,x,y,z∈Zx3+y3=z3,x,y,z∈Z
x4+y4=z4,x,y,z∈Z
For example, if you write another equation, which you would like to numbered automatically, then this equation will be numbered as (8) in the present situation, since we already used 7 in 7.a.b. For example,
∫ba{∫ba[f(x)2g(y)2+f(y)2g(x)2]−2f(x)g(x)f(y)g(y)dx}dy=∫ba{g(y)2∫baf2+f(y)2∫bag2–2f(y)g(y)∫bafg}dy
发表回复