INTRODUCTION TO LATEX

Download Report

Transcript INTRODUCTION TO LATEX

INTRODUCTION
TO LATEX
Zheng Chen
Southern University at New Orleans
11/11/2011
zchen@SUNO
Outlines
What is Latex for?
 Environment of Latex
 Edit
 Debug

What is the Tex, Latex

LATEX is a typesetting system that is very suitable for producing
scientific and mathematical documents of high typographical quality.

It is also suitable for producing all sorts of other documents, from
simple letters to complete books

TEX is a computer program created by Donald E. Knuth
about 1980’s, “TEX” pronounced “Tech”

Latex was originally written by Leslie Lamport; pdflatx different
version.
Steps to install latex soft wares

Download and install MikTeX ... this can take awhile.
http://www.miktex.org/

Download and install Ghostscript (and Ghostview if
you want it) first. http://pages.cs.wisc.edu/~ghost/

www.winedt.com download winEDT

Then download and install an editor.
http://www.latexeditor.org/
Special Characters
# $ % ^ & _ { } ~ \
 As you will see, these characters can be
used in your documents all the
same by using a prefix backslash:
\# \$ \% \^ { } \& \_ \{ \} \~ {}
\textbackslas

Two formats on commands
LATEX commands are case sensitive
 \sqrt{ }, \frac{ }{ }, \today
\begin{aligns}
\end{aligns}
\newline \newpage


\& \$
comments

% ignores all the rest of the line after %

Examples, in a tex file (save as .tex):
% we will use later
% reminder: please change data here
Input file structure (file name .tex)

\documentclass{...} % option
\usepackage{...}
% option
\begin{document}
%contents input here
\end{document}
Example A
\documentclass{article}
\begin{document}
% life is beautiful. \\
% \TeX is great.\\
% to practice Latex? easy!\\
Today is \today.
\end{document}
Input structure of an article
\documentclass{article}
\author{ }
\title{}
\begin{document}
\maketitle
\abstract
\section
\subsection
\begin{thebibliography}
\end{thebibliography}
\begin{document}
\documentclass[a4paper,11pt]{article}
\usepackage{amssymb}
\author{S. Henry}
\title{How to learn math well}
% example B
\begin{document}
\maketitle
\begin{abstract}
In this paper, we talk about how to learn math well through practice.
\end{abstract}
\section{Introductory }
Practice makes perfect.
\subsection{math history}
Three math crises, irrational number $\sqrt{2}$, pure imaginary number $i$, and
one more. \\
Please refer the books \cite{polya} and \cite{klein}.
\begin{thebibliography}{99}
\bibitem{polya} G. Polya: Mathematics and Plausible Reasoning, Volume 1: Induction
and Analogy in Mathematics, 1990\\
\bibitem{klein}
Morris Kline: Mathematical Thought from Ancient to Modern Times, Vol. 1
\end{thebibliography}
\end{document}
Math expressions

In one line with other words, use $ $,
If we have an equation $(\sqrt{2}+
x)^2=3+2\sqrt{2}$, what is the $x$ value?

In a separate line, centered, use $$
We have the following equation:\\
$$ (3x-5)(2x+y)=x^2-8 $$
$$
More math expressions
Systems of equations
 Matrices
 One more sample
 Need a reference book, or just google to
get help

\documentclass[a4paper,11pt]{article} % example C
\usepackage{amsmath}
\author{S. Henry}
\title{Learn Latex In One Hour }
\begin{document}
\maketitle
\begin{abstract}
In this paper, we talk about math expressions input in latex.
\end{abstract}
\section{math expressions in lines }
In one line with other words, use \$ \$, If we have an equation $(\sqrt{2}+
x)^2=3+2\sqrt{2}$, what is the $x$ value?
In a separate line, centered, use \$\$ \$\$
We have the following equation:\\
$$ (3x-5)(2x+y)=x^2-8 $$
Let us solve it.
\subsection{more math expressions}
solve a linear equation as follows:\\
\begin{align}
&-x^2+2x-3 \\
&=-(x^2+2x)-3 \\
&=-(x^2+2x+1-1)-3\\
&=-(x+1)^2-2 \\
&\le -2 \\
&<0
\end{align}
a piecewise function: \\
\begin{displaymath}
f(x) = \left\{
\begin{array}{crr}
1 & \text{if $ x > 0$}\\
0 & \text{if $ x =0$}\\
-1& \text{if $ x < 0$}
\end{array}
\right.
\end{displaymath}
Please refer the books \cite{polya} and \cite{klein}.
\begin{thebibliography}{99}
\bibitem{polya} G. Polya: Mathematics and Plausible Reasoning, Volume 1:
Induction
and Analogy in Mathematics, 1990\\
\bibitem{klein}
Morris Kline: Mathematical Thought from Ancient to Modern Times,
Vol. 1
\end{thebibliography}
\end{document}
References


http://generaldisarray.wordpress.com/2006/04/2
0/latex-from-beginner-to-texpert/
http://online.redwoods.cc.ca.us/instruct/darnold/li
nalg/latex/project_latex.pdf
http://web.ift.uib.no/Teori/KURS/WRK/TeX/symA
LL.html
For LaTeX Math Symbols
 http://www.artofproblemsolving.com/Wiki/ind
ex.php/LaTeX:Commands
