Introduction to LaTeX

(Using TeXLive, WinEdt and MathType)

Pavan Kumar P N

TEX is a computer program created by Donald E. Knuth. It is aimed at typesetting text and mathematical formulae. Uses commands to create mathematical symbols Need to compile the file in order to see the finished product.
2 11/15/2012

Softwares Required
TeX Distribution – TeXLive Editor – WinEdt Document Preview – PDF Reader



LaTeX Commands
They start with a backslash \ and then have a name consisting of letters only. Command names are terminated by a space, a number or any other „nonletter.‟ They consist of a backslash and exactly one non-letter.



LaTeX Commands [Contd.]
LATEX ignores whitespace after commands. Case sensitive Some have parameters – Square brackets [ ] after the command name are for optional parameters – Curly braces { } after the command name are for required parameters
5 11/15/2012

Input File Structure
Begins with a preamble (Preamble is where the overall construction of your document is listed) – \documentclass[options]{class}  class specifies the type of document to be created – Usually use article or amsart – Can also use slides or siamltex  options customizes the document class you are using – Can be used to set font size (10, 11, or 12 pt), set paper size, use one or two columns, etc.
6 11/15/2012

Input File Structure[Contd.]
Begins with a preamble – \usepackage{package}
 Packages add new features and commands to LaTeX  Common packages: amsmath, graphicx

– Can also define new commands in the preamble, specify page numbering, etc.



Input File Structure[Contd.]
When all the setup work is done, we start the body of the text with the command \begin{document} Now the text mixed with some LATEX commands is entered. At the end of the document you add the \end{document}
8 11/15/2012

Typesetting Text
Click the “LaTeX” or “PDF LaTeX” button on the top right To view your file, click “DVI” or the Adobe Acrobat symbol
– DVI stands for “DeVice Independent” – it‟s basically a generic viewer

Can change between DVI, PDF, or PS files and document is automatically saved when you typeset it



Types of LaTeX files
.tex – input file, needs to be compiled .tex.bak – backup LaTeX file and is changed when document is typeset .dvi – DVI file which shows what your file looks like .ps – Postscript File .log – log file, tells what happened the last time you compiled your document.
10 11/15/2012

Typesetting Math
Mathematical text is placed between $ Math mode is normally displayed inline

To display math mode in a larger font, use \displaystyle

– Can make some expressions look funny – Makes all symbols within $ larger

For text within math mode, use \text{…} Math mode uses italics and no spaces between words.



Using MathType
Whenever an equation is needed, the MathType window is brought to the front. The equation is created in the MathType window. The equation is selected and copied to the clipboard, a process which invokes the previously selected translator. The TEX editor is brought to the front. The TEX code for the equation is pasted into the document.
12 11/15/2012

Thank You



Sign up to vote on this title
UsefulNot useful