The Suitability of the L^{A}TEX Text Formatter for Thesis Preparation by Technical and Non-technical Degree Candidates

by Jim Fox A dissertation^{†} submitted in partial fulfillment of the requirements for the degree of Doctor of Philosophy University of Washington 1995

Approved by (Chairperson of Supervisory Committee)

Program Authorized to Offer Degree

Date

† an egocentric imitation, actually

Extensive copying of this demonstration thesis, including its input files and macro package, is allowable for scholarly purposes, consistent with “fair use” as prescribed in the U.S. Copyright Law. Requests for copying or reproduction of this thesis may be avoided by a simple anonymous ftp to ftp.u.washington.edu where the necessary files may be found in /pub/tex/thesis.

Signature

Date University of Washington

Abstract

The Suitability of the L^{A}TEX Text Formatter for Thesis Preparation by Technical and Non-technical Degree Candidates

by Jim Fox

Chairperson of Supervisory Committee: Professor Department

This sample dissertation is an aid to students who are attempting to format their theses with L^{A}TEX, a sophisticated text formatter widely available at the University of Washington and other fine institutions.

• It describes the use of a specialized macro package developed specifically for thesis production at the University. The macros customize L^{A}TEX for the correct thesis style, allowing the student to concentrate on the substance of his or her text.^{1}

• It demonstrates the solutions to a variety of formatting challenges found in thesis production.

• It serves as a template for a real dissertation.

1 See Appendix A to obtain the source to this thesis and the style file.

TABLE OF CONTENTS

List of Figures iii

Glossary iv

Chapter 1: Introduction 1 1.1 The Purpose of This Sample Thesis . . . . . . . . . . . . . . . . . . . 1 1.2 Conventions and Notations . . . . . . . . . . . . . . . . . . . . . . . . 2 1.3 Nota bene . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Chapter 2: A Brief Description of TEX 3

2.1 What is it; why is it spelled that way; and what do really long section

titles look like in the text and in the Table of Contents? . . . . . . . . 3 2.2 TEXbooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.3 Mathematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.4 Languages other than English . . . . . . . . . . . . . . . . . . . . . . 5

Chapter 3: The Thesis Unformatted 6 3.1 The Control File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3.2 The Text Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3.3 The Preliminary Pages . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.4 Customization of the Macros . . . . . . . . . . . . . . . . . . . . . . . 15

Chapter 4: Hardware Dependencies (And Other Complications) 16 4.1 Running L^{A}TEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 4.2 Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 4.3 Printer Perversity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

Bibliography 18 Appendix A: Where to find the files 19

LIST OF FIGURES

2.1 The beginning of the Chapter II input file. . . . . . . . . . . . . . . . 4

3.1 A thesis control file . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3.2 Generating a facing caption page . . . . . . . . . . . . . . . . . . . . 10 3.3 Generating a landscape table . . . . . . . . . . . . . . . . . . . . . . 12

GLOSSARY

ARGUMENT: replacement text which customizes a TEX macro for each particular usage.

BACK-UP: a copy of a file to be used when catastrophe strikes the original. People who make no back-ups deserve no sympathy.

CONTROL SEQUENCE: the normal form of a command to TEX.

DELIMITER: something, often a character, that indicates the beginning and ending of an argument. More generally, a delimiter is a field separator.

DOCUMENT STYLE: a file of macros that tailors L^{A}TEX for a particular document. The macros described by this thesis constitute a document style.

DOCUMENT STYLE OPTION: a macro or file of macros that further modifies L^{A}TEX for a particular document. The option [chapternotes] constitutes a document style option.

FIGURE: illustrated material, including graphs, diagrams, drawings and photographs.

FONT: a character set (the alphabet plus digits and special symbols) of a particular size and style. A couple of fonts used in this thesis are twelve point roman and twelve point roman slanted.

