The philosophy behind LaTeX is to allow the user to concentrate on the content and structure of the document rather than the exact appearance of the finished product. In other words, LaTeX is not WYSIWYG ("what you see is what you get") the way Microsoft Word is, so to the uninitiated a LaTeX source file looks like a jumble of strange commands.
Confusingly, there are two versions of LaTeX in widespread use:
LaTeX2e and LaTeX 2.09. LaTeX2e is the new standard version of LaTeX
and is the wave of the future. LaTeX 2.09 is now obsolete and is no
longer supported, but is still used by many people who see no reason
to switch to LaTeX2e. If you are a newcomer you definitely want to
learn and use only LaTeX2e. How do you know which version is which?
LaTeX 2.09 files begin with the command
\documentstyle
, while LaTeX2e files begin with
\documentclass
. Fortunately, when you run the
command latex
on your file, the software
automatically figures out which version you're using and does the
right things, so both versions use the same latex
command.
The output of the latex
command, i.e. the typeset
document, is a file with the suffix .dvi
. It is
useful to *preview* your .dvi
files *before*
printing them out. This practice is strongly encouraged to minimize the
paper and toner that are wasted by printing drafts. Within X Windows you
can use xdvi
for previewing, but if your paper
contains pictures that are being drawn by postscript (e.g. trees), you
may need to look at the .ps
file with
ghostview
, if the machine you're using doesn't
have a recent version of xdvi
installed.
Use dvips filename
to print .dvi
files. You can use dviselect
to print only
selected pages.
Also, when printing drafts you may want to consider printing two pages
next to each other on one piece of paper, with dvips -f
filename | psnup -2r | lpr -h -Pvalkyr
. You can
even print duplex (i.e., on both sides of a piece of paper) by
printing to valkyr-d
, thus using four times as
little paper! Consider making an alias for this:
alias dvip 'dvips -f \!* | psnup -2r | lpr -h -Pvalkyr-d'
.
There are also a variety of versions of LaTeX for the Macintosh, e.g. Textures, which also allow previewing (even incrementally).
The various files mentioned in this section, and more, are
available on the Leland system. Check in the directories
/usr/pubsw/lib/site-texmf/tex/
and
/afs/ir/data/linguistics/tex
. If you have an
account on Turing, look in
/usr/local/lib/texmf/tex/
. Some of the older
materials in this section assume LaTeX 2.09, not LaTeX2e, so caveat
emptor.
On to the goodies. Here's Emily Bender's tutorial:
Emma's lingmacros.sty provide you with an
easy way to do glossed examples, draw trees and do other things that
are useful for linguists. The style file itself is well documented.
Chris Manning's avm.sty is great for doing AVMs.
There's also on-line documentation for it: (.tex
file), (.ps file). To use these style
files, you don't need to download them; just add the line
\usepackage{lingmacros}
or
\usepackage{avm}
after the first line of your
LaTeX document. One style file you can include if you need phonetic
symbols in your document is called tipa
; to use
it, just add tipa
in with
lingmacros
and tree-dvips
. For
documentation, see
/usr/local/lib/texmf/fonts/test/source/tipa/doc/tipaman.ps
.
The Leland system knows about these style files and will load them
automatically for you. For more obscure style files, or ones you
design yourself, you will have to tell latex explicitly where to find
them.
Here's Rob Malouf's collection of LaTeX macros: