Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
129 views29 pages

Examples of L TEX

Uploaded by

Johnny
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
129 views29 pages

Examples of L TEX

Uploaded by

Johnny
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

Examples of LATEX

Contents
1. Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1
2. First Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
3. Set Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
4. Algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
5. Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
6. Tables, Diagrams, Tests, Other . . . . . . . . . . . . . . . . . 11
7. Pictures (ESP files) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
8. Maple . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
9. Calligraphic and Blackboard Bold Fonts . . . . . . . . 22
10. PDF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
11. Some LATEX and AMS symbols . . . . . . . . . . . . . . . 23
12. More symbols and graphics . . . . . . . . . . . . . . . . . . . 27

The University of North Carolina at Greensboro


Department of Mathematical Sciences
Greensboro, NC 27402

0
1 Introduction
TEX is a computer typesetting program (a markup language) invented by
Donald Knuth, and is used by the American Mathematical Society to typeset
all of the Society’s publications. In order to use raw TEX one must learn a lot
about the TEX programming language. To simplify the use of TEX, several
programs were written in theTEX language which are easier to use than TEX
itself. The most successful of these were LATEX and AMS-LATEX. These have
now been put into the public domain and combined into a single program
called LATEX2e.
One can learn a lot about LATEX simply by observing examples of its
use. The purpose of this pamphlet is to give some examples. Most of the
examples appear in the following form: the printed (output) version is given
first, marked by a bullet. Immediately following that is the LATEX code that
produced the printed version. If an example takes a full page, we have not
used the bullet. The superscripts (e.g., {L: 21, 77} ) following the lines with
bullets are relevant page numbers in the reference manual “LATEX” by Leslie
Lamport, and should not be confused with footnotes. The examples were
liberated from a variety of sources.
Most of the examples given below were created in the older LATEX. The
main difference, as far as these examples are concerned, is that old LATEX
files started with “\documentstyle” and LATEX2e uses “\documentclass.”
Another difference is that over time new mathematical symbols were made
available by the AMS for LATEX. Most of our examples were written before
AMS symbols were available, and some tricks were used to obtain a few
symbols that now are available from the AMS collection. Use of the AMS
symbols requires putting in the header “\usepackage{amssymb}” following
“\documentclass{article}”. Tables of LATEX and AMS symbols are given
in §11. N.B: The sample theses in UNCG ThesisPackage were written in
the older LATEX. Instead of “\usepackage{amssymb}”, use something like
“\documentstyle[amssymb,stmaryrd,graphicx,epsfig]{uncgthesis}”.
You may not need all of these options.
The stardard reference book for LATEX2e is “A Guide to LATEX2e, Doc-
ument Preparation for Beginners and Advanced Users,” by Helmut Kopka
and Patrick W. Daly. The earlier reference book “LATEX User’s Guide &
Reference Manual” by Leslie Lamport, is still usable.

1
2 First Steps
{L: 9}
• Hello world!
\documentclass{article}
\begin{document}
Hello world!
\end{document}

NB In subsequent examples we will usually omit the

\documentclass{article}, \begin{document}, and \end{document}.

• Hello world! Hello yourself.


{L: 115, 200}

{\Large Hello world!} {\tiny Hello yourself}


{L: 14}
• “ ‘Green ham’ or ‘Eggs’ ” is the question.
‘‘\,‘Green ham’ or ‘Eggs’\,’’ is the question.1
{L: 16, 34, 154, 199}
• An integer is called prime if its only divisors are itself and 1.
An {\bf integer} is called {\em prime} if its only divisors
are itself and 1.

• Green Ham $25.00 Not Recommended


Eggs $1.00 Recommended
Cheddar cheese $.80
{L: 62f f, 179f f }
Yak milk $0.05 Avoid
\begin{tabbing} Cheddar cheesexx \= \$25.00xx \= Not Recommended \kill
Green Ham \>\$25.00\>Not Recommended
Eggs \>\$1.00 \> Recommended
Cheddar cheese \>\$.80 \>
Yak milk \> \$0.05 \> Avoid
\end{tabbing}2
1
The open quotation marks used here are obtained by using the “prime” key usually
located on the top row of the keyboard. The close quotation marks are the usual ones on
the keyboard.
2
The first line takes the longest item from each column; note the use of extra letters
xx to add a little more space between columns

2
• Who proved Pospı́šil’s theorem, Arhangel0 skiı̆ or Erdös? {L: 40}

Who proved Posp\’{\i}\v{s}il’s theorem, Arhangel$’$ski\u\i\ or Erd\"{o}s?

• Greek letters τ, λ, µ, and κ stand for arbitrary cardinal numbers{L: 43}

Greek letters $\tau ,\lambda ,\mu ,$ and $\kappa $ stand for


arbitrary cardinal numbers.

• πw(X) is the π-weight, πχ(X) is the π-character, ψ(X) is the pseu-


docharacter, and ψw(X) is the pseudoweight of the space X.{L: 43}
$\pi w( X)$ is the $\pi $-weight, $\pi \chi ( X) $
is the $\pi $-character, $\psi ( X) $ is the pseudocharacter,
and $\psi w(X) $ is the pseudoweight of the space $X$.

3 Set Theory
{L: 15, 44}
• Ac = {x ∈ X : x ∈
/ A}
$A^{c} = \{x\in X: x\not\in A\}$
{L: 44}
• A ∩ Ac = ∅
$A\cap A^{c}=\emptyset$
{L: 44}
• A ∪ Ac = X
$A\cup A^{c}=X$
{L: 44}
• f :X→B
$f:X \rightarrow B$