FOOTNOTE: a note placed at the bottom of a page, end of a chapter, or end of a thesis that comments on or cites a reference for a designated part of the text.

FORMATTER: (as opposed to a word-processor) arranges printed material according to instructions imbedded in the text. A word-processor, on the other hand, is normally controlled by keyboard strokes that move text about on a display.

L^{A}TEX: simply the ultimate in computerized typesetting. MACRO: a user-defined control sequence. MACRO PACKAGE: a set of macros that combine for a single purpose. These thesis

macros constitute a macro package. PICA: a unit of length. One pica is twelve points and six picas is about an inch. POINT: a unit of length. 72.27 points equals one inch. ROMAN: a conventional printing typestyle. This thesis is set in roman type. RULE: a straight printed line; e.g., . TABLE: information placed in a columnar arrangement. THESIS: either a master’s thesis or a doctoral dissertation. This document also

refers to itself as a thesis, although it really is not one.

ACKNOWLEDGMENTS

The author wishes to express sincere appreciation to the University of Washington, where he has had the opportunity to work with the TEX formatting system, and to Donald Knuth, il miglior fabbro.

Chapter 1

INTRODUCTION

The utility of a clean, professionally prepared thesis is well documented^{1} and, until recently, a degree candidate had no recourse but to submit his or her thesis to a typist for completion. Revisions were difficult and time consuming, and even at its best the resultant thesis still looked typed. The advent of computerized typesetting has revolutionized thesis preparation, and TEX in particular brings to the university student the power and flexibility of an ‘industrial-strength’ typesetter.

TEX is a flexible, complete, and professional typesetting system. It has been programmed to produce the same document on all machines, so a suitable printer can always be found for the final copy while drafts are made on more conventional and inexpensive printers. The ‘suitable’ standard is a 300 dot-per-inch laser printer, which is excellent for thesis production. Many such laser printers are available about the campus.

1.1 The Purpose of This Sample Thesis

This sample is both a demonstration of the quality and propriety of a L^{A}TEX^{2} formatted thesis, and is documentation for the preparation of a thesis. It has made extensive use of a custom class file developed specifically for this purpose at the Uni-

1 See, for example, W. Shakespeare[8] for an early treatment.

2 We mean the L^{A}TEX 2ε version of L^{A}TEX. Earlier versions, now called L^{A}TEX2.09 were much different.

versity of Washington. Chapter II discusses TEX and L^{A}TEX. Chapter III describes the additional macros and functions provided by the custom thesis class file. Finally, Chapter IV discusses some special problems due to the inherent differences among the various computers and printers that support L^{A}TEX.

It is impossible to predict all the formatting problems one will encounter and there will be problems that are best handled by a specialist. Help is available at University Computing Services, or can very likely be found in the student’s own department.

1.2 Conventions and Notations

In this thesis the typist refers to the user of L^{A}TEX—the one who makes formatting decisions and chooses the appropriate formatting commands. He or she will most often be the degree candidate.

This document deals with L^{A}TEX typesetting commands and their functions. Wherever possible the conventions used to display text entered by the typist and the resulting formatted output are the same as those used by the TEXbooks. Therefore, typewriter type is used to indicate text as typed by the computer or entered by the typist. It is quite the opposite of italics, which indicates a catagory rather than exact text. For example, alfa and beta might each be an example of a label.

1.3 Nota bene

This sample thesis was produced by the L^{A}TEX document class it describes and is acceptable to the Graduate School[11]. However, the use of this package does not guarantee acceptability of a particular thesis, nor does the Graduate School recommend these macros, or the TEX formatter, over any other package or formatter.

A BRIEF DESCRIPTION OF TEX

The TEX formatting program is the creation of Donald Knuth of Stanford University. It has been implemented on nearly every general purpose computer and produces exactly^{1} the same copy on all machines.

2.1 What is it; why is it spelled that way; and what do really long section titles look like in the text and in the Table of Contents?

