Introduction to LaTeX Basics
Introduction to LaTeX Basics
l. \document class{article}
3. \end{document}
The first statement tells LaTeX what kind of document it is to process, as there
are different style rules for different kinds of documents. We will use the
article document class exclusively in this tutorial. Other possible classes
include report, book, and letter.
The default font size for each class is 10 point. You can use 11 point or 12
point fonts by including this information in the \documentclass command as \
documentclass [llpt) {article} or \documentclass [12pt] {article}. You could
also use \documentclass [IOpt] {article}, but since this is the default you don't
need to type the (10pt]' part,
In general, required information is included in LaTeX commands in braces o,
while optional information is included in square brackets l].
The \documentclass command must appear at the very beginning of your
LaTeX document, before any other LaTeX commands, or you will get an error
message.
In addition, you need an editor that produces plain text without formatting
commands as well as a good spell-checker.
Jim Beuerle has arranged for all of these programs to be installed on Elon's lab
PC's, as well as a program TeXShe11 to coordinate them.
You can start TeXShe11 either from a desktop seashell icon (for the machines
in Duke 201, 204, and 209) or from the Start/Coursevare/Math menu (for the
lab machines).
To use TexShe11, you need to follow the following steps:
1. You should either create a new LaTeX file with File/Nev or open an
existing LaTeX file with File/ Open.
2. You need to designate the main file that you will be working with, since
LaTeX files can include Other LaTeX files and the programs need to
know which one to use; a number of secondary files will be created with
the same filename but different extensions. Use File/Main File.
3. You should use the main editing screen to enter and revise your work.
4. Always spell-check or your teachers will laugh and/or cry at your work:
use Edit/Spe11 Check.
5. Press the Tex button to run the LaTeX program on your file. A small
window will open and close during this time; any error messages will
show up there: if successful the window will close itselE If not, you will
need to type a.n "x" and hit Enter to close it after reading the error
message.
6, If you want to see the warnings and error messages later, press the Log
button.
c,
AIM •
To make a table data in LATEX
LATEX CODE
Ndocumentclass{article)
lc lc lc lc lc l)
Xhline
Xhline
1& & 123456789 & aaaaaa\\
\hline
2& & Ntextit{yyyy} & 987654321 & bbbbbb\\
\hline
3& & 567894321 & cccccc\\
\hline
Xend{document}
EX . NO
DATE :
ATM :
To make a table of mathematical symbols using latex
LATEX CODE
Ndocumentclass{articl
e) use pac kage
{tabula rx) use pac
kage {xcolo r}
\ begin {center} \begin {LARGE)
\ LaTex \medspace MATHEMATICAL SYMBOLS
Xend{LARGE) Nend{center)
\begin{center}
\begin{tabular}{ lc lc lc lc l}
Xhline
lc lc lc lc l}
\hline
41 & & $ Nsw$ & \textbac kslash stm
bigotimes \ textbackslash ne \\
Xhline
48 & & $\bigop1usS & \ textbackslash
bigodot
Xhline
49 & & $\
bigotimes$ & \textbackslash
bigwedge
\hline
50 & & $\bigodotS & Ntextbackslash
bigsqcup
\hline 51 & Xcolcr{red} {bigvee} & $\bigvee$ & Xtextbac
kslash bigvee Xhlzne
52 & & $\bigwedge$ & \textbackslash
\hline
53 & R $\bigsqcup$ \textbackslash
\hline
54 & & SNtan$ & \textbac kslash tan
\hline
55 & R $\cos$ & \textbac kslash cos
Xhline
56 & & S\csc$ & \textbac kslash csc
\hline
57 & & $ Nexp$ & \textbac kslash exp
Xhline
58 & & $\Omega$ & \textbac kslash
equiv \hline Omega \\
59 & & SNpsi$ & \textbac kslash psi
\ textbac kslash approx \hline
60 & & $\omega$ & \textbac kslash
\hline omega \\
cong \\
61 & & $\sin$ & \textbac kslash sin
\ textbackslash simeq
Xhline
\hline
65 & congruent) & S\cong$ & \textbackslash
\hline
66 & similar or equal to & $\simeq$ &
Xhline
67 & similar to ) & S\sim$ & \textbackslash sim
\hline
68 & proportional to} & $\propto$ &
\hline
69 & not equal) & S\neS & Ntextbackslash neq
\hline or
70 & equal to) & $$ &
Xhline
71 & parallel with) & $\para11e1S &
textbackslash parallel
\hline
72 & asymptotic to) & $\asymp$ &
\ textbackslash asymp
Xhline
73 & member of) & S\inS & itextbackslash in \\
Xhline 74 & & $\mode1sS &
Xtextbackslash models
\hline
75 & perpendicular with} & $\perpS &
\ textbackslash perp
\hline
76 & not member of) & S\notxn$ & \
csc \\ textbackslash
\hline 77 & & $\mid$ & Xtextbac kslash
mid
Xhlzne
78 & empty set) & $\emptyset$ &
\ textbackslash
emptyset
\hline
7g R AB)$ &
\ textbackslash
overline
\hline
86 & & S\ang1eS & Xtextbac kslash angle \\
\hline
\end {center}
\end {document}
implied by (only if)) & $\Long1eftarrow$ &
\begin{enume
rate) \
item $
(a+b
\item $
$ (a+b
\ item $
\ item $
\item $
mma . $
Xitem $ (a 1+b 1B2+b IA2+2a 1b 1 .$
\ item $ (xhn {n -1}} .$
\item $ Xint x A n .S
\item $ . S
\item $ Nint sin\theta .$
\end {enume rate)
AIM .
To make a letter using LATEX
LATEX CODE •
Thanking you,
Xend{center)
Yours
faithfully , \\ xxx
Xend{flushright}
Xend{document}
EX . NO
DATE :
AIM .
To make a theorem using latex
LATEX CODE
\ linebreak
\ linebreak
{2n}
v
2w n+f {ml}v_mw_l+
.+ nS Xlinebreak S\the refo res t is expressed
as a linear combination of and . . . , n with coefficient in F . \\ \linebreak \noindent
{Xcolor{cyan} CLAIM \ { $v_iw . . tm and j=1t2t , n \ } is linearly independent . \
linebreak Let
2w_n+f_
N linebreak
f
independent of K
1=1, 2,
over .
X linebreak $\therefore$ $\fo rall$ 2. and j=1,2,
\ linebreak $\the refore$ is a linearly independent
over F \\ Xlinebreak
$ \ is a basis of L over
\ linebreak $\therefc re$ The number cf elements in the basis is [L
ilinebreak SNtherefcreS [L [L [K Xend {document)
Xend@natrix} $
Xbegin {pmat rix}
$ rix}
$ rix}
Xend{document)