This area contains a collection of lessons containing sample files (which can be downloaded) and is intended for use in combination with the Graduate/Staff Guide to LaTeX.
Lesson One: Introduction
To download a LaTeX file in this lesson either copy and paste the latex code that follows into your editor
of choice, or alternatively you can copy the latex file into your directory by right-clicking the download link below,
and then select "Save Target As", followed by clicking on OK. If you like you can create a folder in your
H: drive to
save this file e.g.
In here goes different styles of text, tables, arrays, pictures, etc. etc.
Editing your LaTeX file
LaTeX files are plaintext files, so any text editor should be suitable for editing. Windows comes with a simple text editor called WordPad, but you can also use WinEdt, Tinn-r, TeXnicCenter, etc. Notepad, which also comes with Windows, can also be used but is not recommended if editing files created on a Unix/Linux system because of carriage-return differences.
Processing your LaTeX file
As you now have a LaTeX file in your directory, one still has to process it. Open a console (command prompt) by:
Note:all commands will be typed in the same console window (See Figure 1.3).
To compile the document, enter the command:
Processing information will appear on the window. Unless an error message appears, you can in general just ignore it. If there are errors, you will need to correct your document and re-run the latex command. If there are labeled items in your document (e.g. figures, table or equations), then you will need to run the latex command a second time.
Next the resulting .dvi file needs to be converted into a postscript .ps file with the command:
More processing information will appear which you can again ignore. Create a PDF from the LaTeX document by typing:
You can now view the PDF with the command:
A new window will appear which will show you the visual output of your LaTeX file which can be sent to the printers.
The steps to remember are:
latex the file:
dvips the file:
ps2pdf the file:
- Spaces are ignored by LaTeX, see later lesson as to how to add spaces.
- Single carriage returns are ignored in LaTeX, double carriage returns are regarded as being a new
paragraph, to create a new line use either
- Latex documents that include PDF images need to be compiled with the command
pdflatexinstead of the
This concludes your first lesson on using LaTeX.