TEX is a formatter. A document’s format is controlled by commands embedded in its text. The peculiar look to the names indicate that TEX is also a typesetting program. Each character and rule on the page is precisely positioned. L^{A}TEX is a special version of TEX—preloaded with a volumnous set of macros that simplify most formatting tasks.

TEX uses control sequences to control the formatting of a document. These control sequences are usually words or groups of letters prefaced with the backslash character (\). For example, Figure 2.1 shows the text that printed the beginning of this chapter. Note the control sequence \chapter that instructed TEX to start a new chapter, print the title, and make an entry in the table of contents. It is an example of a macro defined by the L^{A}TEX macro package. The control sequence \TeX, which prints the word TEX, is a standard macro from the TEXbook. The short control sequence \\ in the title instructed TEX to break the title line at that point. This capability is an

1 “Exactly” specifically excludes the inherent variety in print devices.

      \chapter{A Brief\\Description of \TeX}
      The \TeX\ formatting program is the creation of
      Donald Knuth of Stanford University.

Figure 2.1: The beginning of the Chapter II input file.

example of an extension to L^{A}TEX provided by the thesis document class.

Most of the time TEX is simply building paragraphs from text in the input files. No control sequences are involved. New paragraphs are indicated by a blank line in the input file. Hyphenation is performed automatically.

2.2 TEXbooks

The primary reference for L^{A}TEX is Lamport’s second edition of the L^{A}TEX User’s Guide[7]. It is easily read and should be sufficient for thesis formatting. See also the L^{A}TEX Companion[2] for descriptions of many add-on macro packages.

Although unnecessary for thesis writers the TEXbook is the primary reference for TEXsperts worldwide.

2.3 Mathematics

The thesis macro style does not expand on TEX’s or L^{A}TEX’s comprehensive treatment of mathematical equation printing.^{2} The TEXbook[3], L^{A}TEX User’s Guide[7], and The

2 Although many TEX-formatted documents contain no mathematics save the page numbers, it seems appropriate that this paper, which is in some sense about TEX, ought to demonstrate an equation or two. Here then, is a statement of the Nonsense Theorem.

Assume a universe E and a symmetric function $ defined on E, such that for each $^{yy} there exists a $\overline{yy}, where $^{yy} = $\overline{yy}. For each element i of E define S(i) = ∑_{i} $^{yy} + $\overline{yy} + 0. Then

L^{A}TEX Companion[2] thoroughly cover this topic.

2.4 Languages other than English

Most L^{A}TEX implementations at the University are tailored for the English language. However, L^{A}TEX will format many other languages. Consult your department or contact the Humanities and Arts Computing Center for assistance with non-English formatting.

Unusual characters can be defined via the font maker METAFONT (documented by Knuth[6]). The definitions are not trivial. Students who attempt to print a thesis with custom fonts may soon proclaim,

“ ’απoθανϵι̂ν θϵ́λω.”

if RR is that subset of E where 1 + 1 = 3, for each i

