Professional Documents
Culture Documents
Beamer PDF
Beamer PDF
Basics of LATEX
05 February 2014
Installing LATEX
Configuring TeXnicCenter
Start up Commands
\documentclass[options]{style}
Style include article, report, and book
Options include fontsizes (i.e. 9pt, 10pt, etc.) and paper sizes
(i.e. legalpaper, letterpaper, a4paper).
\begin{document}, \end{document}
Type what you want to see in your output between these two
commands.
Parts
Preamble
This is what is between
\documentclass
and
\begin{document}
This is where we import packages and include other
modifications to the document.
Document Environment
This is what is between
\begin{document}
and
\end{document}
Example
\documentclass[9pt]{article}
\begin{document}
Hello World!
\end{document}
Basic Commands
\textbf{}
Hello World!
\textit{}
Hello World!
\textsc{}
Hello World!
\noindent
\\
- new line.
\\ plus a space between lines
- new paragraph.
Alignment Environments
\begin{center}, \end{center}
This text is centered.
\begin{flushleft}, \end{flushleft}
To the left, to the left.
\begin{flushright}, \end{flushright}
To the right, to the right.
Itemize Environment
This environment
creates a bulleted
list
that can be nested
and nested
Itemize Environment
\begin{itemize}
\item This environment
\item creates a bulleted
\item list
\begin{itemize}
\item that can be nested
\begin{itemize}
\item and nested
\end{itemize}
\end{itemize}
\end{itemize}
Enumerate Environment
1 This environment
2 creates a numbered
3 list
1 that can be nested
1 and nested
Enumerate Environment
\begin{enumerate}
\item This environment
\item creates a numbered
\item list
\begin{enumerate}
\item that can be nested
\begin{enumerate}
\item and nested
\end{enumerate}
\end{enumerate}
\end{enumerate}
\begin{enumerate}
\item[A.] First item
\item[B.] Second item
\end{enumerate}
Typesetting Math
A mathematical expression is enclosed by a dollar sign (for an
inline expression) or a double dollar sign (for a display styled
expression). e.g.
will produce
the expression x + 4
while
the expression $$x+4$$
will produce
the expression
x +4
Lapaan, R. D. February 2014 Basics of LATEX
Installing LATEX Commands
Typesetting Math
^{}
- superscript
_{}
- subscript
\leq
- less than or equal to
\geq
- greater than or equal to
Typesetting Math
\sqrt{}
- square root
\sqrt[n]{}
- nth root
\frac{numerator}{denominator}
- for fractions
\displaystyle
- for a display styled inline expression
Example
Typeset:
x2 1
Solve for x in + 2x + 5 =
4 16
Solve for x in
1
1 q
3 x+ 1
x1
Example
\begin{itemize}
\item Solve for $x$ in
$\displaystyle \frac{x^{2}}{4}+2x +5=\frac{1}{16}$
\item Solve for $x$ in
$$ 1-\frac{1}{\sqrt[3]{x+\frac{1}{\sqrt{x-1}}}} $$
\end{itemize}
Trigonometric Functions
Greek Alphabet
\theta
-
\Theta
-
i.e. The commands for Greek letters are the spelled out letters
itself and if we want a capital Greek letter, we just capitalize the
first letter in the command.
Example
Typeset:
sin cos
tan + cot = +
cos sin
Example
\int_{lowerlimit}^{upperlimit}
Z upperlimit
lowerlimit
\frac{dx}{dt}
dx
dt
\frac{\partial x}{\partial t}
x
t
\sum_{n=1}^{k}
k
X
n=1
\prod_{n=1}^{k}
k
Y
n=1
Why resize?
Unresized:
x +1
( )
x2 + 1
Resized:
x +1
x2 + 1
How to resize?
\left( <insert expression here> \right)
\left\{ <insert expression here> \right\}
\left[ <insert expression here> \right]
So basically, you just use
\left, \right
Aligning Expressions
2x + 5 7
2x + 5 5 7 5
2x 2
2x 2
2 2
x 1
Aligning Expressions
Aligning Expressions
\begin{align*}
2x+5 &\leq 7\\
2x+5 - 5 &\leq 7 -5\\
2x &\leq 2\\
\frac{2x}{2} &\leq \frac{2}{2}\\
x &\leq 1
\end{align*}
Thank You! : )