• f (f −1 (B) ⊂ B and f −1 (f (A) ⊃ A {L: 44}

$f(f^{-1}(B) \subset B$ and $f^{-1}(f(A) \supset A$

• ∀x, y ∈ IR
3
$\forall x,y \in {\rm I\kern-.2em R}$
3
Use in the unlikely event your TeX does not have AMS Blackboard Bold font.

3

F r∗ (ℵα , α) ⇔Def ∀F : [ℵα ]<ω → ℵα ∃hxi |i < αi ∀i<αxi ∈ [ℵi , ℵi+1 ) ∧ xi 6∈ F 00 {xj |j 6= i}.}

$$Fr^*(\aleph_\alpha,\alpha)\, \Leftrightarrow_{\rm Def}\,


\forall F\colon [\aleph_\alpha]^{<\omega} \to \aleph_\alpha\, \exists
\langle x_i | i < \alpha \rangle \, \forall i {<} \alpha
x_i \in [\aleph_i, \aleph_{i+1}) \,\wedge\, x_i
\not\in F’’\{x_j|j\neq i\}.$$ 4

Y Y
B= Uξ × Xξ
ξ≤α α<ξ<ωmu

$$B= \prod_{\xi\leq\alpha}U_\xi\times\prod_{\alpha<\xi<\om}X_\xi$$

[
Add(I) = {X ⊆ ω ω : (∀ Borel D ⊆ ω ω ×2ω )(∀x ∈ X) Dx ∈ I ⇒ Dx ∈ I}.
x∈X

\[Add({\mathcal I})=\{X\subseteq\omega^\omega:
(\forall\hbox{ Borel }D\subseteq\omega^\omega\times 2^\omega)
(\forall x\in X)\ D_x\in {\mathcal I}\ \Rightarrow
\bigcup_{x\in X}D_x\in {\mathcal I}\}.\]
• Is clβω or ω* an extremally disconnected space?
Is clβω or ω* an extremally disconnected space?{L: 55−57}

\newcommand{\clbw}{\mbox{$cl_{\beta\omega}$}}
\newcommand{\ed}{extremally disconnected}
\newcommand{\wstar}{\mbox{$\omega$*}}
Is \clbw\ or \wstar\ an \ed\ space?
Is $\clbw$ or $\wstar$ an \ed\ space?

• Prove that the following formula is a tautology of F OL

∀x1 ∃x2 (R(x1 , x2 )∨(x1 = x2 )) → (∀x2 ∃x1 (x1 6= x2 ) → ∀x1 ∃x2 (R(x1 , x2 )∨(x1 = x2 )).
4
The double dollar $$· · ·$$ delimiters make the formula print as a displayed formula.
The delimiters \[ · · · \] may be used instead.

4
Prove that the following formula is a tautology of $FO_L$
$$\forall x_1\exists x_2(R(x_1,x_2)\vee (x_1 = x_2))
\rightarrow (\forall x_2 \exists x_1 (x_1 \not= x_2)\rightarrow
\forall x_1\exists x_2(R(x_1,x_2)\vee (x_1 = x_2)).$$

X −Y = [a0 , a1 , · · · , a2n+2 , x] − [a0 , a1 , · · · , a2n+2 , y]


= [a0 , a1 , · · · , a2n+1 , x0 ] − [a0 , a1 , · · · , a2n+1 , y 0 ]
x0 − y 0
≤ 0 0
x y + 2n + 1
(a2n+1 + x1 ) − (a2n+1 + y1 )
=
(a2n+1 + y1 )(a2n+1 + x1 ) + 2n + 1
y−x
= 2
xya2n+1 + a2n+1 (x + y) + (2n + 1)xy
y−x
<
xy + 2n + 2
\begin{eqnarray*}
X - Y & = & [a_0,a_1,\cdots,a_{2n+2},x] - [a_0,a_1,\cdots,a_{2n+2},y] \\
&=&[a_0,a_1,\cdots,a_{2n+1},x^{\prime}]-[a_0,a_1,\cdots,a_{2n+1},y^{\prime}]\\
& \leq & \frac{x^{\prime}-y^{\prime}}{x^{\prime} y^{\prime}+2n+1}\\
& = & \frac{(a_{2n+1} + \frac{1}{x})-(a_{2n+1} + \frac{1}{y})}
{(a_{2n+1} + \frac{1}{y})(a_{2n+1}+\frac{1}{x})+2n+1}\\
& = &\frac{y - x}{xya_{2n+1}^2 + a_{2n+1}(x + y) + (2n+1)xy}\\
& < & \frac{y-x}{xy + 2n + 2}
\end{eqnarray*}

4 Algebra
Pn−1 i
• A formula P (x) = i=0 ai xq in line.{L: 45}

A formula $P(x) = \sum _{i=0}^{n-1}a_ix^{q^{i}}$ in line.


• Same formula
n−1
i
X
P (x) = ai x q
i=0

5
displayed.
Same formula
\[P(x) = \sum _{i=0}^{n-1}a_ix^{q^{i}}\]
displayed.
• xn − 1 = (x − α1 )(x − α2 ) · · · (x − αk )g(x).
$x^n - 1 = (x - \alpha_{1})(x - \alpha_{2}) \cdots(x - \alpha_{k})g(x)$.
a/([w]∼k ,a )
• The formulas are represented by the diagram: [w]∼k −→ [wa]∼k .{L: 45, 52}

The formulas are represented by the diagram:


$[w]_{\sim_{ k}}\stackrel{a/([w]_{\sim_{ k},a})}
{\longrightarrow}[wa]_{\sim_{k}}$.
• Let A = (aij ) be an n × n matrix.
Let $A = (a_{ij})$ be an $n \times n$ matrix.

 {L: 49}
−As, k+1 if i = (k + 1) − 2s
Bi =
As−1, k if i = (k + 2) − 2s

\[B_i = \left\{\begin{array}{ll}
-A_{s,\, k+1} & \mbox{if }i = (k+1) -2s\\
A_{s-1,\, k} & \mbox{if }i = (k+2) - 2s\end{array}\right.\]
5


   {L: 49}
s k+1−s k+1−s−1
(−1) +
s−1 s−2

\[(-1)^s\left[ \left( \begin{array}{c}k+1-s\\s-1\end{array}\right) +


\left(\begin{array}{c}k+1-s-1\\s-2\end{array}\right)\right]\]

 {L: 49, 171}
1 x1 x21 · · · xn−1
1
 1 x2 x22 · · · xn−1
2

V =
 
.. .. .. .. 
 . . . . 
2 n−1
1 xn xn · · · xn
5
Note extra space in subscripts of A and absence of right brace.

6
\[V = \left[\begin{array}{ccccc}
1 & x_1 & x_1^2 & \cdots & x_1^{n-1}\\
1 & x_2 & x_2^2 & \cdots & x_2^{n-1}\\
\vdots & \vdots & \vdots & &\vdots\\
1 & x_n & x_n^2 & \cdots &x_n^{n-1}\end{array}\right]\]

1,...,n
X
f= x̄h ahj xj , ajh = āhj
h,j

\[f = \sum_{h,j}^{1,\ldots,n}\bar{x}_h a_{h_j} x_j ,


\mbox{ }a_{jh} = \bar{a}_{hj}\]
n−1 n−1
• (x, xq , · · · , xq )Mg Mh col(y, y q , · · · , y q )
$(x, x^q,\cdots,x^{q^{n-1}})M_g M_h$col$(y,y^q,\cdots,y^{q^{n-1}})$
• The continued fraction
1
(1)
√ 1
2+
√ 1
2+
√ 1
2+
√ 1
2+ √
2 + ···
can be obtained by typing
\begin{equation}
\def\cfrac#1#2{{\displaystyle\strut#1\over\displaystyle#2}%
\kern-\nulldelimiterspace}
\cfrac{1}{\sqrt{2}+
\cfrac{1}{\sqrt{2}+
\cfrac{1}{\sqrt{2}+
\cfrac{1}{\sqrt{2}+
\cfrac{1}{\sqrt{2}+\cdots
}}}}} \end{equation} 6
6
Note that this equation is numbered, and that the % at the end of the second line
serves to kill the spaces at the end of the line, thus keeping the definition of “cfrac” in one
piece.

7
5 Analysis
{L: 46}
• f (x) = arcsin(ln x)
$f(x) = \arcsin(\ln x)$
• sinh x2 − cosh2 x = 1
$\sinh x^2 - \cosh^2 x = 1$
R 6x−11 {L: 42, 46, 170}
• x2 −2x−1
$\int \frac{6x - 11}{x^2 - 2x - 1}$
6x − 11 {L: 54, 172, 201}
Z

x2 − 2x − 1
$\displaystyle\int \frac{\textstyle 6x - 11}{\textstyle x^2 - 2x - 1}$
ln( 13 )
• t= 1
ln( 23 )
5

$t = \frac{\ln(\frac{1}{3})}{\frac{1}{5}\ln(\frac{2}{3})}$
ln( 13 )
• t= 1
5
ln( 23 )
$\displaystyle t = \frac{ \ln(\frac{1}{3})}{\frac{1}{5}\ln(\frac{2}{3})}$
R 1 √x2 − 1 {L: 42, 52, 170}
• 0 x dx
$\int_0^1 \frac{\textstyle \sqrt{x^2 - 1}}{\textstyle x}\, dx$
Z 1√ 2
x −1
• dx
0 x
$\displaystyle\int_0^1 \frac{\textstyle \sqrt{x^2 - 1}}
{\textstyle x}\, dx$
r
2
• y = ln 3 x2 − 1
x +1
$y = \ln \sqrt[3]{\frac{\textstyle x^2 - 1}{\textstyle x^2 + 1}}$
22
• a + b + · · · +y + z
z}|{
| {z }
26
$\underbrace{a+b+\overbrace{\cdots}^{22}+y+z}_{26}$

8
• f = g ◦ h.
$f = g\circ h$.

• hn0 ((x1 , x2 , · · · , xn )) = (x1 , x2 , . . . , xn , 0, 0, · · ·)


$h^{n}_{0}((x_1,x_2,\cdots,x_n)) = (x_1,x_2,\ldots,x_n,0,0,\cdots)$
7



0 if x is rational
f (x) = {L: 51}
1 if x is irrational

\[f(x) = \left\{\begin{array}{ll}
0 & \mbox{if $x$ is rational}\\
1 & \mbox{if $x$ is irrational}\end{array}\right.\]

• Solve the initial value problem:


dy
= y(e3x y 3 − 1), y(1) = 1.
dx

Solve the initial value problem:\begin{displaymath}\frac{dy}{dx} =


y(e^{3x}y^3 - 1),\mbox{ } y(1) = 1.\end{displaymath}


dx
+ u2 du = 0
Z x Z Z
dx 2
+ u du = 0dx
x
u3
ln |x| + = C
3
1 y
ln |x| + ( )3 = C, or
3 x
3x ln |x| + y 3 = Cx3 .
3

\begin{eqnarray*}
\frac{dx}{x} + u^2du & = & 0\\
\int \frac{dx}{x} + \int u^2du & = & \int 0dx\\
7
Note the difference between centered dots and low dots

9
\ln|x| + \frac{u^3}{3} & = & C \\
\ln|x| + \frac{1}{3}(\frac{y}{x})^{3}& = & C, \mbox{ or} \\
3x^3\ln|x| + y^3& = & Cx^3. \end{eqnarray*}8
• hence we have:
dw
e−3x − 3e−3x = −3e−3x e3x
dx
d  −3x 
e w = −3
Zdx Z
 −3x 
d e w = −3dx

e−3x w = −3x + C
w = −3xe3x + Ce3x

Now substitute back for y.


hence we have: \begin{eqnarray*}
e^{-3x}\frac{dw}{dx} - 3e^{-3x} & = & -3e^{-3x}e^{3x} \\
\frac{d}{dx}\left[e^{-3x}w\right] & = & -3 \\
\int d\left[e^{-3x}w\right] & = & \int -3dx \\
e^{-3x}w & = & -3x + C\\ w & = & -3xe^{3x} + Ce^{3x}
\end{eqnarray*} Now substitute back for y.
• Prove: If f 0 is continuous on [a, b] then for every  > 0 there exists
δ > 0 such that for all x, t in [a, b], if |x − t| < δ then

f (t) − f (x) 0


t−x − f (t) < .

Prove: If $f^{\prime}$ is continuous on $[a,b]$ then


for every $\epsilon > 0$ there exists $\delta > 0$ such that
for all $x,t$ in $[a,b]$, if $|x - t| < \delta$ then
\[\left| \frac{f(t) - f(x)}{t - x} - f^{\prime}(t)\right| < \epsilon.\]

d sin(x + h) − sin x
sin x = lim
dx h→0 h
8
The “equarray” delimiters together with the ampersands center lines of equations on
the (in this case) equal marks. The “*” tells TEX not to number the equations.

10
sin x cos h + cos x sinh − sin x
= lim
h→0
 h 
sin x(cos h − 1) sin h
= lim + cos x
h→0 h h
= cos x

\begin{eqnarray*}
\frac{d}{dx} \sin x & = & \lim_{h\rightarrow0}\frac{\sin(x+h)-\sin x}{h}\\
& = & \lim_{h\rightarrow0}\frac{\sin x\cos h + \cos x\sinh - \sin x}{h}\\
& = & \lim_{h\rightarrow0}\frac{\sin x(\cos h-1)}{h}
+ \cos x\frac{\sin h}{h}\\
& = & \cos x
\end{eqnarray*}

6 Tables, Diagrams, Tests, Other



students since 1992 Specialities Country
A 19 03, 15, 30, 34, 54 Netherlands
B 31 01, 03, 22, 33 Canada
C 8 01,27 Poland
D 27 18, 68, 55, 57, 58 Croatia
E 12 22, 42, 54 Japan
F 7 22, 53, 55, 57, 58 USA
G 17 03, 28, 57 USA
H 10 01, 51, 54, 55, 57 Mexico
\begin{tabular}{|l|c|l|l|}\hline\hline
&students since 1992 & Specialities & Country \\ \hline
A & 19 & 03, 15, 30, 34, 54 & Netherlands\\ \hline
B & 31 & 01, 03, 22, 33 & Canada\\ \hline
C & 8 & 01,27 & Poland\\ \hline
D & 27 & 18, 68, 55, 57, 58 & Croatia\\ \hline
E & 12 & 22, 42, 54 & Japan\\ \hline
F & 7 & 22, 53, 55, 57, 58 & USA\\ \hline
G & 17 & 03, 28, 57 & USA\\ \hline
H & 10 & 01, 51, 54, 55, 57 & Mexico\\ \hline\hline
\end{tabular}

11
• Here is a way to get one of those “end of proof boxes.”

\newcommand{\qed}{\mbox{}\nolinebreak\hfill\fbox{}\medbreak\par}
Here is a way to get one of those "end of proof boxes."\qed

• Exercise 5.2

1. (∀x)(Ax → Bx) Premise


2. (∀y)(By → (∀x)Ax) Premise

Since we must prove the biconditional (∀x)Bx ↔ Ba, we prove each of the
two associated conditionals one at a time. First we prove Ba → (∀x)Bx; so
we assume Ba:

3. Ba Premise for CP (a is a constant; so not flagged)


4. Ba → (∀x)Ax 2, US [a|y]
5. (∀x)Ax 3,4 T
6. Ax 5, US [x|x]

Exercise 5.2
\begin{tabbing}
1. $(\forall x)(Ax\rightarrow Bx)$\hspace{.3in}\= Premise\\
2. $(\forall y)(B_y\rightarrow(\forall x)Ax)$ \> Premise\\
\end{tabbing}
\vspace{-.2in}
Since we must prove the biconditional $(\forall x)Bx\leftrightarrow
Ba$, we prove each of the two associated conditionals one at a
time. First we prove
$Ba\rightarrow(\forall x)Bx$; so we assume $Ba$:
\begin{tabbing}
3. $Ba$\hspace{1.05in}\= Premise for CP ($a$ is a constant; so not
flagged)\\
4. $Ba\rightarrow(\forall x)Ax$ \> 2, US $[a|y]$\\
5. $(\forall x)Ax$\> 3,4 T\\
6. $Ax$\>5, US $[x|x]$
\end{tabbing}

12
 
• Rook’s combinatorial equation in a line of text, x2 + 3x + 1 = .
This is a kludge, but may be adequate for handouts. First, I defined a square
making macro \sq(n,m) where the n,m are used to position the square. I
used trial and error to put the squares together in various patterns, and to
place the big parentheses.

\def\sq(#1,#2){\put(#1,#2){\setlength{\unitlength}{.25cm}
\put(1,0){\line(0,1){1}} % left
\put(2,0){\line(0,1){1}} % right
\put(2,0){\line(-1,0){1}} % bottom
\put(2,1){\line(-1,0){1}} % top
}}
Rook’s combinatorial equation in a line of text, $x^2+3x+1=
\Big(\hspace{-23pt}\vcenter{\begin{picture}(0,20)(0,0)
\sq(3,3)\sq(10,10)\sq(17,3)
\end{picture}}\hspace{-305pt}\vcenter{\Big)}$.
This is a kludge, but may be adequate for handouts. First, I
defined a square making macro \verb@\sq(n,m)@ where the n,m are used
to position the square. I used trial and error to put the squares
together in various patterns, and to place the big parentheses.

13
14

Math. 292 TEST2 April 1, 1993

Show your work for credit. Name


dy
1. (30) For the following functions, find
dx
(a) y = ln |x|

x
(b) y =
ln |x|

2. (30) Find the following antiderivatives:


x−2
Z
(a) 2 dx
x − 4x + 9

sin x − 1
Z
(b) dx
cos x
15

\parindent 0pt %this eliminates paragraph indentation


\pagestyle{headings} %this puts page numberin upper right corner
%the following margin adjustments are personal preference
\oddsidemargin 0in \evensidemargin 0in
\topmargin -0.5in \headheight 12pt \headsep 25pt \footskip
75pt
\textheight 8.5in \textwidth 6.5in
\large
\begin{center}
Math. 292 TEST2 \hspace{.2in}April 1, 1993
\end{center}

\bigskip
Show your work for credit.\hspace{1in}Name\hrulefill

\bigskip
1. (30) For the following functions,
find $ \frac{\textstyle dy}{\textstyle dx}$
\medskip

(a) $\displaystyle y = \ln |x|$


\vspace{1in}

(b) $\displaystyle y = \frac{\textstyle x}{\ln |x|}$


\vspace{1in}

2. (30) Find the following antiderivatives:


\smallskip

(a) $\displaystyle\int\frac{\textstyle x-2}{\textstyle x^2-4x+9}dx$


\vspace{2.4in}
(b) $\displaystyle\int \frac{\textstyle \sin x - 1}
{\textstyle \cos x}dx$%Exercise7.7#78
\vspace{2.4in}

cov(IL) non(IK) cf(IK) cf(IL) c

b d

ℵ1 add(IL) add(IK) cov(IK) non(IL)

Diagram 2

% Diagram by Klaas Pieter Hart


%(note: he did not use Blackboard Bold)
\def\thingy(#1,#2)#3{\put(#1,#2){\makebox(0,0)[b]{#3}}}
\def\edgyl(#1,#2)#3{\put(#1,#2){\line(-1,1){#3}}}
\def\edgyr(#1,#2)#3{\put(#1,#2){\line(1,1){#3}}}
\renewcommand{\topfraction}{.9}
\renewcommand{\textfraction}{.1}
\def\add{\mathop{\rm add}} \def\cov{\mathop{\rm cov}}
\def\nonn{\mathop{\rm non}} \def\cff{\mathop{\rm cf}}

\def\ccc{{\spfont ccc}}
\def\infsets{[\omega]^\omega}
\def\functs{{}^\omega\omega}
\def\pow#1{{\mathcal P}(#1)}
\def\almsub{\mathbin{\subset^*}}
\def\lemodfin{\mathbin{\le^*}}
\def\rng{\mathop{\rm rng}\nolimits}
\def\dom{\mathop{\rm dom}\nolimits}

\def\Kat{{\rm I\kern-.2em K}} %use this if \mathbb is not available


\def\Leb{{\rm I\kern-.2em L}} %ditto

16
\def\cont{${\bf c}$} %use this is Frakture is not available
\def\frb{${\bf b}$} %ditto
\def\frd{${\bf d}$} %ditto

%nodes of the tree


%horizontal:
\def\xnit{70}
\def\xnita{140} \def\xnitb{210} \def\xnitc{280} \def\xnitd{350}
%vertical:
\def\ynit{60} \def\dynit{120}

\begin{figure}[ht]
\begin{center}
\begin{picture}(400,160)(-25,-25)
%caption:
\thingy(175,-25){{\rm Diagram~2}}

%nodes of the tree


%horizontal:
\def\xnit{70}
\def\xnita{140} \def\xnitb{210} \def\xnitc{280} \def\xnitd{350}
%vertical:
\def\ynit{60} \def\dynit{120}

\thingy(0,0){$\aleph_1$}
\thingy(\xnit,0){$\add(\Leb)$}
\thingy(\xnita,0){$\add(\Kat)$}
\thingy(\xnitb,0){$\cov(\Kat)$}
\thingy(\xnitc,0){$\nonn(\Leb)$}
\thingy(\xnita,\ynit){$\bf b$}
\thingy(\xnitb,\ynit){$\bf d$}
\thingy(\xnit,\dynit){$\cov(\Leb)$}
\thingy(\xnita,\dynit){$\nonn(\Kat)$}
\thingy(\xnitb,\dynit){$\cff(\Kat)$}

17
\thingy(\xnitc,\dynit){$\cff(\Leb)$}
\thingy(\xnitd,122){$\cont$}

%edges
%horizontal units:
\def\hnit{30}
%vertical units:
%height of bottom lines and toplines
\def\blh{5} \def\tlh{125}
%lengths of vertical lines
\def\btot{100} %bottom to top
\def\btoh{40} %bottom to half
\def\htot{45} %half to top

\put(5,\blh){\line(1,0){45}} % $\aleph_1$ to add(L)


\put(90,\blh){\line(1,0){\hnit}} % add(L) to add(K)
\put(160,\blh){\line(1,0){\hnit}} % add(K) to cov(K)
\put(230,\blh){\line(1,0){\hnit}} % cov(K) to non(L)
\put(145,64){\line(1,0){60}} % b to d
\put(90,\tlh){\line(1,0){\hnit}} % cov(L) to non(K)
\put(160,\tlh){\line(1,0){\hnit}} % non(K) to cf(K)
\put(230,\tlh){\line(1,0){\hnit}} % cf(K) to cf(L)
\put(300,\tlh){\line(1,0){45}} % cf(L) to \cont
\put(\xnit,15){\line(0,1){\btot}} % add(L) to cov(L)
\put(\xnita,15){\line(0,1){\btoh}} % add(K) to \frb
\put(\xnita,70){\line(0,1){\htot}} % b to non(K)
\put(\xnitb,15){\line(0,1){\btoh}} % cov(K) to \frd
\put(\xnitb,70){\line(0,1){\htot}} % d to cf(K)
\put(\xnitc,15){\line(0,1){\btot}} % non(L) to cf(L)

\end{picture}
\end{center}
\end{figure}

18
The next example illustrates use of minipage.


CALL FOR PAPERS
Ninth Annual IEEE Symposium on

LOGIC IN COMPUTER SCIENCE


July 4–7, 1994, Paris, France

Program Chair: The LICS symposia aim to attract high quality orig-
John Smith inal papers covering theoretical and practical issues
Attn: LICS in computer science that relate to logic in a broad
Department of Computing sense, including algebraic, categorical and topologi-
Imperial College cal approaches.
180 Queen’s Gate Suggested, but not exclusive, topics of interest in-
London SW7 2BZ clude: abstract data types, automated deduction, con-
United Kingdom currency, constructive mathematics, data base the-
[email protected] ory, knowledge representation, lambda and combina-
Phone: (44) 71-589-5111 tory calculi, logical aspects of computational complex-
Fax: (44) 71-581-8024 ity, logics in artificial intelligence, logic programming,
modal and temporal logics, program logic and seman-
tics, rewrite rules, logical aspects of symbolic comput-
ing, problem solving environments, software specifica-
tion, type systems, verification.

19
\documentstyle{article}
\topmargin-0.75in
\marginparwidth 0pt \oddsidemargin 0pt \evensidemargin 0pt
\marginparsep 0pt
\textwidth 6.5in \textheight 10.0in\parskip 6pt \parindent 0pt
\renewcommand{\i}[1]{{\it #1 \/}}
\begin{document}
\thispagestyle{empty}
\begin{center}
{\bf CALL FOR PAPERS}\\[2ex]
{\large Ninth Annual IEEE Symposium on }\\[2ex]
{\Large\bf LOGIC IN COMPUTER SCIENCE }\\[2ex]
{\large\it July 4--7, 1994, Paris, France}
\end{center}
\vspace{.2in}
\small
\begin{minipage}[t]{2.00in}% first column
\parskip 4pt
{\bf Program Chair:} \\[1mm]
John Smith\\
Attn: LICS \\
Department of Computing\\Imperial College\\
180 Queen’s Gate\\London SW7 2BZ\\United \medskip Kingdom\\
{\tt [email protected]}\\
Phone: (44) 71-589-5111\\
Fax: (44) 71-581-8024 \\

\end{minipage}\hskip .20 in
\begin{minipage}[t]{3.5in}% second column%
\parskip 4pt

The {\bf LICS} symposia aim to attract high quality original papers
covering theoretical and practical issues in computer science that
relate to logic in a broad sense, including algebraic, categorical and
topological approaches.

Suggested, but not exclusive, topics of interest include:


{\em abstract data types, automated deduction, concurrency, constructive
mathematics, data base theory, knowledge
representation, lambda and combinatory calculi, logical aspects of
computational complexity, logics in artificial intelligence, logic
programming, modal and temporal logics, program logic and semantics,
rewrite rules, logical aspects of symbolic computing, problem solving
environments, software specification, type systems, verification.}
\end{minipage}\end{document}

20
7 Pictures (ESP files)
We give an example of how to place an ESP (Encapsulated PostScript) file into a
LATEX document. It should be noted, however, that this feature depends on the
LATEX package installed on your computer. Whether or not a figure will show in
your TEX previewer, or print on paper depends on whether your LATEX package
has the necessary screen or print drivers (these drivers are not part of basic LATEX).
To use the method in this example, the graphic file should be an EPS file.
Other graphic files, such as JPEG files, may not work using the code below 9 .
Possibly the graphics program used to make your figure or picture can save your
file as EPS. If not, there are a number of programs that will convert graphic files
to an ESP file. For example, in unix, one may use gimp or xv, or one may convert
the file using Photoshop. Be aware that EPS files tend to be large.
Here is how we put the rather simple graphic file “pedals.eps” (file size 40K)
in this document.

Figure 1: Pedals

First, put \usepackage{epsfig} in the header; say immediately after \usepackage{amssymb}.


Next, put your picture file (“pedals.eps” in this example) in the same folder
with your LATEX document.
Third, put some version of the following code in the document:

\begin{figure}[h]
\centerline{\epsfbox{pedals.eps}}
\caption{Pedals}
\label{twopetals}
\end{figure}

Pictures are discussed in “A Guide to LATEX2e, Document Preparation for Be-


ginners and Advanced Users,” by Helmut Kopka and Patrick W. Daly.

9
The program TeXShop for Macintosh OS X, works with JPEG files, but not ESP files!

21
8 Calligraphic and Blackboard Bold Fonts
LATEX includes twenty six upper case letters in a special type style called Calli-
graphic. Calligraphic letters have been used several times in the previous examples.
For example, A, B, C, · · · . The previous sentence is obtained by typing

For example,$\mathcal A, \mathcal B,\mathcal C,\cdots.$

assuming one is using “\usepackage{amssymb}.”

There are twenty six uppercase letters in Blackborad Bold type style, Black-
board bold is not a part of LATEX, but is included with \usepackage{amssymb}.
For example, the symbols Z and R are often used to denote the set of integers
and the set of real numbers, respectively. Conside the following example:
• Recall N ⊂ Z ⊂ Q ⊂ R.
Recall $\mathbb N\subset\mathbb Z\subset \mathbb Q\subset \mathbb R$.

Other fonts are discussed in the book by Kopka and Daily mentioned in §1.

9 Maple
One can also produce LATEX code from Maple. For example the Maple code

latex(Limit(4*x^5+sin(x)^2, x=0,right));

produces the LATEXcode

\lim _{x\rightarrow 0^{+}}4\,{x}^{5}+\left (\sin(x)\right )^{2}

which produces

limx→0+ 4 x5 + (sin(x))2

when printed using LATEX, but we do not pursue this here (see Maple Help).

10 PDF
How can you sent electronically a TEX manuscript to someone who may not have
TEX or who may not have all the drivers that you have for displaying pictures
and other graphics files? A good alternative is to send instead a PDF (portable
document format) file. Some government agencies and journals require submission
of manuscripts in PDF.
In Macintosh OS X, PDF files are automatic or immediately avaliable. For
Windows and others, once you have your TEX file, use it to produce a postscript
file (e.g., dvips), and then use a program to convert a postscript file to a PDF

22
file. There are many programs that can do this conversion. One that is free is
the program “GhostScript”. When you have GhostScript running, use the internal
program called “ps2pdf.” This will convert your .ps file to a .PDF file, and anyone
with Adobe Acrobat c Reader can then read and print your PDF file in all its
glory (assuming your TEXpackage had the necessary drivers to start with).

11 Some LATEX and AMS symbols


Lowercase Greek letters

α \alpha β \beta γ \gamma δ \delta


 \epsilon ε \varepsilon ζ \zeta η \eta
θ \theta ϑ \vartheta ι \iota κ \kappa
λ \lambda µ \mu ν \nu ξ \xi
π \pi $ \varpi ρ \rho % \varrho
σ \sigma ς \varsigma τ \tau υ \upsilon
φ \phi ϕ \varphi χ \chi ψ \psi
ω \omega

Uppercase Greek letters

Γ \Gamma ∆ \Delta Θ \Theta Λ \Lambda


Ξ \Xi Π \Pi Σ \Sigma Υ \Upsilon
Φ \Phi Ψ \Psi Ω \Omega

Miscellaneous symbols

† \dag ‡ \ddag § \S
c \copyright
¶ \P # \# % \% \_
{ \{ } \}

Math Mode Accents

â \hat{a} ȧ \dot{a} ä \ddot{a}


ǎ \check{a} ă \breve{a} á \acute{a}
ā \bar{a} à \grave{a} ~a \vec{a}

23
Binary operators (math mode)

± \pm ∓ \mp ∪ \cup \ \setminus


] \uplus · \cdot u \sqcap t \sqcup
∗ \ast ? \star  \diamond / \triangleleft
. \triangleright o \wr ◦ \circ \bigcirc
• \bullet ÷ \div C \lhd B \rhd
∨ \vee ∧ \wedge \odot ⊕ \oplus
\ominus ⊗ \otimes \oslash q \amalg
† \dagger ‡ \ddagger E \unlhd D \unrhd

Other Symbols (these do not need math mode)

† \dag § \S c \copyright
¶ \P £ \pounds # \#
$ \$ % \% & \&
\_ { \{ } \}

Arrows (math mode)

← \leftarrow ⇐ \Leftarrow → \rightarrow


⇒ \Rightarrow ←− \longleftarrow ⇐= \Longleftarrow
−→ \longrightarrow =⇒ \Longrightarrow ↔ \leftrightarrow
7 → \mapsto ⇐⇒ \Longleftrightarrow 7−→ \longmapsto
←- \hookleftarrow ,→ \hookrightarrow ( \leftharpoonup
* \rightharpoonup
\rightleftharpoons \leadsto
↑ \uparrow ⇑ \Uparrow l \updownarrow
↓ \downarrow ⇓ \Downarrow l \updownarrow
% \nearrow & \searrow . \swarrow
- \nwarrow

Miscellaneous symbols (math mode)

ℵ \aleph 0 \prime ~ \hbar


⇒ \Rightarrow ←− \longleftarrow ⇐= \Longleftarrow
ı \imath ∇ \nabla  \jmath
` \ell > \top ⊥ \bot
℘ \wp < \Re k \|
= \Im ∠ \angle ∂ \partial
∞ \infty \ \backslash  \Box
♦ \Diamond ∀ \forall ∃ \exists
] \sharp ¬ \neg [ \flat
\ \natural f \mho ♣ \clubsuit
♦ \diamondsuit ♥ \heartsuit ♠ \spadesuit

24
Relations (math mode)

≤ \leq ≥ \geq ≺ \prec


 \preceq  \succ  \succeq
 \ll  \gg ⊂ \subset
⊃ \supset ⊆ \subseteq ⊇ \supseteq
@ \sqsubset A \sqsupset v \sqsubseteq
w \sqsupseteq ∈ \in 3 \ni
` \vdash a \dashv  \Box
^ \smile | \mid _ \frown
k \parallel ¬ \neg ⊥ \perp
≡ \equiv ∼
= \cong ∼ \sim
./ \bowtie |= \models ≈ \approx
' \simeq ∝ \propto  \asymp
.
= \doteq o
n \Join

Delimiters (math mode)

( ( ) ) [ [
] ] { \{ } \}
b \lfloor c \rfloor d \lceil
e \rceil h \langle i \rangle
\ \backslash | \vert k \Vert
↑ \uparrow ⇑ \Uparrow  \blacksquare
↓ \downarrow ⇓ \Downarrow l \updownarrow
m \Updownarrow p \ulcorner q \urcorner
x \llcorner y \lrcorner / /

Variable-sized symbols (math mode)


P T Q
S \sum ` \bigcap F \prod
R \bigcup W \coprod H \bigsqcup
V \int J \bigvee N \oint
L \bigwedge U \bigodot \bigotimes
\bigoplus \biguplus

Function Names (math mode)

arccos \arccos cosh \cosh det \det inf \inf


lim sup \limsup Pr \Pr tan \tan arcsin \arcsin
cot \cot exp \exp lg \lg log \log
dim \dim ker \ker ln \ln sec \sec
sin \sin arg \arg csc \csc gcd \gcd
lim \lim max \max sinh \sinh cos \cos
deg \deg hom \hom lim inf \liminf min \min
arctan \arctan arccos \arccos sup \sup

25
AMS Arrows (math mode; requires package{amssymb})

L99 \dashleftarrow 99K \dashrightarrow ⇔ \leftleftarrows


↔ \leftrightarrow  \rightleftarrows W \Lleftarrow
V \Rrightarrow  \twoheadleftarrow  \twoheadrightarrow
 \leftarrowtail  \rightarrowtail " \looparrowleft
# \looparrowright \leftrightharpoons
\rightleftharpoons
x \curvearrowleft y \curvearrowright  \Lsh
 \Rsh  \upuparrows  \downdownarrows
 \upharpoonleft  \upharpoonright ( \multimap
\rightsquigarrow ! \leftrightsquigarrow 8 \nleftarrow
9 \nrightarrow : \nLeftarrow ; \nRightarrow
= \nleftrightarrow < \nLeftrightarrow

AMS Binary Relations (math mode; requires package{amssymb})

5 \leqq = \geqq 6 \leqslant


> \geqslant 0 \eqslantless 1 \eqslantgtr
. \lesssim & \gtrsim / \lessapprox
' \gtrapprox u \approxeq h \eqsim
l \lessdot m \gtrdot ≪ \lll
≪ \llless ≫ \ggg ≫ \gggtr
≶ \lessgtr ≷ \gtrless Q \lesseqgtr
R \gtreqless S \lesseqqgtr T \gtreqqless
+ \doteqdot P \eqcirc : \risingdotseq
$ \circeq ; \fallingdotseq , \triangleq
v \backsim ∼ \thicksim w \backsimeq
≈ \thickapprox j \subseteqq k \supseteqq
b \Subset c \Supset , \triangleq
4 \preccurlyeq < \succcurlyeq 2 \curlyeqprec
3 \curlyeqsucc - \precsim C \vartriangleleft
 \vDash \Vdash  \Vvdash
` \smallsmile p \shortmid a \smallfrown
q \shortparallel l \bumpeq G \between
m \Bumpeq t \pitchfork ∝ \varpropto
 \backepsilon J \blacktriangleleft I \blacktriangleright
∴ \therefore ∵ \because

26
AMS Binary Operators (math mode; requires package{amssymb})
u \dotplus n \ltimes r \smallsetminus
o \rtimes e \Cap d \Cup
i \rightthreetimes h \leftthreetimes Z \barwedge
Y \veebar f \curlywedge g \curlyvee
[ \doublebarwedge \boxminus \boxdot
 \boxtimes  \boxplus ~ \circledast
 \circleddash } \circledcirc > \divideontimes
| \intercal  \centerdot
AMS Miscellaneous Symbols (math mode; requires package{amssymb})
~ \hbar 8 \backprime } \hslash
∅ \varnothing M \vartriangle O \triangledown
 \square ♦ \lozenge s \circledS
N \blacktriangle H \blacktriangledown  \blacksquare
 \blacklozenge F \bigstar ∠ \angle
^ \sphericalangle ] \measuredangle @ \nexists
{ \complement ð \eth ` \Finv
 \diagup  \diagdown a \Game
k \Bbbk  \restriction
AMS Negative relations (math mode; requires package{amssymb})
≮ \nless ≯ \ngtr  \nleq
 \ngeq
\nleqslant \ngeqslant
 \nleqq  \ngeqq \lneq
\gneq  \lneqq \gneqq
\lvertneqq  \gvertneqq  \lnsim
 \gnsim  \nsucceq  \precnsim
 \succnsim  \precnapprox  \succnapprox
 \lnapprox  \gnapprox  \npreceq
 \nsim  \ncong . \nshortmid
/ \nshortparallel - \nmid ∦ \nparallel
0 \nvdash 2 \nvDash 1 \nVdash
3 \nVDash 6 \ntriangleleft 7 \ntriangleright
5 \ntrianglelefteq 4 \ntrianglerighteq * \nsubseteq
+ \nsupseteq " \nsubseteqq + \nsupseteq
( \subsetneq ) \supsetneq \varsubsetneq
! \varsupsetneq $ \subsetneqq ) \supsetneq
 \precneqq  \succneqq ⊀ \nprec
 \nsucc & \varsubsetneqq ' \varsupsetneqq

12 More symbols and graphics


Postscript printers allow the possibility to including extensive graphics in TeX files.
Several standard packages are the graphics and graphicx packages. These packages

27
are discussed in “A Guide to LATEX2e, Document Preparation for Beginners and
Advanced Users,” by Helmut Kopka and Patrick W. Daly.
Recently, one of our master’s students needed a symbol not in the above lists
in §11. He needed a two headed arrow with the arrow pointing upward and a two
headed arrow with the arrow pointing downward. Two headed arrows pointing to
the left and right are available in the list AMS Arrows (math mode), but none
of the list in §11 have the symbols he needed. To get the desired symbols, the
student used a “rotate command” in the graphicx package to rotate the left and
right two headed arrows by 270 degrees. He put in his preamble
\newcommand{\Lower}{\rotatebox[origin=c]{270}{$\twoheadrightarrow$}}
\newcommand{\Upper}{\rotatebox[origin=c]{270}{$\twoheadleftarrow$}}.
He used the commands $\Lower$ and $\Upper$ to produce the desired symbols.


• Also A = y so x v a << y.
Also $A = \Lower y$ so $x\sqsubseteq a << y$.
A problem that may occur is that some TeX previewers may not show the
rotated symbol correctly. They may show the (unrotated) symbol unchanged,
or higher on the line or lower on the line. Again this is a problem with the
drivers. The rotated symbol should print correctly (to paper or to a PDF file) and
the Windows previewer “dviout” (download from www.ctan.org) should show the
rotated symbols correctly.

Jerry E. Vaughan, November 1999.


Revised January 2003 and August 2003

28

You might also like