lim_{$→∞} ∫ Sdi = \{ \begin{matrix}0, & if i ∉ RR; \\ ∞, & if i ∈ RR. \end{matrix}

THE THESIS UNFORMATTED

This chapter describes the thesis class (uwthesis.cls, version 4) in detail and shows how it was used to format the thesis. A working knowledge of Lamport’s L^{A}TEX manual[7] is assumed.

3.1 The Control File

The source to this sample thesis is contained in a single file only because ease of distribution was a concern. You should not do this. Your task will be much easier if you break your thesis into several files: a file for the preliminary pages, a file for each chapter, one for the glossary, and one for each appendix. Then include a control file to tie them all together. This way you can edit and format parts of your thesis much more efficiently.

Figure 3.1 shows a control file that might have produced this thesis. It sets the document style, with options and parameters, and formats the various parts of the thesis—but contains no text of its own.

The first section defines the document class and options. This thesis has specified two-sided formatting, which is now allowed by the Graduate School.

A partial thesis is easily formatted by inserting the comment character (%) before each unwanted section.

3.2 The Text Pages

A chapter is a major division of the thesis. Each chapter begins on a new page and has a Table of Contents entry.

3.2.1 Chapters, Sections, Subsections, and Appendices

Within the chapter title use a \\ control sequence to separate lines in the printed title (recall Figure 2.1.). The \\ does not affect the Table of Contents entry.

Format appendices just like chapters. The control sequence \appendix instructs L^{A}TEX to begin using the term ‘Appendix’ rather than ‘Chapter’.

Sections and subsections of a chapter are specified by \section and \subsection, respectively. In this thesis chapter and section titles are written to the table of contents. Consult Lamport[7, pg. 176] to see which subdivisions of the thesis can be written to the table of contents. The \\ control sequence is not permitted in section and subsection titles.

3.2.2 Footnotes

Footnotes format as described in the L^{A}TEX book. You can also ask for end-of-chapter or end-of-thesis notes. The thesis class will automatically set these up if you ask for the document class option chapternotes or endnotes.

If selected, chapternotes will print automatically. If you choose endnotes however you must explicitly indicate when to print the notes with the command \printendnotes. See the style guide for suitable endnote placement.

3.2.3 Figures and Tables

Standard L^{A}TEX figures and tables, see Lamport[7], normally provide the most convenient means to position the figure. Full page floats and facing captions are exceptions to this rule.

Figure 3.1: A thesis control file (uwthesis.tex). This file is the input to L^{A}TEX that will produce a thesis. It contains no text, only commands which direct the formatting of the thesis. This is also an example of a ‘facing page’ caption. It is guaranteed to appear on a lefthand page, facing the figure contents on the right. See the text.

% LaTeX thesis control file
\documentclass[twoside]{uwthesis}
\begin{document}
% preliminary pages
%
\prelimpages
\input prelim
% text pages
%
\textpages
\input chap1
\input chap2
\input chap3
\input chap4
% bibliography
%
\bibliographystyle{plain}
\bibliography{uwthesis}
% appendices
%
\appendix
\input appxa
\input appxb
\end{document}

     \begin{figure}[p]
        \begin{leftfullpage}
           \caption{ . . . }
        \end{leftfullpage}
     \end{figure}

Figure 3.2a: This text would create a facing caption page in the one-side thesis style.

If you want a figure or table to occupy a full page enclose the contents in a fullpage environment. See figures 3.2.

Facing page captions are described in the Style Manual [11]. They have different meanings depending on whether you are using the one-side or two-side thesis style.

If you are using the one-side style, determined by the absence of twoside in your documentclass options, facing caption pages are captions for full page figures or tables and appear on the left-hand page (facing the illustration on the right-hand page). The page number and binding offset are reversed from their normal positions. Format these captions by enclosing the float contents in a leftfullpage environment. Figure 3.1, for example, required a full page so its caption (on a facing caption page) would have been formatted as shown in figure 3.2a. Because you are printing on only one side of each sheet, you must manually turn this caption sheet over and insert the illustration following it.

If instead you are using the two-side style, determined by the presence of twoside in your documentclass options, facing captions are also full page captions for full page figures or tables and must face the illustration to which they refer. You must explicitly format both pages. The caption part must appear on an even page (left side) and the figure or table must come on the following odd page (right side). Enclose the float contents for the caption in a leftfullpage environment, and enclose the float contents for the figure or table in a fullpage environment. Figure 3.2b shows a

     \begin{figure}[p]% the left side caption
       \begin{leftfullpage}
         \caption{ . . . }
       \end{leftfullpage}
     \end{figure}
     \begin{figure}[p]% the right side `empty' space
       \begin{fullpage}
          . . .
          ( note.. no caption )
       \end{fullpage}
     \end{figure}

Figure 3.2b: This text would create a double page figure in the two-side style.

doublepage figure request. The first page (left side) contains the caption. The second page (right side) could be left blank. A picture or graph might be pasted onto this space.

3.2.4 Horizontal Figures and Tables

Figures and tables may be formatted horizontally (a.k.a. landscape) as long as their captions appear horizontal also. L^{A}TEX will format landscape material for you if a couple of conditions are met. You have to have a printer and printer driver that allow rotations and you have to have a couple of add-on L^{A}TEX packages. Users of PostScript printers and Uniform Access computers at the University of Washington will conform to both requirements, as will users of PCTEX if they use postscript.

Include the rotating package

      \usepackage[figuresright]{rotating}

and read the documentation that comes with the package. Documentation can also

be found on our systems in /usr/local/tex/doc/....

     \begin{sidewaystable}
         ...
         \caption{ . . . }
     \end{sidewaystable}

Figure 3.3: This text would create a landscape table with caption.

Figure 3.3 is an example of how a landscape table might be formatted.

3.2.5 Figure and Table Captions Most captions are formatted with the \caption macro as described by Lamport[7]. The thesis class extends this macro to allow continued figures and tables, and to provide multiple figures and tables with the same number, e.g., 3.1a, 3.1b, etc.

To format the caption for the first part of a figure or table that cannot fit onto a single page use the standard form:

      \caption[toc]{text}

To format the caption for the subsequent parts of the figure or table use this caption:

      \caption(-){(continued)}

It will keep the same number and the text of the caption will be (continued).

To format the caption for the first part of a multi-part figure or table use the format:

      \caption(a)[toc]{text}

The figure or table will be lettered (with ‘a’) as well as numbered. To format the caption for the subsequent parts of the multi-part figure or table use the format:

      \caption(x){text}

where x is b, c, …. The parts will be lettered (with ‘b’, ‘c’, …).

3.3 The Preliminary Pages

These are easy to format only because they are relatively invariant among theses. Therefore the difficulties have already been encountered and overcome by L^{A}TEX and the thesis document style.

3.3.1 Title page

Define \Title, \Author, and \Year and then print the title page with \titlepage. The title page of this thesis was printed with^{1}

      \Title{The Suitability of the \LaTeX\ Text Formatter\\
         for Thesis Preparation by Technical and\\
         Non-technical Degree Candidates}
      \Author{Jim Fox}
      \Year{1995}
      \titlepage

You may also change other text on the title page with these macros.

\Degree{degree name} defaults to “Doctor of Philosophy”

\School{school name} defaults to “University of Washington”

\Degreetext{degree text} defaults to “A dissertation submitted … ”

\Signatures{number of signature lines} defaults to “3”

These definitions must appear \underline{before} the \titlepage command.

1 Actually, it wasn’t. It included a footnote—unusual for title pages.

3.3.2 Quote slip

Use the \quoteslip macro to format the quote slip. It has one argument, which is the text of the slip. The quote slip of this thesis was printed with

      \quoteslip{Extensive copying . . . 98105.}

3.3.3 Abstract

Define \Professor and \Department and then print the abstract with \abstract. It has one argument, which is the text of the abstract. The abstract of this thesis was printed with

      \Professor{ Professor}
      \Department{ Department}
      \abstract{This sample . . . `real' dissertation.}

3.3.4 Tables of contents

Use the standard L^{A}TEX commands to format these items.

3.3.5 Acknowledgments

Use the \acknowledgments macro to format the acknowledgments page. It has one argument, which is the text of the acknowledgment. The acknowledgments of this thesis was printed with

      \acknowledgments{\vskip2pc
        {\narrower\noindent
         The author wishes . . . {\it il miglior fabbro}.\par}}

3.3.6 Dedication

Use the \dedication macro to format the dedication page. It has one argument, which is the text of the dedication.

3.3.7 Vita

Use the \vita macro to format the curriculum vitae. It has one argument, which is your life.

3.4 Customization of the Macros

Simple customization, including alteration of default parameters, changes to dimensions, paragraph indentation, and margins, are not too difficult. You have the choice of modifing uwthesis.cls or loading one or more personal style files to customize your thesis. The latter is usually most convienent, since you do not need a personal copy of uwthesis.cls in your directory.

HARDWARE DEPENDENCIES (AND OTHER COMPLICATIONS)

TEX has been designed to produce exactly the same document on all computers and on all printers. Exactly the same means that the various spacings, line and page breaks, and even hyphenations will occur at the same places when the document is formatted on a variety of computers. However, there are some discrepancies that cannot be overcome. They involve the mechanics of running TEX and the necessary variations in computer and output device capability.

4.1 Running L^{A}TEX

Each operating system has some means for editing and storing text, starting programs, and printing program output. These are uniformly inconsistant between machines. Therefore there are no useful, generic instructions for running L^{A}TEX. You will have to be able to do the following on your chosen computer.

• Create, edit, and back-up text files.

• Run the TEX program with L^{A}TEX format.

• Convert the device independent output to a format suitable to the selected printer.

• Print the converted file.

There are generally user’s manuals available for each TEX implementation, which explain the program’s local procedures and nuances.

4.2 Fonts

Different printers, and different sites with identical printers, make certain sets of fonts available for their users. While these font sets are not identical, they do have a common subset—the basic roman fonts. Most sites will also provide fonts at standard magnifications (\small, \large, \Large, etc.). The Graduate School wants a larger type than is normally used for book printing. The thesis document class uses 12-point.

The postscript font New Century Schoolbook also prints a nice thesis. Request it with:

      \usepackage{newcent}

4.3 Printer Perversity

Never let anything mechanical know you are depending on it.

A printer will break the day before a dissertation is due. This is an immutable law of nature. Print your dissertation well in advance of any deadlines. Take some time to admire your work.

BIBLIOGRAPHY

[1] Editor. Hyphenation exception log. TUGboat, 7(3):145, 1986.

[2] Michel Goossens, Frank Mittelbach, and Alexander Samarin. The L^{A}TEX Companion. Addison-Wesley, 1994.

[3] Donald E. Knuth. TEX book. Addison-Wesley, 1984.

[4] Donald E. Knuth. TEX: The Program. Addison-Wesley, 1986.

[5] Donald E. Knuth. Computer Modern Typefaces. Addison-Wesley, 1986.

[6] Donald E. Knuth. The Metafont book. Addison-Wesley, 1986.

[7] Leslie Lamport. L^{A}TEX: A Document Preparation System. Addison-Wesley, 2nd edition, 1994.

[8] William Shakespeare. Hamlet. F.S. Crofts & Co., Inc., NY, 1946. Act I, Scene 3, Lines 70-72, are apropos.

[9] Ph.D. Spivak, M.D. PCTEX Manual. Personal TEX, Inc., CA, 1985.

[10] Ph.D. Spivak, M.D. The Joy of TEX. American Mathematical Society, RI, 1986.

[11] Graduate School University of Washington. Style and policy manual for theses and dissertations, 1994.

Appendix A

WHERE TO FIND THE FILES

The thesis class file, uwthesis.cls, contains the parameter settings, macro definitions, and other TEXnical commands which allow L^{A}TEX to format a thesis. The source to the document you are reading, uwthesis.tex, contains many formatting examples which you may find useful. The bibliography database, uwthesis.bib, contains instructions to BibTeX to create and format the bibliography. You can find these files in at least the following locations:

• The TEX library on UCS UNIX computers,

      /usr/local/tex/lib/texmf/tex/latex/uw
      /usr/local/tex/lib/texmf/doc
   • Anonymous ftp to ftp.u.washington.edu
      pub/tex/thesis

• World Wide Web

      http://weber.u.washington.edu/~fox/tex