28.10.2014 Views

Typing Your University of Georgia Thesis With LATEX - Artificial ...

Typing Your University of Georgia Thesis With LATEX - Artificial ...

Typing Your University of Georgia Thesis With LATEX - Artificial ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Typing</strong> <strong>Your</strong><br />

<strong>University</strong> <strong>of</strong> <strong>Georgia</strong><br />

<strong>Thesis</strong> <strong>With</strong> L A TEX:<br />

Frequently Asked Questions<br />

Michael A. Covington<br />

<strong>Artificial</strong> Intelligence Center<br />

The <strong>University</strong> <strong>of</strong> <strong>Georgia</strong><br />

Athens, GA 30602-7415<br />

http://www.ai.uga.edu/∼mc<br />

Last revised 2000 April 28<br />

1 What is L A TEX?<br />

L A TEX, by Leslie Lamport, is an extension <strong>of</strong> TEX, the computer typesetting<br />

system designed by Donald Knuth. This s<strong>of</strong>tware system is used to typeset<br />

books, journals, papers, and theses in the mathematical sciences. Knuth and<br />

Lamport had two goals in designing it:<br />

• To use the computer to equal the quality <strong>of</strong> the best conventional typesetting.<br />

No longer does “word processing” mean “a poor substitute for<br />

real printing.”<br />

• To separate the jobs <strong>of</strong> the author and the typesetter.<br />

1


Other word processors turn the screen into a blank piece <strong>of</strong> paper and let<br />

you type on it. L A TEX isnotyourtypewriter, it’s your typist. For example,<br />

to mark the beginning <strong>of</strong> a chapter, you type something like this:<br />

\chapter{Literature Review}<br />

and L A TEX automatically determines what a chapter heading should look<br />

like. It does this by consulting a style sheet. You do not have to worry about<br />

whether you’ve hit Enter the same number <strong>of</strong> times at the beginning <strong>of</strong> each<br />

chapter, or whether all the chapter headings are centered and the margins<br />

are correct. That’s the (automated) typist’s job.<br />

2 How is “L A TEX” pronounced?<br />

The X in TEX is actually a Greek chi, with the sound <strong>of</strong> ch in Scottish loch or<br />

German ach. Thus,TEX is pronounced “tekh.” It is short for Greek tekhnē<br />

“art, craft.”<br />

L A TEX is pronounced ‘‘lah-tekh” in the Northeast, ‘‘lay-tekh” in England and<br />

the South, and several different ways in the West.<br />

3 What’s it like to run L A TEX?<br />

L A TEX isnot a single integrated piece <strong>of</strong> s<strong>of</strong>tware. It has several parts. The<br />

normal process for typing and printing a paper is as follows. On finding an<br />

error or discovering that a change is needed, you can go back to any earlier<br />

step at any time.<br />

1. Use a text editor (Windows Notepad or whatever text editor you like)<br />

to type your document on a file whose name ends in ṫex.<br />

2. Go to a command prompt and run latex to create a .dvi file.<br />

2


3. Optionally, preview the .dvi file on-screen. Some <strong>of</strong> us skip this step.<br />

4. Run dvips to convert the .dvi file to PostScript.<br />

5. Use GhostView to view the PostScript file and print it (even if you do<br />

not have a PostScript printer).<br />

4 Who benefits the most from using L A TEX?<br />

Those who need to typeset mathematical formulas or computer programs;<br />

those whose theses are likely to be published by a book publisher; and those<br />

who plan to submit their theses electronically.<br />

5 Who should not use L A TEX?<br />

If you consider yourself a “computer dummy” and can use only the simplest<br />

s<strong>of</strong>tware, or if you do not have the time or patience to learn a new set <strong>of</strong><br />

technical skills, you won’t like L A TEX. On the other hand, you probably will<br />

not type your thesis correctly with a conventional word processor either.<br />

(Let’s face it, typing a thesis correctly is a technical challenge, no matter<br />

what s<strong>of</strong>tware you do it with!) You should hire a typist.<br />

6 What are MikTEX, emTEX, teTEX, etc.?<br />

These are implementations <strong>of</strong> L A TEX for particular computers, incorporating<br />

Knuth and Lamport’s original computer programs plus various tools to make<br />

them easier to use or more versatile. All <strong>of</strong> them are 100% compatible with<br />

the original L A TEX.<br />

3


7 Is there L A TEX for Macintosh, Linux, Amiga,<br />

Sun, BeBox...?<br />

Yes. L A TEX has been ported to a huge variety <strong>of</strong> computers and produces<br />

identical output on all <strong>of</strong> them, using identical file formats. If you have<br />

Linux, you almost certainly already have L A TEX.<br />

8 What is L A TEX2ε?<br />

The version <strong>of</strong> L A TEX that has been in use for the last several years. It was<br />

preceded by L A TEX 2.09. Those are the only two version <strong>of</strong> L A TEX thathave<br />

been distributed widely. There will eventually be a L A TEX 3, but not very<br />

soon.<br />

