alternate Department header image

LaTeX - The First Time

The way to learn LaTeX is to get some sample files and a good reference book (ie LaTeX by Lamport, LaTeX Companion by Goossens et al). Play around and when you get stuck ask your office mates.

Getting started

  1. Start with a sample TeX file, sample.tex
  2. Edit the file using a text editor, say emacs. For example, at the command prompt:
     > emacs sample.tex & 
    


  3. After editing and saving, run LaTeX on the file. Either at the command prompt:

    > latex sample

    or within emacs, under the Command menu select Latex (Ctrl c Ctrl f).

    If you get errors after running LaTeX, you must edit and save the file then run LaTeX again. When LaTeX is successful, LaTeX will generate a .dvi file (device-independent): sample.dvi.

  4. To create a .ps (postscript) file, at the command prompt:
     > dvips sample -o sample.ps 
    


    To view the .ps file:
     > ghostview  sample.ps & 
    


  5. To print the file (from gauss or newton):
     > lp sample.ps 
    


  6. When you are done with LaTeX, you may clean up your directory of unnecessary files:
     > clean 
    


    This command removes .dvi, .aux and .log files.

Some Sample Files

Example .tex .ps Figures
M175 Quiz m175_quiz.tex m175_quiz.ps none
M181 Quiz m181_quiz.tex m181_quiz.ps none
M221 Quiz m221_quiz.tex m221_quiz.ps vects.eps
M176 Exam m176_exam.tex m176_exam.ps none
M175 Final Exam m175_final.tex m175_final.ps s02fa.ps, s02fb.ps, s02fc.ps,

Unix and TeX Help



Blue horizontal rule image
page break line spacer
Current Announcements | Department Home Page | Contact Page | Courses | Search
Blue horizontal rule image
Last Modified: Tuesday, 14-Jun-2011 16:52:16 MDT