Document Sample
LaTex Powered By Docstoc

By Wen Ying Gao
What is LaTeX?
LaTeX is a typesetting system with the
features that enhance the formatting of the
It is efficient for using on publication of
books or articles.
It can save user’s time by automatically
formatting the sections, equations, and
pictures of the documents.
   Example of LaTeX:
Here is a sample of LaTeX syntax:
\ttfamily\title{Wonderful Town}
\author{Wendy Gao}
\date{February 2006}
   \itshape There is a \bfseries{Wonderful Town}
     \mdseries{located at the end of the country. This town full of
     happy people….}
Sample of PDF formatted of the
Syntax of the LaTeX
Using LaTeX to produce a document:
       (The text is typed here)
LaTeX will automatically indent and put in
paragraph for the text by simply double line the
text. For no indent paragraph, we can use the
\noindent control sequence at the beginning of the
   Example for creating paragraphs
   in LaTeX:
During the 1960s, many large software development efforts
   encountered severe difficulties. Software schedules were
   typically late, costs greatly exceeded budgets and the
   finished products were unreliable.
\vspace{10 mm}
People began to realize that software development was a far
   more complex activity than they had imagined.
LaTeX for Simple Document
By using LaTeX, all the document formats
are typed within the text.
LaTeX using control sequences, which
consist of a backslash follow by a string of
letters, to indicate the format of the text.
      Text Format Control Sequences
 To change the font of the text, we can use the control
   sequences to edit particular word or a group of words.
Control Sequences               Text Format
\textrm                         Roman font
\textsf                         Sans serif font
\texttt                         Typewriter font
\textup                         Upright shape
\textit                         Italic shape
\textsl                         Slanted shape
\textsc                         Small caps shape
\textmd                         Medium font
\textbf                         Bold face
\emph                           Emphasized
\textrm{PERL How To Program}

\texttt{by Deitel, Nieto, and McPhie}

\textsl{1.8 Object-Oriented Programming}

\textsc{\textbf{One} of the key problems with procedural programming is
    that the program units programmers create do not easily mirror
    \emph{real-world} entities effectively.}
  Mathematical Formulae Control
To indicate the mathematical formulae in the
 text, LaTeX provides many control
 sequences to organize the mathematical
 formulae and print its mathematical
   Display Mathematical Formulae
   in LaTeX
There are four ways that LaTeX will display the mathematical
  Use ‘$’ at the beginning and ending of the formula to
  indicate the formula within the document.
  Use ‘\(‘ at the beginning of the formula and ‘\)’ at the end
  of the formula to indicate the formula within the document.
  Use ‘\[‘ at the beginning of the formula and ‘\]’ at the end
  of the formula. This will display the formula on a line by
  Use \begin{equation} at the beginning of the formula and
  \end{equation} at the end of the formula will display the
  formula on a line by itself.
The following LaTeX will display the definition of sample mean:

The \textbf{sample mean} $\bar{x}$ of observations $x_1$,$x_2$,...,$x_n$ is
    given by \[
\bar{x} = \frac{x_1 + x_2 + ... + x_n}{n} = \frac{\sum_{i=1}^n x_i}{n}

The numerator of $\bar{x}$ can be written more informally as $\sum x_i$, where
    the summation is over all sample observations.
  Mathematical Symbol in LaTeX
Many of the mathematical symbol are
  indicated by a backslash that follow by the
  name of the symbol.
For example:
Mathematical Symbol         LaTeX Syntax
                           \cong
                           \Pi
                           \supseteq
   Mathematical Operation in
The mathematical operation such as addition and subtraction will be using
  the keyboard symbol ‘+’ and ‘-’. However, the operation for
  multiplication, division, fraction, and square root will need to apply
  other LaTeX control sequences.

  Operations                          LaTeX control sequences

  Multiplication ()                  \times

  Division ()                        \div

  Fraction                            \frac{numerator}{denominator}

  Square Root                         \sqrt{expression}
This example prints the definition of variance and standard
The \textbf{variance} of a continuous random variable $X$
    with pdf $f(x)$ and mean value $\mu$ is
\[\sigma_X^2 = V(X) = \int_{-\infty}^\infty (x - \mu)^2
    \bullet f(x)dx = E[(X - \mu)^2]\]
The \textbf{standard deviation} (SD) of $X$ is $\sigma_X =
There are a lot of features in the LaTeX that are not
  able to demonstrate all at one time. However,
  there are many tutorials on the web which contain
  the usage and syntax of LaTeX. The preferable
  LaTeX tutorial websites from my research are in
  the reference page.
Also, LaTeX is a free system that we can download
  it from the site, which is in the reference page.
Obtaining LaTeX. 16 Jan. 2006. 31 Jan.
2006 <http://www.latex->
Wilkins, David R. Getting Started with
LaTeX. 9 March 1998. School of
Mathematics. 2 Feb. 2006