LaTeX Introduction - PowerPoint PPT Presentation

1 / 13
About This Presentation
Title:

LaTeX Introduction

Description:

There is a section command to write a section title, for example. ... classes (you'll see this later; for example there are article and letter classes) ... – PowerPoint PPT presentation

Number of Views:34
Avg rating:3.0/5.0
Slides: 14
Provided by: philli85
Category:

less

Transcript and Presenter's Notes

Title: LaTeX Introduction


1
LaTeX Introduction
  • A CSUA Help Session

2
TeX History
  • Written by Donald Knuth, Professor of Computer
    Science at Stanford
  • Knuth was writing The Art of Computer
    Programming, a classic CS text.
  • Existing typesetting methods were not good
    enough.
  • He created TeX in the late 1970s.
  • Also METAFONT, a font description language.

3
TeX Was Too Low-level
  • TeX requires explicit invocation of font and
    layout commands to control appearance of text.
  • Instead of saying \font\seccmbx20\sec\noindent,
    people wanted to say \section to start a section
    title.
  • You could define your own commands, though.

4
Enter LaTeX
  • LaTeX is a collection of defined commands.
  • There is a \section command to write a section
    title, for example.
  • Written by Leslie Lamport in 1985.
  • Provides many more features
  • e.g., the \section command provides for
    automatic numbering and table of contents
    generation if you want
  • Most recent version is LaTeX2e.

5
Classes and packages
  • These are LaTeXs method for extending it.
  • Different documents have different classes
    (youll see this later for example there are
    article and letter classes).
  • Packages allow you to call in extra features
  • E.g., there is a package for inserting figures
    into your document.

6
AMS-TeX
  • LaTeX was not the only set of extensions to TeX.
  • AMS-TeX was a collection of extensions to TeX
    with more advanced mathematical typesetting
    features.
  • Now LaTeX is by far the most popular. Most
    features from AMS-TeX have been absorbed.

7
Getting LaTeX
  • It is free.
  • It is on EECS instructional systems.
  • It is on CSUA and OCF systems.
  • It comes with all normal Linux distributions.
  • For Windows try http//www.miktex.org/.

8
Writing LaTeX
  • A sample document

\documentclassarticle \begindocument Hello,
world! \enddocument
9
What do you do with it?
  • You turn LaTeX files into DVI files, with this
    command latex file.tex.
  • The file extension should be tex.
  • LaTeX will create a file called file.dvi.

10
DVI Files
  • DVI files are what TeX creates by default.
  • For display, type xdvi file.dvi at the prompt (in
    X).
  • On Windows, read the manual.
  • For printing, turn them into Postscript files
    with dvips file.dvi -o
  • Then print the Postscript file file.ps as you
    would any Postscript file.
  • If you omit the -o, dvips will have some default
    behavior which might be to print the file and
    might be to produce a ps file, depending on how
    its set up.

11
Creating PDF files
  • To create PDF files, type pdflatex file.tex
  • The program is basically the same as latex,
    except it produces a file.pdf PDF file.

12
Problems
  • Often LaTeX will fail with an error.
  • If it has a question mark for you, type x and
    press enter.
  • This will quit LaTeX.
  • When LaTeX dies like this, it is almost always
    because you screwed up.

13
How to solve problems
  • Look at the error LaTeX gave you.
  • It will have a line number which will help you
    find the error.
  • Common mistakes
  • Mismatched \begin/\end blocks
  • Mismatched /
  • Mismatched , , or \(\) or \\
  • Misspelled keywords
  • Sometimes lines are too long. This isnt fatal
    but looks bad. LaTeX outputs a warning with a
    line number so you can fix it.
Write a Comment
User Comments (0)
About PowerShow.com