Sample Honours Dissertation 1 Yet Another Victim December 1996 1 Submitted in partial fulfilment of the requirements for the Bachelor of Science degree with Honours at the University of Western Australia Abstract This sample dissertation is an aid to students who are attempting to format their theses with LATEX 2ε , a sophisticated text formatter available on our UNIX machines. • It describes the use of a template dissertation file uwadissert.tex that uses the macro package uwamaths.1 • It demonstrates the solutions to some of formatting challenges found in thesis/dissertation production. 1 See Appendix A to obtain the source for this dissertation. Acknowledgements The preparer2 wishes to thank all and sundry for their help in the production of this dissertation. 2 . . . as distinct from author. This document was prepared by Greg Gamble on May 24, 1996 . . . and last updated on December 19, 1997. It is essentially a cobbling together of a sample thesis by Jim Fox of the University of Washington (available by ftp in directory macros/latex/contrib/supported/uwthesis at CTAN sites) and a template for a dissertation by Stuart Allie of the University of Western Australia, who are the true authors of this document. Contents Glossary v 1 Introduction 1 1.1 The Purpose of This Sample Thesis . . . . . . . . . . . . . . . 2 1.2 Conventions and Notations . . . . . . . . . . . . . . . . . . . . 2 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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 3 The Dissertation Unformatted 3.1 The Control File . . . . . . . . . . . . . . . . . . . . . . . . . 6 6 3.1.1 Using BibTEX to generate the .bbl file . . . . . . . . . 7 3.1.2 Further hints . . . . . . . . . . . . . . . . . . . . . . . 9 i 3.2 The Body of the dissertation . . . . . . . . . . . . . . . . . . . 11 3.2.1 Chapters, Sections, Subsections, and Appendices . . . . 11 3.2.2 Footnotes . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.2.3 Figures and Tables . . . . . . . . . . . . . . . . . . . . 12 3.2.4 Horizontal Figures and Tables . . . . . . . . . . . . . . 13 4 Hardware Dependencies (And Other Complications) 15 4.1 Running LATEX . . . . . . . . . . . . . . . . . . . . . . . . . . 15 4.2 Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 4.3 Printer Perversity . . . . . . . . . . . . . . . . . . . . . . . . . 17 A Where to find the files 18 A.1 Using Netscape . . . . . . . . . . . . . . . . . . . . . . . . . . 18 A.2 The location of TEX files generally . . . . . . . . . . . . . . . . 20 A.2.1 Where files are that specifically relate to LATEX . . . . 21 A.2.2 Where files are that specifically relate to BibTEX . . . 22 ii List of Tables 3.2.1 This is a sideways table, which should be centred vertically . . 14 iii List of Figures 3.1.1 A typical control file – with some comments . . . . . . . . . . 10 3.2.1 Kendo, anyone? . . . . . . . . . . . . . . . . . . . . . . . . . . 13 iv 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. 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 class a file of macros that tailors LATEX for a particular document. The template uwadissert.tex uses the report class. document class option e.g. 12pt and a4paper are options used in the template uwadissert.tex to further tailor LATEX for a particular document. 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. Typical fonts are 12 point roman, 12 point italic, 12 point slanted, 12 point sans serif, 12 point small caps. 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. v formatter (as opposed to a word-processor) arranges printed material according to instructions embedded in the text. A word-processor, on the other hand, is normally controlled by keyboard strokes that move text about on a display. AMS-LATEX simply the ultimate in computerised typesetting. macro a user-defined control sequence. macro package a set of macros that combine for a single purpose. The file uwamaths.sty constitutes the package uwamaths. 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 text is set in roman type. rule a straight printed line; e.g., . table information placed in a columnar arrangement. vi Chapter 1 Introduction The utility of a clean, professionally prepared thesis is well-documented1 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 computerised typesetting has revolutionised 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. This means using a different computer or printer will not alter the layout of the document. 1 See, for example, W. Shakespeare [8] for an early treatment. 1 1.1 The Purpose of This Sample Thesis This sample is both a demonstration of the quality and propriety of a LATEX2 formatted thesis. It has made extensive use of the uwamaths package developed specifically for Maths department users of LATEX 2ε at the University of Western Australia. Chapter 2 discusses TEX and LATEX. Chapter 3 describes the uwadissert.tex template. Finally, Chapter 4 discusses some special problems due to the inherent differences among the various computers and printers that support LATEX. 1.2 Conventions and Notations This document deals with LATEX typesetting commands and their functions. We use the general convention that typewriter type is used to indicate text as typed by a LATEX user (as distinct from the resulting formatted output). 2 We mean the LATEX 2ε version of LATEX. Earlier versions, now called LATEX2.09 were quite different. 2 Chapter 2 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 exactly1 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. LATEX is a special version of TEX—preloaded with a voluminous set of macros that simplify most formatting tasks. 1 “Exactly” specifically excludes the inherent variety in print devices. 3 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 (\). The heading for this chapter was produced by the following line: \chapter{A Brief \\ Description of \TeX} The control sequence \chapter instructs TEX to start a new chapter, print its argument as the chapter’s title, and make an entry in the table of contents. It is an example of a macro defined by the LATEX macro package. The control sequence \TeX, which prints the word TEX, is a standard macro from the TEXbook [4]. The short control sequence \\ in the title instructed TEX to break the title line at that point. 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 LATEX is Lamport’s LATEX – A Document Preparation System [5, 6]. It is easy to read and should be sufficient for dissertation formatting. See also the LATEX Companion [3] for descriptions of many addon macro packages. Although unnecessary for thesis writers the TEXbook [4] is the primary reference for TEXsperts worldwide. 4 2.3 Mathematics The thesis macro style does not expand on TEX’s or LATEX’s comprehensive treatment of mathematical equation printing.2 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 $yy , where $yy = $yy . For each element i of E define P S(i) = i $yy + $yy + 0. Then if RR is that subset of E where 1 + 1 = 3, for each i Z 0, if i ∈ / RR, lim Sdi = ∞, if i ∈ RR. $→∞ 5 Chapter 3 The Dissertation Unformatted This chapter describes the uwadissert.tex template in detail and shows how it was used to produce this sample dissertation, by putting the dissertation’s text in the various \include’d files. A working knowledge of Lamport’s LATEX book [5, 6] is assumed. 3.1 The Control File The control file should be nearly identical to the template uwadissert.tex, save for a file-name change, and the appropriate change to the two lines marked with the comments CHANGE TO YOUR TITLE CHANGE ARGUMENT TO YOUR NAME It’s up to you to fill in the gaps by essentially creating the files: abstract.tex acknow.tex glossary.tex 6 chap1.tex chap2.tex chap3.tex chap4.tex appxA.tex and also a bibliography file uwadissert.bbl, if you retain the name uwadissert.tex for your dissertation control file. (The .bbl file may also be generated using BibTEX (recommended) . . . see the next section.) You may of course have more or fewer chapters and appendices and you are unlikely to need a glossary. If you don’t need a glossary, just comment that line out by putting a % at the beginning of the line. 3.1.1 Using BibTEX to generate the .bbl file The bibliography file can be more efficiently produced by creating a .bib file and using BibTEX. The template specifies the file uwa.bib with the command \bibliography{uwa} (If you choose to create your .bbl file without using BibTEX there is no need to change this line.) This line also tells LATEX to read in uwadissert.bbl (assuming that you have retained the name uwadissert.tex for your dissertation control file) if it exists. The advantage of the BibTEX approach is that you let a particular .bst (bibliography style) file work out how the bibliography should be formatted. This invariably leads to a more consistently formatted bibliography. The template specifies the style file uwa.bst with the command \bibliographystyle{uwa} 7 There are many other possible styles. The standard ones are plain, abbrv, unsrt and alpha. The style file uwa.bst was created by Greg Gamble. Of the standard styles, uwa is most like abbrv. These styles affect the presentation of the bibliography as follows. plain Entries are sorted alphabetically by author then title, etc. Labels are numeric. abbrv Similar to plain, but entries are more compact. First names, month and journal names are abbreviated. unsrt Similar to plain, but entries are printed in order of citation, rather than sorted alphabetically. alpha Similar to plain, but the labels are formed from the author’s name and the year of publication. uwa Similar to abbrv. The main difference is that adjacent fields, e.g. author, title are set off from each other by using different fonts etc. Let’s say you create the file myrefs.bib according to the standard format expected by BibTEX and you have changed, accordingly, the \bibliography declaration in your control file to \bibliography{myrefs} Suppose also that your control file has been renamed mydissert.tex. Then the file mydissert.bbl is created by the following sequence of commands latex mydissert bibtex mydissert The pass through LATEX creates a file mydissert.aux from the file mydissert.tex (among other things) and the pass through BibTEX creates a file mydissert.bbl 8 from the files myrefs.bib and mydissert.aux (BibTEX knows to look for myrefs.bib from instructions written in mydissert.aux). A further pass through LATEX will cause mydissert.bbl to be incorporated into the formatted output file mydissert.dvi. You can also list more than one .bib file in the \bibliography declaration. See the LATEX book [5, 6] for details. 3.1.2 Further hints You can use the \includeonly command to restrict formatting of your dissertation to small chunks, by making only minor changes to your control file, e.g. \includeonly{chap1,chap2} in the preamble would cause only chap1.tex and chap2.tex to be re-formatted. The other \included files are either ignored or old versions are used instead. This way you can edit and format parts of your dissertation much more efficiently. Figure 3.1.1 on page 10 shows a control file that produced this sample dissertation, except that many of the comments have been stripped out so that it will fit on a single page. (The page number is in a silly place . . . but some things are just not worth the trouble of fixing!) The control file sets the document class (report), with options 12pt and a4paper, and formats the various parts of the dissertation—but contains almost no text of its own. 9 \documentclass[12pt,a4paper]{report} \usepackage{uwamaths} % Standard Maths Department macros package \usepackage{rotating} % Useful for printing wide tables sideways. \usepackage{prettyref} % Makes \pref{sec:xxx} equivalent \newcommand{\pref}{\prettyref} % to: Section~\ref{sec:xxx} etc. \oneandhalfspacing % In drafts you may wish to comment out this line. \title{ % Set up title page information Sample Honours Dissertation % CHANGE TO YOUR TITLE \thanks{Submitted in partial fulfilment of the requirements for the Bachelor of Science degree with Honours at the University of Western Australia} } \author{Yet Another Victim} % CHANGE ARGUMENT TO YOUR NAME \date{December 1996} \parskip=10pt % Puts some vertical space between paragraphs. %\includeonly{} % uncomment and insert chapters currently being worked on. \begin{document} % Start the document. \pagenumbering{roman} % Roman page numbering until we get to dissertation body. \maketitle % Make a title page. \include{abstract} % Good to have an abstract. \include{acknow} % File acknow.tex should begin: \begin{acknowledgements} % ... and end: \end{acknowledgements} \tableofcontents \listoftables % Comment out if you have no tables \listoffigures % Comment out if you have no figures \include{glossary} % Optional - most dissertations won’t have or need one. % Body of dissertation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \pagenumbering{arabic} \include{chap1} % File chap1.tex should begin: \chapter{Introduction} \include{chap2} \include{chap3} \include{chap4} \appendix \include{appxA} %\nocite{*} % BibTeX instruction ... uncomment to get all .bib file refs \bibliographystyle{uwa} % BibTeX instruction ... benign if BibTeX not used \bibliography{uwa} % BibTeX instruction ... argument lists .bib % files needed to construct a .bbl file. % Also tells LaTeX to input .bbl file (if it exists). \end{document} 10 Figure 3.1.1: A typical control file – with some comments 3.2 The Body of the dissertation A chapter is a major division of the dissertation. As we have used \include, each chapter begins on a new page. Also each chapter 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. Format appendices just like chapters. The control sequence \appendix instructs LATEX to begin using the term ‘Appendix’ rather than ‘Chapter’, and numbers the appendices in uppercase roman, i.e. A, B, . . . . Sections and subsections of a chapter are specified by \section and \subsection, respectively. Section and subsection titles are also written in the Table of Contents. 3.2.2 Footnotes Footnotes format as described in the LATEX book [5, 6]. Essentially, you put your footnote text in place of the dots in a \footnote{...} construct, at the point where you want the number1 of the footnote to appear in the text. The special footnote symbols, as per the footnote, are obtained by the following sequence 1 It doesn’t have to be a number. You can use the nine footnote symbols ∗, †, ‡, §, ¶, k, ∗∗, ††, ‡‡ 11 \renewcommand{\thefootnote}{\fnsymbol{footnote}} 3.2.3 Figures and Tables Standard LATEX figure and table environments (see the LATEX book [5, 6]) normally provide the most convenient means to position the figure. To include figures in a LATEX document, the easiest way is to use Encapsulated PostScript figures produced by, e.g. Gnuplot, MATLAB, Xfig etc. Below is a demonstration of how an Encapsulated PostScript item (in file: aijodan_small.eps) can be embedded in a figure of a LATEX document. Comments, after % signs have been added to show the purpose of some special commands. The following text . . . \begin{figure}[ht] %[ht] means .. I want it here! \centering %centre the figure \includegraphics*[height=7cm]{aijodan_small.eps} %include the figure \caption{Kendo, anyone?} %caption \label{fig:hpl} %makes \ref{fig:hpl} %the number of the figure \end{figure} produces Figure 3.2.1. (Figures are put as near as LATEX thinks reasonably possible to the current position if the h option is selected. To have absolute control over the placement of figures and tables use the package float and alter the figure environment option to H, see [7].) The above figure required the loading of the graphicx package. Note that the older macros \epsfxsize and \epsfbox of the graphics or epsf package perform a similar function to \includegraphics*. (If the noextras option is not selected the uwamaths package loads the epsf package . . . graphicx would have been preferable.) 12 Figure 3.2.1: Kendo, anyone? 3.2.4 Horizontal Figures and Tables Figures and tables may be formatted horizontally (a.k.a. landscape) using the rotating package [1]. There are plenty of other environments given by this package, we give an example of just one environment that is provided. If you are viewing this file by following the link uwadissert.dvi from the Maths Department TEX webpage and you followed the advice given under the link Viewing .dvi/.ps files, then the rotated picture will not be drawn correctly. Follow the link uwadissert.ps instead, if you are worried about this. Table 3.2.1 on page 14 is an example of how a landscape table might be formatted. With the sidewaystable environment a table is printed sideways, taking up the whole page; even the caption is rotated. Unfortunately, xdvi won’t preview rotated objects properly. To preview a document with rotated objects you need to create a PostScript file from the .dvi file first, by dvips dvifile -o and then view the .ps file created with ghostview. 13 14 Table 3.2.1: This is a sideways table, which should be centred vertically a b c d e f Chapter 4 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 LATEX The following are the essential steps required to produce a dissertation. • Create your LATEX source files with your favourite editor. While it is not in the least bit necessary it’s a good idea to structure your source files in some way, e.g. don’t make your lines too long, indent text between commands of form 15 \begin{env-name} and \end{env-name} In short, make a few rules about how you type your text in, and then when you make a syntactical mistake1 , your eye will have a better chance of detecting it! It’s a good idea to save (i.e. write) your file frequently when editing, just in case of a system crash, or some other catastrophe. Also make a backup of your file from time to time – possibly with a date code in its title. • Run latex on your source file. You may have to run latex more than once if using \cite, \label and \ref. • You should now have a .dvi file which you can view using xdvi if on a computer that supports an X-windows style environment. • To print the document you can use dvips. 4.2 Fonts AMS-LATEX and LATEX give you access to a huge number of fonts. The accessibility of these fonts is enhanced a bit further by the uwamaths package [2]. The LATEX book [5] gives the font commands as \rm for roman font (the default), \bf for bold face, \tt for typewriter type, \it for italic, \sf for sans serif, \sl for slanted and \sc for Small Caps. Also, \em toggles between italic and roman font to emphasize text. LATEX 2ε uses the NFSS (New Font Selection Scheme) which defines font attributes: family, shape and series, which makes it easy to get a bold italic typeface by {\bfseries\itshape a bold italic typeface}. 1 We all do! 16 On the other hand in OFSS, {\bf\it sample text} gave sample text, whereas {\it\bf sample text} gave sample text. Also, in changing from italic back to roman font one had to remember to put in an italic correction. Notice we tend to use the commands \bf, \it, etc. in an infix way. LATEX 2ε provides the commands \textbf, \texttt, \textit, \textsf, \textsl and \textsc. Each has a prefix syntax. They work like the OFSS commands but they also calculate and apply font corrections where the font changes – no italic corrections are needed! Similar commands, \mathrm, \mathnormal, \mathcal, \mathbf, \mathsf, \mathtt and \mathit exist for use in math-mode. To find out more about font changing commands, see [9, Sections 3.10 and 3.10]. To change font sizes, use the commands \tiny, \scriptsize, \footnotesize, \small, \normalsize, \large, \Large, \LARGE, \huge, \Huge. Use braces to limit the scope of size changing commands. 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. 17 Appendix A Where to find the files A.1 Using Netscape You only need to know one http address to find all the files discussed in this sample dissertation: http://maths.uwa.edu.au/computing/software/tex/ Alternatively, using the file protocol – but you need to be using an on-site SGI or SUN – the address is: file:/usr/local/tex/html/index.html Either of these is the address of the TEX home webpage. (You can also get to this page by following the links Computing Information Software and Documentation TeX from the Maths department’s homepage.) 18 The TEX home webpage is organised as follows . . . • LaTeX . . . ◦ Templates . . . Follow the link Templates. This will give you a table of templates. The control file for this sample honours dissertation, which doubles as a template for an honours dissertation, is uwadissert.tex If you want to get the included files of this sample dissertation and use them as examples for your own included files then they can be found by following the link Documentation for Packages (Contents) from the TEX home webpage (http address given above). This gives another table of contents organised as follows . . . • latex . . . ◦ amslatex ◦ base . . . ◦ misc 19 . . . ◦ rotating . . . ◦ styles . . . ◦ tools . . . ◦ uwa . . . Follow the link uwa, and download the files you need from either the right frame (if you are using a version of Netscape that knows about frames) or the new window (if you are using a version of Netscape that doesn’t know about frames). The links amslatex, base, misc, rotating, styles and tools will lead you to documentation of some particularly useful packages that are worth investigating. Back at the TEX home webpage documentation regarding BibTEX can be found by following the link BibTeX A.2 The location of TEX files generally More generally, all the files required in the running of TEX are in directories /usr/local/tex/texmf/tex /usr/local/tex/madtex/tex (The second of these directories contains files that were generated locally . . . madtex is an acronym formed from Maths Department TeX.) The structure of 20 the /usr/local/tex directory follows fairly closely the TDS (TEX Directory Structure). You can read all about this by following, in succession, the links Documentation for Packages (Contents) help tds.dvi from the TEX home webpage. This reads the file /usr/local/tex/texmf/doc/help/tds.dvi Documentation files, generally, are in the directory /usr/local/tex/texmf/doc A.2.1 Where files are that specifically relate to LATEX In particular, files required for the running of LATEX are in directories /usr/local/tex/texmf/tex/latex /usr/local/tex/madtex/tex/latex and LATEX documentation files are in directory /usr/local/tex/texmf/doc/latex The most useful documentation is found under /usr/local/tex/texmf/doc/latex/amslatex /usr/local/tex/texmf/doc/latex/base /usr/local/tex/texmf/doc/latex/misc 21 /usr/local/tex/texmf/doc/latex/rotating /usr/local/tex/texmf/doc/latex/styles /usr/local/tex/texmf/doc/latex/tools /usr/local/tex/texmf/doc/latex/uwa The last of these contains the documentation for local LATEX documentation (typically about files and packages beginning uwa...). A.2.2 Where files are that specifically relate to BibTEX Files relating to BibTEX are found in directories /usr/local/tex/texmf/bibtex /usr/local/tex/madtex/bibtex 22 Bibliography [1] L. Barroca, A style option for rotated objects in LATEX (Version 2.10, Aug. 1995). Filename: rotating.dvi. [2] G. Gamble, The uwamaths package (Version 2.1, Nov. 1997). Filename: uwamaths.dvi. [3] M. Goossens, F. Mittelbach, and A. Samarin, The LATEX companion (Addison-Wesley, 1994). [4] D. E. Knuth, The TEXbook (Addison-Wesley, 1984). Describes TEX in detail. [5] L. Lamport, LATEX – a document preparation system (Addison-Wesley, first ed., 1985). Describes LATEX 2.09. [6] , LATEX – a document preparation system (Addison-Wesley, second ed., 1994). Updated for LATEX 2ε . [7] A. Lingnau, An improved environment for floats (Mar. 1995). Filename: float.dvi. [8] W. Shakespeare, Hamlet (F. S. Crofts & Co., New York, 1946). Act I, Scene 3, Lines 70–72, are apropos. [9] The LATEX3 Project Team, LATEX 2ε for authors (Dec. 1995). Filename: usrguide.dvi. 23
© Copyright 2024