9 Where do I get L A TEX?<br />

You can download it free <strong>of</strong> charge from various sites; follow the links on<br />

Michael Covington’s web page (http://www.ai.uga.edu/∼mc). You can sometimes<br />

borrow a CD-ROM containing MikTEX and GhostView from the <strong>Artificial</strong><br />

Intelligence Center.<br />

10 Where is the documentation for L A TEX?<br />

In the book LaTeX: A Document Preparation System, by Leslie Lamport,<br />

2nd edition, published by Addison-Wesley. You must buy this book.<br />

Other books about L A TEX are useful but are not the <strong>of</strong>ficial guide.<br />

4


11 Where can I get help with L A TEX?<br />

First, read Lamport’s book. You cannot get along without it.<br />

Second, you can ask questions on the newsgroups comp.text.tex (international)<br />

and uga.tex-latex (local, only accessible on campus).<br />

Third, if you have problems that are specific to uga.sty, and particularly<br />

if uga.sty does not appear to be meeting UGa thesis format requirements,<br />

please contact me (Michael Covington, mc@uga.edu).<br />

12 What is uga.sty?<br />

A style sheet for L A TEX that makes it follow the format for <strong>University</strong> <strong>of</strong><br />

<strong>Georgia</strong> theses and dissertations.<br />

13 Where do I get uga.sty and how do I install<br />

it?<br />

Download it from ftp://ftp.ai.uga.edu/pub/tex/uga-thesis. Be sure to get<br />

the latest version.<br />

Install it by putting it in the same directory as your thesis, or in directory<br />

texmf/tex/latex <strong>of</strong> your TEX system.<br />

Be sure to get the file ugasampl.tex along with it.<br />

14 Where is the documentation for uga.sty?<br />

You’re looking at part <strong>of</strong> it. The rest is in the files uga.sty and ugasampl.tex.<br />

You can and must read these files with your text editor.<br />

5


15 Do I have to get uga.sty before typing my<br />

thesis?<br />

No. You can type your thesis using the L A TEX report documentclass (described<br />

in Lamport’s Book); this will enable you to produce neat, singlespaced<br />

copies <strong>of</strong> the work in progress. When it’s finished, get uga.sty and<br />

make the small additions to your thesis that are described there.<br />

16 What are the required parts <strong>of</strong> a thesis<br />

typed with uga.sty?<br />

They are described in uga.sty itself, which you can read with your text<br />

editor. Alternatively, you can use ugasampl.tex as sample to imitate.<br />

17 Why is my table <strong>of</strong> contents blank or incorrect?<br />

You must run L A TEX twice in order to get a correct table <strong>of</strong> contents. The<br />

first time, it keeps records <strong>of</strong> where things are; the second time, it actually<br />

generates the table <strong>of</strong> contents. If the table <strong>of</strong> contents is long, you may need<br />

to run L A TEX three times to ensure that adequate space is left for it.<br />

18 How do I type a percent sign?<br />

See Lamport’s book. A quick answer: Type “\%”.<br />

6


19 How do I type a tilde (∼)?<br />

This character <strong>of</strong>ten occurs in web addresses. You will quickly discover that in<br />

L A TEX, when you type “~” you get a blank. (Specifically, you get a “required<br />

space,” a space that cannot be broken across a line break.)<br />

To get “∼” type“$\sim$”.<br />

20 What are italics used for?<br />

All <strong>of</strong> the things that would be underlined in a handwritten document, including<br />

titles <strong>of</strong> books, foreign words, and the like.<br />

In linguistics, it is normal to put foreign words in italics and their definitions<br />

in single quotes. For example, Agatha Christie’s famous detective is named<br />

after the French word poireau ‘leek’.<br />

21 What is underlining used for?<br />

Almost nothing. Roman type is not normally underlined; use italics instead.<br />

22 What is typewriter type used for?<br />

Computer program languages, whether displayed or quoted in text.<br />

example, here is part <strong>of</strong> a program written in C:<br />

For<br />

for(i=100,i>0,i--)<br />

{<br />

printf("%d bottles <strong>of</strong> beer on the wall...\n");<br />

}<br />

7


It demonstrates how to use the for statement to count down from 100 to 1.<br />

23 What is the verbatim environment used<br />

for?<br />

Computer programs, as just demonstrated.<br />

24 What is sans-serif type used for?<br />

Almost nothing except labels within illustrations.<br />

25 How do I type the bibliography?<br />

See Lamport’s book. L A TEX allows you to refer to bibliography items in your<br />

text with markers such as \cite{Chomsky} then have L A TEX automatically<br />

turn these into bracketed numbers in the bibliography.<br />

<strong>With</strong> uga.sty, simply use the thebibliography environment exactly as<br />

Lamport describes it. This will produce a bibliography in the form <strong>of</strong> an<br />

unnumbered chapter at the end <strong>of</strong> your thesis.<br />

26 What if each chapter has its own bibliography?<br />

If you have bibliographies at the ends <strong>of</strong> the individual chapters, use the<br />

environment chapterbibliography instead <strong>of</strong> thebibliography. It works<br />

exactly the same way except that the bibliography becomes a normally num-<br />

8


ered section, not an unnumbered chapter. There is an example <strong>of</strong> this in<br />

ugasampl.tex.<br />

The chapterbibliography environment is provided by uga.sty.<br />

27 What if I don’t like bracketed numbers?<br />

Here is an example <strong>of</strong> a trick to get L A TEX to print a bibliography without<br />

bracketed numbers. Basically, you are telling L A TEX to put the author’s name<br />

in place <strong>of</strong> the bracketed number. Note that this involves using \item rather<br />

than \bibitem.<br />

\begin{thebibliography}{}<br />

\item[Covington, Michael A.]<br />

\emph{Natural Language Processing for Prolog Programmers.}<br />

Englewood Cliffs, N.J.: Prentice Hall, 1994.<br />

\item[O’Keefe, Richard A.]<br />

\emph{The Craft <strong>of</strong> Prolog.}<br />

Cambridge, Mass.: MIT Press, 1991.<br />

\end{thebibliography}<br />

When doing this, don’t use the \cite command; instead, handle your references<br />

manually.<br />

You can do exactly thesamethingwithchapterbibliography.<br />

9


28 Why is there too much space after some<br />

<strong>of</strong> the periods?<br />

L A TEX assumes that every period marks the end <strong>of</strong> a sentence, so it leaves<br />

extra space after it. You should use a required space (~) after every period<br />

that does not mark the end <strong>of</strong> a sentence. Type “T.~S.~Eliot” toprint<br />

“T. S. Eliot” or the like.<br />

Alternatively, right after \begin{document} you can issue the command<br />

\frenchspacing<br />

in order to turn <strong>of</strong>f the extra space after periods. “French” spacing is perfectly<br />

acceptable in an American thesis.<br />

29 Why do some words hang out past the<br />

right margin?<br />

When L A TEX cannot break a line satisfactorily, it leaves a word sticking out<br />

into the margin and gives you an “Overfull hbox” error message. It is up to<br />

you to rearrange the text so that it fits.<br />

30 What is an overfull hbox?<br />

See previous question.<br />

10


31 How do I turn <strong>of</strong>f justification?<br />

Justification means printing with a straight right margins. It is not required<br />

for <strong>University</strong> <strong>of</strong> <strong>Georgia</strong> theses, and if your text contains many formulas,<br />

web addresses, or other unbreakable items, you may get considerably neater<br />

results by turning it <strong>of</strong>f. To do this, issue the command<br />

\raggedright<br />

immediately after \begin{document}.<br />

You may need to turn <strong>of</strong>f justification only within a bibliography. In that<br />

case, put the \raggedright command after \begin{thebibliography} or<br />

\begin{chapterbibliography} as the case may be. It will then affect only<br />

the bibliography.<br />

32 How do I put a picture into my thesis?<br />

Here’s the process...<br />

1. Learn the difference between a vector (“draw”) program and a bitmap<br />

(“paint”) program. Vector programs, such as Corel Draw and Micrografx<br />

Windows Draw, tell the computer to draw lines at particular<br />

positions; they are the right tool for generating diagrams <strong>of</strong> all types.<br />

Bitmap programs are only for working with digitized photographs and<br />

the like; their output has an unpleasant stairstep appearance when<br />

enlarged or resized.<br />

2. Produce pr<strong>of</strong>essional-quality artwork. (You may want to hire a pr<strong>of</strong>essional<br />

illustrator.) Artwork in your thesis should look as good as the<br />

artwork in published books.<br />

3. Save your artwork as an encapsulated PostScript (EPS) file with no<br />

TIFF header. (The drawing s<strong>of</strong>tware may ask you whether you want a<br />

TIFF header; say no.)<br />

11


4. Use the graphics package (described in Lamport’s book) or the epsf<br />

package to incorporate your art into your L A TEX document. One way<br />

to do this is as follows:<br />

(a) Add the command \usepackage{epsf} right after \documentclass.<br />

(b) Use the command \centerline{\epsffile{xxxxxxx.eps}} (with<br />

the appropriate filename substituted) to put the picture in your<br />

document. Normally this will be within a figure environment as<br />

described in Lamport’s book.<br />

33 How do I put a Windows screen shot into<br />

my thesis?<br />

When writing about s<strong>of</strong>tware, you many need a picture <strong>of</strong> the computer<br />

screen with a program running. Under Windows 95 and up, you can “take<br />

a picture” <strong>of</strong> the screen, by pressing Print Screen (or Alt-Print Screen if<br />

you only need the current window). This puts a copy <strong>of</strong> the screen into<br />

the Windows clipboard. Then open up your favorite paint program (bitmap<br />

program) and choose Paste. Edit the picture to your satisfaction, save it,<br />

and export it as encapsulated PostScript. For the rest <strong>of</strong> the process, see the<br />

previous question.<br />

12

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!