An Introduction to TeX and LaTeX

What is this stuff?

TeX is a typesetting system that was written by Donald E. Knuth.  He began work on TeX in 1977, and says in the Preface to the TeX Book, that it is ``intended for the creation of beautiful books-and especially for books that contain a lot of mathematics''.

TeX is a text processing system and not a WYSIWYG text editor.  This is both an advantage and a disadvantage.  The user has complete control over all aspects of the production of the work and with only a little effort can create professional looking documents.  In fact, many publishers now publish books from "camera-ready copies" produced by the author.  All the author does is send the final printed version to the publisher.  Unfortunately, this can lead to much aggravation for a new or inexperienced user.

LaTeX is an advancement of Knuth's original TeX (but relies on TeX as the underlying formatting engine).  It was written by Leslie Lamport in 1985 and the current release, LaTeX2e, is the most widely used form of TeX.

How do I pronounce TeX?

In proper parlance, TeX is pronounced "tech" to rhyme with "blech".  In 1977, Donald Knuth called his new program Tau Epsilon Chi which accounts for the lowered "E".   It is definitely not pronounced "ks" to rhyme with "hex".

LaTeX was written by Lesle Lamport and in his book, he mentions that it can be pronounced either "lay-tech" or "lah-tech".

You should type TeX or LaTeX if you need to include these words in, say, an e-mail or a web page.

How do I make a TeX file?

The first step is to type the file that TeX reads.  This can be done using any text editor (such as vi or emacs).  You write the TeX file which typically ends with the extension .tex. This file contains all the information that the TeX formatting engine needs to create your document.

TeX then outputs a device independent file  (.dvi) which can be transported across platforms.  This file was originally not readable and had to be converted into one that was.  Fortunately, there are now programs that can read .dvi files but can't print them (such as xdvi).

Given the .dvi file you then have a device driver read it and produce "readable" output.

For example,

How do I view my masterpiece?

Once you have TeXed your document you can view the .dvi file with xdvi.

Run dvips on the .dvi file to create a postscript file.  The command dvips -o filename.dvi will take your .dvi file (filename.dvi) and make the postscript file

You can use Ghostview to view .ps files.  The command ghostview will display your file.  The system-wide alias for ghostview is gv.

Run dvipdf on the .dvi file to create a portable document format file.  The command dvipdf filename, where filename is the name of your .dvi file, will create filename.pdf.

You can view .pdf files with either Ghostview or Adobe Acrobat Reader.  The command acroread filename.pdf will display your file.

Return to "A Gentle Introduction to TeX" Home Page