Basics to Getting Started with LaTeX
(URL: http://www.cs.cornell.edu/Info/Misc/LaTeX-Tutorial/Basics.html)
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.
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:
- type your login id at the login prompt and press
Return
- enter your UNIX password at the Password: prompt
and press Return
- enter x11run at the host prompt, press Return, and
wait for XWindows to open
On an xterm you follow these steps to log on:
- choose a host and double click on your choice
- enter your login id at the login prompt and press
Return
- enter your UNIX password at the Password: prompt
and press Return
- 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:
- go to an xterm window and enter Mosaicp &
then wait for Mosaic to open
- go to the File menu and choose Open URL
- in the search field, type
- http://www.cs.cornell.edu/Info/Misc/LaTeX-Tutorial/LaTeX-Home.html
- 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.
- x11run
- start up the X11 windowing environment
- ls
- 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
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.)
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:
- go to an xterm window and enter cd to make
sure you are in your home directory
- enter mkdir latex to create a directory named
latex to put the sample files into
- enter cd latex to move into that directory
- enter cp ~denise/LaTeX/LaTeX-Tutorial/Samples/*.tex .
to copy the sample files into your own home directory
- enter ls to see a list of the files (should be at
least the following (may be more)):
- down.tex
- name.tex
- poem.tex
- provoke.tex
- quote.tex
- running.tex
- sample.tex
- spaces.tex
- tab.tex
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
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
www@cs.cornell.edu.
Last modified 17 Jan 1995 by Denise Moore (denise@cs.cornell.edu).