Basics to Getting Started with LaTeX


Here are the basic instructions for working through this tutorial either in the class sessions or on your own. (Note that this tutorial assumes one is working in Mosaicp on a UNIX system of some sort. If you are using a Mac, see the reference below.)

Using the UNIX System
Editing with emacs-19
Copying Sample Files
LaTeX Command Cycle
Using Textures on the Mac
You can also use this as reference later on as you work with LaTeX and find you need a reference for LaTeX information.

Using the UNIX System

If you are not used to using a Sun, Xterm, or the UNIX system in general, the following will help you to get started. If you use a Mac, you can open the MacWeb proxy instead of Mosaicp and use Textures to input, format, and preview LaTeX files.

Logging on and Starting XWindows

On a Sun system, you follow these steps to log on and begin an XWindows session:
  1. type your login id at the login prompt and press Return
  2. enter your UNIX password at the Password: prompt and press Return
  3. enter x11run at the host prompt, press Return, and wait for XWindows to open
On an xterm you follow these steps to log on:
  1. choose a host and double click on your choice
  2. enter your login id at the login prompt and press Return
  3. enter your UNIX password at the Password: prompt and press Return
  4. XWindows will start automatically

Launching Mosaicp to the LaTex Tutorial Home Page

To get to the "Beginning LaTeX" tutorial home page and from there to all the associated documents, follow these steps:
  1. go to an xterm window and enter Mosaicp & then wait for Mosaic to open
  2. go to the File menu and choose Open URL
  3. in the search field, type
  4. to return to this URL without having to type the URL in the search field, add this to your Hotlist

Windows Commands

To bring a window to the front, click in its title bar with the left mouse key, or use Meta/middle mouse button anywhere in the window.

To move a window, hold down the middle mouse button in the window's title bar and drag the window to where you want it.

To change the size of a window, click on the icon in upper right corner and then drag outside the current window then back in to change the size to what you want.

Helpful UNIX Commands

Here are some other useful commands in the UNIX environment.
start up the X11 windowing environment
list the files in your directory (like "dir" in DOS)
rm filename
delete the file called filename
cp from-name to-name
make a new copy of the file from-name and call it to-name
cp from-name .
copy a file from another directory and put it in the current directory using the same name
mv old-name new-name
change the name of a file from old-name to new-name
logout (or exit)
log off the computer so someone else can use it

Editing with emacs-19

To create or edit filename.tex, use the command:
emacs-19 filename.tex &
Useful keys in the emacs editing window:
Left Mouse Button = move text cursor to mouse cursor and hold/drag to select text
Middle Mouse Button = paste text where mouse cursor points
Ctrl/W = delete selected text (cut)
Ctrl/Y = yank back text that was cut to cursor position (paste)
Arrows = up, down, left, and right
Ctrl/D = delete character to the right of the cursor
Ctrl/K = delete from the cursor to the end of the line
Ctrl/A = go to the beginning of the current line
Ctrl/E = go to the end of the current line
Ctrl/S = search forward on string
Ctrl/R = search backward on string
Ctrl/X Ctrl/F = find a file to edit
Ctrl/X Ctrl/S = save changes to filename.tex
Ctrl/X Ctrl/C = exit emacs-19
Ctrl/G = stop whatever emacs is doing (quit)
(Note that many of the above commands can be accomplished by using the Edit menu at the top of the emacs-19 window.)

Copying Sample Files

We will be using certain sample documents in the Problems sections of this tutorial. The samples should be copied into your own filesystem. Here's how to do that. To make a directory to store LaTeX training information in:
  1. go to an xterm window and enter cd to make sure you are in your home directory
  2. enter mkdir latex to create a directory named latex to put the sample files into
  3. enter cd latex to move into that directory
  4. enter cp ~denise/LaTeX/LaTeX-Tutorial/Samples/*.tex . to copy the sample files into your own home directory
  5. enter ls to see a list of the files (should be at least the following (may be more)):

LaTeX Command Cycle

This is the sequence of commands issued and actions to take to input/edit, format, and preview a LaTeX document.
emacs filename.tex &
to bring up an emacs window with the LaTeX input file you want to edit
enter text and/or make changes to the input file
press Ctrl/X then Ctrl/S to save the input file
latex filename.tex
to run the LaTeX typesetting program on the input file
wait until the prompt returns
if you detect errors, edit the input file to correct the errors
if you get the "?" prompt, press Return to keep going or press "x" to abort the typesetting
xdvi filename.dvi &
to view the typeset version of the input file (filename.dvi)
click on Quit in the xdvi window to get rid of it

Using Textures on the Mac

If you intend to use a Mac to input/edit your LaTeX files, there is software available called "Textures" to allow you to do all that is described above on the Mac. Currently, the software, documentation, and one-on-one training is available through adm. At a future date, there may be an online tutorial similar to this one.

Go to LaTeX Tutorial Home Page
Go to Departmental Home Page
If you have any questions or problems, send mail to
Last modified 17 Jan 1995 by Denise Moore (