Getting Started with LaTeX on unix

1. What you'll find here

This document attempts to provide simple practical directions for linguists at Penn who want to use LaTeX on our unix machines (babel, unagi, linc, etc.). In the interests of simplicity it does not go into complications or alternative possibilities. (See the LaTeX for Linguists page for more complete information).

2. How to use LaTeX

Here are the commands you should use to format LaTeX files from the unix prompt. But emacs actually provides a special ``tex-mode'' with commands tailored to editing LaTeX files. Some of these commands are also given here.

3. A test file

Type the following file exactly as it appears (or, you may prefer to cut-and paste it if you have the capability). Do not confuse forward with backward slashes, or capital with lowercase letters. (It is ok to have additional spaces where there are some, or to start a new line anywhere you see a space). If you can get it to format, display on the screen, and print, you have mastered the process of formatting a LaTeX document.

\documentclass{article}

\begin{document}

This is a test \LaTeX\ document.
\end{document}

4. Customize your environment

Next, you need to get ready to reate your own documents. The first and all-important step is to prepare a place for definition (``style'') files that you will be using over and over. These extend the capabilities of LaTeX and adapt it to linguistic (or other) style conventions. You must also tell TeX/LaTeX where you put them, as follows:

Once you've done all this, you can create your own LaTeX documents in any directory, and use your style files with them. So don't put your documents in the same directory as the style files!

5. A real sample file

In order to learn what to put in your LaTeX documents, I recommend that you read through the beginning of some book on LaTeX, and especially that you look at the documentation for the linguistics example package gb4e and the tree package qtree. But you're probably going to go ahead and just copy someone's paper and use it as an example anyway-and fortunately, that's not a bad way to figure out LaTeX. The following just might be enough to get you started (but I doubt it).

% Anything on a line after a `%' gets ignored by TeX
% Curly braces {, } are used for grouping

\documentclass[11pt]{article}

% This line requests non-standard packages (which you must make available)
\usepackage{gb4e,qtree}

\begin{document}
\begin{center}
{\large \bf Your title, large and bold. } \\   % use \\ to end centered lines
{\large Your name (not bold). }
\end{center}

All your text goes down here.\footnote{Footnote text goes here}.

Leaving a blank line starts a paragraph.  Otherwise newlines 
are 
ignored.  Plain text (not containing certain characters that 
have special meaning to TeX) appears more or less as it is typed, 
but lines are collected into paragraphs.

\emph{italics,} {\bf bold,} {\large larger} or {\small smaller} type.

Subscripts$_i$ and superscripts$^{i, j}$.

\section{Linguistics-style examples}

The commands in this section are defined by the packages
\emph{gb4e} and \emph{qtree.}

\begin{exe}
\ex\label{rem1} Example.
\ex \Tree [.S [.NP the dog ] \qroof{etc.}.VP ]
\end{exe}

You can refer to the example number (\ref{rem1}).
\end{document}

6. Some things you will need soon

LATEX can do all sorts of fancy stuff. Here's some of the stuff that's actually worth the trouble, and that you'll probably want to do pretty soon.

To learn how to do these, consult a good book on LaTeX, and/or take a look at the LaTeX for Linguists webpage for further pointers.


[ up: LaTeX for Linguists | Computer Help | Linguistics Home Page ]

alexis@ling.upenn.edu