Debian Codegraph @

texmf-dist/source/latex/pittetd/pittetd.dtx

raw
1 % \iffalse meta-comment
2 %
3 % pittetd - University of Pittsburgh ETD (Electronic Theses and Dissertations) LaTeX class
4 % Copyright 2003-4 Federico Garcia ([email protected])
5 % -------------------------------------------
6 %
7 %
8 % This program can be redistributed and/or modified under the terms
9 % of the LaTeX Project Public License distributed from CTAN archives
10 % in the directory macros/latex/base/lppl.txt; either version 1 of
11 % the License, or (at your option) any later version.
12 %
13 %
14 %<*driver>
15 % \fi
16 \ProvidesFile{pittetd.dtx}[2004/08/17 v1.618 Pitt ETD]
17 % \iffalse
18 \documentclass[11pt]{ltxdoc}
19 \usepackage{array}
20 \usepackage{xspace}
21 \usepackage{latexsym}
22 \usepackage[hyperindex=false,colorlinks,bookmarks,dvipdfm,%
23 citecolor=blue,urlcolor=blue,bookmarksnumbered,bookmarksopen]{hyperref}
24 \GetFileInfo{pittetd.dtx}
25 \EnableCrossrefs
26 \title{Electronic Theses and Dissertations\\ at Pitt\\ (a \LaTeXe\ class)}
27 \date{2004/08/17}
28 \author{Federico Garcia \thanks{University of Pittsburgh, Electronic Theses and Dissertations (ETD) Working Group.}}
29 \setcounter{IndexColumns}{2}
30 \IndexPrologue{\section*{Index}\addcontentsline{toc}{section}{Index} Numbers written in italics refer to the page where the corresponding entry is described. A list of mentioned packages is found under `packages mentioned;' of environments under `environments;' of \pittetd options under `options to \pittetd.'}
31 \CodelineIndex
32 %\OnlyDescription
33 \hypersetup{pdftitle=ETD at Pitt (a LaTeX class),%
34 pdfauthor=Federico Garcia}
35 \begin{document}
36 \maketitle
37 \DocInput{\filename}
38 \end{document}
39 %</driver>
40 % \fi
41 %\makeatletter\def\lowBibTeX{{\reset@font\rmfamily B\kern-.05em%
42 % \raise.0ex\hbox{\scshape i\kern-.025em b}\kern-.08em%
43 % T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}
44 %\def\BibTeX{\protect\lowBibTeX}\makeatother
45 %\newcommand\pdf{{\small PDF}\xspace}
46 %\newcommand\PDF{{\small PDF}\xspace}
47 %\newcommand\FG{{\small FG}\index{FG (Format Guidelines)}\xspace}
48 %\newcommand\ETD{{\small ETD}\xspace}
49 %\newcommand\pittetd{\textsf{pittetd}\xspace}
50 %\newcommand\ex{\begingroup\unskip\nobreak\hfil\penalty50\hskip1em\hbox{}\nobreak\hfil\small\textbf{Ex.:\ }}
51 %\newcommand\ample{\parfillskip0pt \par\endgroup}
52 %\newcommand\package[1]{\index{packages mentioned:>#1=\texttt{#1}}\index{#1=\texttt{#1} package}}
53 %\newcommand{\option}[1]{\index{options to \pittetd:>\texttt{#1}}\index{pittetd=\pittetd>options}\index{#1=\texttt{#1} option}}
54 %\DoNotIndex{\',\.,\@M,\@@input,\@Alph,\@alph,\@addtoreset,\@arabic,\@auxout}
55 %\DoNotIndex{\@dblarg,\@dotsep,\@dottedtocline,\@empty,\@firstoftwo,\@float,\@gobble,\@gobbletwo,\@ignoretrue}
56 %\DoNotIndex{\@ifstar,\@ifundefined,\@input,\@ixpt,\@m,\@minus,\@mkboth}
57 %\DoNotIndex{\@ne,\@nil,\@noitemerr,\@nomath,\@plus,\@roman,\@Roman,\@set@topoint}
58 %\DoNotIndex{\@tempboxa,\@tempcnta,\@tempdima,\@tempdimb,\@tempcsa,\@tempswa,\@tempskipa}
59 %\DoNotIndex{\@tempswafalse,\@tempswatrue,\@viipt,\@viiipt,\@vipt}
60 %\DoNotIndex{\@vpt,\@warning,\@xiipt,\@xipt,\@xivpt,\@xpt,\@xviipt}
61 %\DoNotIndex{\@xxpt,\@xxvpt,\\,\ ,\addpenalty,\addtolength,\addvspace}
62 %\DoNotIndex{\advance,\ast,\begin,\begingroup,\bfseries,\bgroup,\box}
63 %\DoNotIndex{\cdot,\centering,\cite,\clearpage,\closeout,\CodelineIndex,\cr,\csname,\day,\DeclareOption}
64 %\DoNotIndex{\def,\DisableCrossrefs,\divide,\DocInput,\documentclass}
65 %\DoNotIndex{\DoNotIndex,\egroup,\ifdim,\else,\fi,\em,\edef,\endcsname,\endinput,\endtrivlist}
66 %\DoNotIndex{\EnableCrossrefs,\end,\end@dblfloat,\end@float,\endgroup}
67 %\DoNotIndex{\endlist,\everycr,\everypar,\ExecuteOptions,\expandafter}
68 %\DoNotIndex{\filedate,\filename,\fileversion,\fontsize,\framebox,\gdef}
69 %\DoNotIndex{\global,\halign,\hangindent,\hbox,\hfil,\hfill,\hrule}
70 %\DoNotIndex{\hsize,\hskip,\hspace,\hss,\immediate,\if@tempswa,\ifcase,\or,\fi,\fi}
71 %\DoNotIndex{\ifhmode,\ifvmode,\ifnum,\iftrue,\ifx,\fi,\fi,\fi,\fi,\fi}
72 %\DoNotIndex{\input}
73 %\DoNotIndex{\kern,\leavevmode,\let,\leftmark}
74 %\DoNotIndex{\list,\llap,\long,\m@ne,\m@th,\mark,\markboth,\markright}
75 %\DoNotIndex{\mbox,\month,\newcommand,\newcounter,\newenvironment}
76 %\DoNotIndex{\NeedsTeXFormat,\newdimen}
77 %\DoNotIndex{\newlength,\newpage,\nobreak,\noexpand,\noindent,\normalfont,\null,\number}
78 %\DoNotIndex{\numberline,\OldMakeindex,\OnlyDescription,\openout,\p@}
79 %\DoNotIndex{\par,\paragraphmark,\parfillskip}
80 %\DoNotIndex{\penalty,\PrintChanges,\PrintIndex,\ProcessOptions}
81 %\DoNotIndex{\protect,\ProvidesClass,\raggedbottom,\raggedright}
82 %\DoNotIndex{\refstepcounter,\relax,\renewcommand}
83 %\DoNotIndex{\rightmargin,\rightmark,\rightskip,\rlap}
84 %\DoNotIndex{\secdef,\selectfont,\setbox,\setcounter,\setlength}
85 %\DoNotIndex{\settowidth,\sfcode,\skip,\sloppy,\slshape,\space}
86 %\DoNotIndex{\string,\symbol,\the,\trivlist,\typeout,\tw@,\undefined}
87 %\DoNotIndex{\usecounter,\usefont,\vfil,\vfill,\viiipt}
88 %\DoNotIndex{\viipt,\vipt,\vskip,\vspace}
89 %\DoNotIndex{\wd,\xiipt,\year,\z@}
90 %\DoNotIndex{\appendices,\diplomaone,\diplomatwo,\diplomathree,\diplomafour,\degreeabr,\degrees}
91 %\DoNotIndex{\dissauthor,\dissdate,\disstitle,\disstitlepage,\dissyear,\doctype}
92 %\DoNotIndex{\advisorname,\university,\proposal,\advisor,\chairpersonname,\authortitle,\chair}
93 %\DoNotIndex{\committeeone,\committeetwo,\committeethree,\committeefour,\committeefive,\committeesix}
94 %{\catcode`\|=12\gdef\options#1#2{\index{options to \pittetd:>\texttt{#1}|#2}\index{pittetd=\pittetd>options}\index{#1=\texttt{#1} option|#2}}}
95 %\tableofcontents
96 %\parskip4pt plus .2 ex minus .2ex
97 %{\small\begin{description}
98 %\item[Pitt \ETD\ Webpage:] \url{http://www.pitt.edu/~graduate/etd/}\index{Pitt ETD>webpage}
99 %\item[\pittetd's Webpage:]\mbox{}\\ \url{http://www.pitt.edu/~graduate/etd/latextemplate.html/}\index{pittetd=\textsf {pittetd}\xspace >webpage}
100 %\item[\TeX\ Users Group:] \url{http://www.tug.org/} (with a link to {\small CTAN})\index{CTAN (Comprehensive \TeX\ Archive Network)}
101 %\end{description}}
102 %\section{Introduction}
103 %
104 %This is the guide to the \pittetd \LaTeXe\ document class, designed for the preparation of electronic theses and dissertations (\ETD) at the University of Pittsburgh. It is recommended that users read this entire documentation before starting using \pittetd, so that they will have an idea of the different possibilities and options, some of which are particular to \pittetd and therefore not usual in standard \LaTeX\ classes\index{standard classes}\index{classes>standard}.
105 %
106 %Users will find below a description of \pittetd usage, extended with an introduction to some of the most relevant features of the |hyperref| package. In addition, when this document has been produced by running \LaTeX\ on the file |pittetd.dtx|, it also contains a commented transcript of the code, so that users can modify things if they need to (and know what they are doing). In the version downloadable from the Pitt~\ETD webpage, this latter part is omitted. A separate document, \emph{Comments on using \LaTeX\ for theses}, also prepared for Pitt~\ETD authors, describes some standard tools of \LaTeX\ that may or may not be known to the reader but can certainly prove useful when writing the thesis or dissertation. Touched upon are topics such as inclusion of graphics and the handling of large, book-length documents \cite{comments}.
107 %
108 %Throughout this text reference is made to the \emph{Format Guidelines for Electronic Thesis and Dissertation Preparation at the University of Pittsburgh}, downloadable from the Pitt~\ETD webpage. The abbreviation \FG is used to refer to it; page numbers are indicated in parenthesis.\index{FG (Format Guidelines)}
109 %
110 %Section~\ref{pdf} describes the creation of interactive \PDF files through \LaTeX, introducing the two main tools for that effect, the programs {\PDF}\LaTeX\ and \textsf{dvipdfm}. Section~\ref{installation} explains how to install \pittetd and the main \LaTeX\ packages needed for its proper working. Also, cursory information for the installation of {\PDF}\LaTeX\ and \textsf{dvipdfm} is given.
111 %
112 %In section~\ref{mind} some general considerations are given about the best ways to use \pittetd (and to cope with its restrictions). Use of packages and the issues it might bring about (notably incompatibility)is treated in a special subsection.
113 %
114 %Detailed information about the options, available commands, and use of \pittetd can be found in section~\ref{usage}. Typesetting of the preliminary pages is described in subsection~\ref{prelim}.
115 %
116 %Section~\ref{hyperref} describes in an introductory way the basic features of |hyperref|\package{hyperref}, the package that implements interactivity into \LaTeX\ documents.
117 %
118 %Finally, section~\ref{checklist} gives some suggestions for a final format review before submitting an {\small ETD} written with \pittetd. It warns about those problems that are most likely to occur because they lie beyond \pittetd's control.
119 %
120 %\section[\PDF creation through \LaTeX]{{\large PDF} creation through \LaTeX}\label{pdf}\index{PDF>creation}
121 %
122 %In principle, \pittetd is equipped to fulfill the basic interactivity requirements of the \FG, namely the creation of bookmarks\index{bookmarks} from the entries in the Table of Contents, the List of Figures, and the List of Tables, and the implementation of these entries themselves as links\index{links} to the corresponding page. This is done by means of invoking the formidable |hyperref|\package{hyperref} package,\footnote{Written by Sebastian Rahtz.} which offers the basic functions for interactive handling (section~\ref{hyperref} below offers an introductory guide to other features from this package that users can take advantage of). Thus, |hyperref| has to be---and it usually is in standard distributions of \LaTeX---installed in the system for \pittetd to be able to fulfill these tasks (section~\ref{installation} offers immediate help on the installation of |hyperref| and other tools, including \pittetd itself).
123 %
124 %\pittetd has been written under the assumption that the user will create the final |.pdf| file through one of two tools, namely {\PDF}\LaTeX\index{PDF\LaTeX}, or the program \textsf{dvipdfm}\option{dvipdfm}. The user indicates which of the two ways is to be used as an option\option{pdftex}\option{dvipdfm} to the \pittetd class, namely |pdftex| or |dvipdfm| (on the way to load the class and specify options, see section~\ref{loading}). The following sections explain the particularities of each way. A third related option, |nohyperref|\option{nohyperref} option, will be discussed in section~\ref{nohyper}. Note that it is possible to switch back and forth between the three ways just by modifying the relevant option; as far as \pittetd is concerned, nothing else is necessary to effect the change.\footnote{However, when going to/from \texttt{nohyperref}, it is always good to delete any auxiliary files\index{auxiliary files} before running. Also, some of the \texttt{hyperref} package's commands discussed in section~\ref{hyperref} are of course disabled when \texttt{nohyperref} is used.}
125 %
126 %\subsection[{\PDF}\LaTeX]{{\normalsize PDF}\LaTeX}\index{PDF\LaTeX|(textit}
127 %
128 %The most direct way to obtain a |.pdf| output file is running {\PDF}\LaTeX\footnote{Created by H\`an Th\'e Th\`an.}\ instead of \LaTeX. Naturally, {\PDF}\LaTeX\ has to be installed in the system (again, it is usually included in standard distributions of \LaTeX; see section~\ref{installation}). The user has to indicate |pdftex|\options{pdftex}{textit} as an option to \pittetd, and this latter will pass that option to other packages that need it, including |hyperref|\package{hyperref} but also |graphicx|\package{graphicx} and |color|\package{color} (this latter used by |hyperref|).
129 %
130 %Note that if this is the chosen method, a regular \LaTeX\ (i.e., not {\PDF}\LaTeX) run will result in an error message\index{error messages} (`\texttt{Why not use pdf(e)TeX binaries?}'). This could affect user's habits, batch files, etc.
131 %
132 %There is one more significant drawback to the use of {\PDF}\LaTeX: the running time is sometimes clearly longer than regular \LaTeX. This depends, to be sure, on one of the configuration options of {\PDF}\TeX, namely |\pdfcompresslevel|, and it could be modified. But in that case, the resulting file is incomparably larger.\footnote{In general, a |.pdf|\index{PDF>files} is much larger---much less efficient in all respects---than the |.dvi|\index{DVI>files}. This tendency is reinforced if {\scriptsize PDF}\LaTeX\ is configured to run faster.}\index{PDF\LaTeX|)}
133 %
134 %\subsection{\textsf{dvipdfm}}\label{dvipdf}\index{dvipdfm=\textsf{dvipdfm}|(textit}
135 %
136 %As the name indicates, \textsf{dvipdfm}\footnote{Written by Mark A. Wicks.} is one of the programs available to convert |.dvi|\index{DVI>files} files into |.pdf|\index{PDF>files}. The procedure then consists in running \LaTeX\ as usual while the document is in preparation, having loaded \pittetd with |dvipdfm| option\options{dvipdfm}{textit}, thus obtaining (more quickly) the usual (and smaller)|.dvi| output. Only optionally, at strategic points in the development of the document (notably at the end), has the user to worry about \PDF, and apply \textsf{dvipdfm} to the |.dvi| file. This is usually as simple as typing
137 %
138 %|dvipdfm doc.dvi|
139 %
140 %\noindent in the command line. The file |dvipdfm.pdf| is the user's manual for the program and explains the switches that can be used in the command line.
141 %
142 %In some |.dvi| viewers\index{DVI>viewers} the bookmarks\index{bookmarks} (and even the links\index{links}) are lost. But the relevant information is recovered by \textsf{dvipdfm} when creating the corresponding |.pdf| file.
143 %
144 %Another significative advantage of \textsf{dvipdfm} is that it tries to solve inclusion of PostScript graphic files, so it is not always necessary to convert them (see also \cite{comments}). To do the job, however, \textsf{dvipdfm} uses \textsf{GhostScript}, and therefore this program must also be installed in the system.\index{dvipdfm=\textsf{dvipdfm}|)}\index{dvipdfm o=\texttt{dvipdfm} option|)}
145 %
146 %\subsection[Other ways to get a \PDF file and bookmarks]{Other ways to get a {\normalsize PDF} file and bookmarks}\index{PDF>files}\index{bookmarks}
147 %
148 %There are other ways to obtain a final \PDF output file, but they are all discouraged to use alongside with \pittetd. For example, a common method is to use |dvips|\index{dvips=\texttt{dvips}} to convert a file to the PostScript\index{PostScript>format} format, and then apply Acrobat~Distiller\index{Acrobat Reader} on it. This method involves two conversions; links and especially bookmarks\index{bookmarks} tend to have an erratic behavior.
149 %
150 %Acrobat~\PDF~Writer\index{Acrobat PDF Writer}, a `printer emulator' that `prints' \PDF files\index{PDF>files} will, of course, ignore anything that cannot be printed, including bookmarks\index{bookmarks}. And the other |.dvi|$\leadsto$|.pdf| converter in existence, |dvipdf|\index{dvipdf=\texttt{dvipdf}},\footnote{By Sergey Lesenko.} is not as widely available as \textsf{dvipdfm}\index{dvipdfm=\textsf{dvipdfm}}.
151 %
152 %On the other hand, |hyperref|\package{hyperref} is not the only way to create bookmarks\index{bookmarks} with \LaTeX. Older packages and systems exist, like V\TeX\index{V\TeX}, but since those are much less widely used, \pittetd does not support them.
153 %
154 %\subsection{No hyperref}\label{nohyper}\options{nohyperref}{(textit}
155 %
156 %There is a third option concerning the creation of bookmarks and links in \pittetd. Option |nohyperref| will prevent \pittetd from taking care of almost all interactivity requirements, and the user is left the freedom (and the burden) to fulfill them by him- or herself.
157 %
158 %This option might be more useful than it seems, because it allows users to use the |hyperref|\package{hyperref} package itself \emph{their way}, not \pittetd's. There are in the latter's code a series of minor, but substantial, modifications to |hyperref|, and some of the options with which the package is loaded are fixed. As a security measure, \pittetd will not allow the user manually to load the package, unless |nohyperref| is specified. Thus, if a user wants to control |hyperref|'s behavior, this option will be necessary. Section~\ref{diffhyperref} gives some directions on how to do this.
159 %
160 %Also, if \pittetd cannot run normally due to some complication in installation or configuration of |hyperref|, the |nohyperref| option provides a way to keep working on the contents of the document and worry about requirements later.\options{nohyperref}{)}
161 %
162 %\section{Installation}\label{installation}
163 %
164 %\subsection{\pittetd}\index{installation>\pittetd|(textit}
165 %
166 %The \pittetd bundle is made of the following files:
167 %
168 %\begin{tabular}{>\ttfamily ll}
169 %pittetd.dtx & Source for the class and this documentation.\\
170 %pittetd.ins & Batch file for installation.\\[2mm]
171 %pittetd.cls & The \pittetd class itself.\\
172 %pit10pt.clo & Definitions for 10pt-size option.\index{options to \textsf {pittetd}\xspace :>\texttt{10pt}}\index{pittetd=\textsf {pittetd}\xspace >options}\index{10=\texttt{10pt} option} \\
173 %pit11pt.clo & Definitions for 11pt-size option.\index{options to \textsf {pittetd}\xspace :>\texttt{11pt}}\index{pittetd=\textsf {pittetd}\xspace >options}\index{11=\texttt{11pt} option}\\
174 %pit12pt.clo & Definitions for 12pt-size option.\index{options to \textsf {pittetd}\xspace :>\texttt{12pt}}\index{pittetd=\textsf {pittetd}\xspace >options}\index{12=\texttt{12pt} option}\\[2mm]
175 %pitthesis.pit & Patch for \textsf{pitthesis} class\index{pitthesis=\textsf{pitthesis} class}\index{pitthesis=\textsf{pitthesis} class>patch for}\index{classes>related to \textsf {pittetd}\xspace }\\
176 %pittdiss.pit & Patch for \textsf{pittdiss} class\index{pittdiss=\textsf{pittdiss} class}\index{pittdiss=\textsf{pittdiss} class>patch for}\index{classes>related to \textsf {pittetd}\xspace }\\
177 %achicago.pit & Patch for |achicago| package\package{achicago}\index{achicago=\texttt {achicago} package>patch for} \\[2mm]
178 %pittetd.dvi & This documentation\\
179 %pittetd.pdf \\
180 %\end{tabular}
181 %
182 %\smallskip
183 %\noindent All these files are individually downloadable from \pittetd's webpage. It is only the two first files, however, that are necessary, for the rest can be extracted from them. To do this, the file |pittetd.ins| has to be processed with \TeX\ (\emph{not} \LaTeX); the documentation results from running \LaTeX\ (\emph{not} \TeX) on |pittetd.dtx|.\footnote{To get the index right, you have to run \texttt{makeindex} with \texttt{gind} style, saying, in the command line (and after a \LaTeX\ run on \texttt{pittetd.dtx}), \texttt{makeindex -s gind.ist pittetd}. Then a final \texttt{latex pittetd.dtx} produces the document with a well-formatted index.}
184 %
185 %It is the |.cls| and |.clo| files that conform the class itself, i.e., what \LaTeX\ needs to have access to. Under a system that, like most \TeX\ implementations today, use the standard \TeX~Directory~Structure ({\small TDS})\index{TDS}, \LaTeX\ files are put in subdirectories of the |.../texmf/tex/latex| directory (for example, the standard classes are in |.../texmf/tex/latex/base|). So the best thing under such a system is to create a subdirectory for \pittetd:
186 %
187 %|.../texmf/tex/latex/pittetd|
188 %
189 %\noindent and place there the |.cls| and |.clo| files. Likewise, the documentation (the file you are reading, |pittetd.dvi|) should be placed in
190 %
191 %|.../texmf/doc/latex/pittetd|
192 %
193 %\noindent and the source files (|pittetd.dtx| and |pittetd.ins|) in
194 %
195 %|.../texmf/source/latex/pittetd|
196 %
197 %The `patches'\index{patches} should be placed in the same directory as the actual document's input files\index{input files}.
198 %
199 %\noindent After placing the files in those directories, you might need to `refresh' the database, i.e., to make \TeX\ aware that a new class is loaded. This usually appears as a command (or button, or window, etc.) of the implementation.\footnote{With \textsc{MiKTeX}\index{MiKTeX}, for example, you should run the program `MiKTeX Options.'}
200 %
201 %\smallskip
202 %\noindent For non-{\small TDS} systems, the suggestion is `put the files where \TeX\ can find them.' For example, search your disk for the standard classes (e.g., |article.cls|), and put the \pittetd files where they are. Alternatively, you can simply put the \pittetd files in the directory that contains the input files of your document.\index{input files}\index{installation>\pittetd|)}
203 %
204 %\subsection{Installation of other required packages}\index{installation>\texttt{hyperref}|(textit}%
205 %\index{installation>\texttt{color}|(textit}
206 %
207 %In addition, you will need at least the |hyperref|\package{hyperref} and |color|\package{color} packages, and {\PDF}\TeX\index{PDF\TeX}\index{PDF\LaTeX} if you use |pdftex| option\option{pdftex}. Most likely, you already have those packages installed. Even so, it is possible that you do not have the file |pdftex.def|\index{pdftex.def=\texttt{pdftex.def} file}, which is part of only relatively recent distributions. This file, available from the \pittetd's webpage\index{pittetd=\textsf {pittetd}\xspace >webpage}, should be copied to the same directory where the file |color.sty| is (|.../texmf/tex/latex/graphics| in a {\small TDS}\index{TDS} system).
208 %
209 %|hyperref|\package{hyperref} is a package used by \pittetd (unless, of course, the |nohyperref|\option{nohyperref} option is used), so it has to be in the system. In the very unlikely case it is not already installed, you will need to download it from either {\small CTAN} (through \url{http://www.tug.org})\index{CTAN (Comprehensive \TeX\ Archive Network)} or the \pittetd's webpage\index{pittetd=\textsf {pittetd}\xspace >webpage}, and install it by running \TeX\ (\emph{not} \LaTeX) on the file |hyperref.ins|. This will extract the files and instruct you on where to place them (which, in any case, is analogous to the placement of \pittetd files).
210 %
211 %Likewise, |hyperref| uses other packages from the standard distribution of \LaTeX\ (notably, |color|\package{color}). Installation of those packages is analogous.\index{installation>\texttt{hyperref}|)}%
212 %\index{installation>\texttt{color}|)}
213 %
214 %\subsection[{\PDF}\TeX, \textsf{dvipdfm}]{{\large PDF}\TeX, \textsf{dvipdfm}}\index{installation>\textsf{dvipdfm}|(textit}\index{installation>PDF\TeX|(textit}
215 %
216 %Installation of {\PDF}\TeX\ and \textsf{dvipdfm} is a more complex matter. Again, several implementations, including \TeX Live, \textsc{MiKTeX}, \textsc{te}\TeX, \textsc{fp}\TeX, and \textsc{CMac}\TeX, have both tools pre-installed. In case your system does not have either or both of them, you can download the relevant files, and obtain installation directions, at {\small CTAN} (through \url{www.tug.org})\index{CTAN (Comprehensive \TeX\ Archive Network)}. The {\PDF}\TeX\ manual, file |pdftex-s.pdf|, is available from the \pittetd's webpage\index{pittetd=\textsf {pittetd}\xspace >webpage}, and contains information on the installation of the program.\index{installation>\textsf{dvipdfm}|)}\index{installation>PDF\TeX|)}
217 %
218 %\section{To keep in mind}\label{mind}
219 %
220 %The \pittetd class has been designed to fully comply with the format guidelines for Pitt~\ETD{s}\index{FG (Format Guidelines)}\index{Pitt ETD>format guidelines}. Due to this, there are some particularities that might create conflict with \LaTeX\ users' habits. This section warns and advises about those particularities. Decisions have been made with two priorities: to discourage uses that go against the \FG, and to facilitate conversion from standard \LaTeX\ classes\index{classes>standard}.
221 %
222 %\subsection{Headings and captions}\index{headings}\index{captions}\index{titles}
223 %
224 %\pittetd will automatically capitalize\index{capitalization of titles} the title\index{title} of the document and those of the chapters\index{chapters>titles}. However, section titles\index{sections>titles} have to be capitalized by the user.\footnote{This is because modification of the \cs{section} command in order to capitalize not only the title itself, but also the bookmark, although possible, would highly increase the probability of incompatibilities with other packages.}
225 %
226 %On the other hand, since both sectional headings and captions for tables\index{tables>captions} and figures\index{figures>captions} must have entries in the bookmarks\index{bookmarks>limitations} panel, they are subject to two substantial limitations: they cannot be long, and must consist only of {\small ASCII}\index{ASCII} characters.\footnote{That is why the {\scriptsize FG}\index{FG (Format Guidelines)} recommend using words (not formulas\index{formulas}) in titles and keeping captions\index{captions} ``to one line if possible''~(p.~9).}
227 %
228 %When building the bookmarks\index{bookmarks}, |hyperref|\package{hyperref} will convert some simple \LaTeX\ commands, but in general will ignore most of them. It also will crop everything that goes beyond the maximum length of a bookmark (that varies among \PDF\index{PDF>viewers} viewers; Acrobat~Reader\index{Acrobat Reader} makes it 64 characters). There are two tools to handle these limitations in \LaTeX: the |hyperref| command |\texorpdfstring|\index{texorpdfstring=\verb!*+\texorpdfstring+} (section~\ref{texorpdf}), and the optional argument to |\caption|\index{caption=\verb!*+\caption+} (section~\ref{optional}).
229 %
230 %\subsection{Preliminaries}\label{w:prel}\index{preliminaries}
231 %
232 %The series of preliminaries in a Pitt~\ETD differs substantially from a paper-based thesis/dissertation\index{paper-based theses/ dissertations}. The committee page\index{committee page} has changed, and dedication\index{dedication} and acknowledgements\index{acknowledgements} pages have been eliminated (under the assumption and recommendation that these should be part of the preface\index{preface}). The order was modified accordingly (so that the preface goes immediately before the text of the thesis itself).
233 %
234 %Thus, the preliminaries are in principle limited to the following:
235 %
236 %\begin{quote}\noindent Title page\index{title page}\newline
237 %Committee Membership page\index{committee page}\newline
238 %Copyright page (optional)\index{copyright page}\newline
239 %Abstract\index{abstract}\newline
240 %Table of contents\index{table of contents}\newline
241 %List of Tables\index{list of tables}\newline
242 %List of Figures\index{list of figures}\newline
243 %Preface (optional)\index{preface}\newline
244 %\end{quote}
245 %\noindent Since all these preliminaries\index{preliminaries} have their own commands in \pittetd (see section~\ref{prelim}), there is in principle no need nor place for non-numbered chapters\index{non-numbered chapters} (|\chapter*|\index{chapter*=\verb!*+\chapter*+} commands). In fact, the starred version\index{starred commands:>\verb!*+\chapter*+} behaves exactly as the regular one. If there is a need for additional preliminary pages, the (on purpose) cumbersome command |\preliminarychapter| is available (see section~\ref{addprel}).
246 %
247 %\subsection{Use of packages}\label{packages}\index{packages>use of|(}
248 %
249 %Almost certainly authors of Pitt~\ETD's will need to load a wide and unpredictable variety of packages. Although \pittetd has been coded with the premise not to `invite' incompatibilities\index{incompatibility|(}, it is possible that some of these packages will create clashes, for there is simply no way to claim universal compatibility with the hundreds of packages already available and with those to come.
250 %
251 %However, \emph{partial} compatibility can be (and supposedly has been) achieved. A survey carried out in April--May~2003 gave us a list of packages that are of common use in the Pitt community, and those have been taken into account in the writing of \pittetd.
252 %
253 %For the handling of possible incompatibilities arising in the future, the following policy has been designed. The user who suspects he or she has found a clash should contact the Pitt~\ETD Working Group\index{Pitt ETD>Working Group} and explain the problem, ideally e-mailing a copy of the input file(s)\index{input files}. Hopefully in a reasonable amount of time, a `patch'\index{patches} will be created that solves the problem. The patch takes the form of a file with extension |.pit|, downloadable from \pittetd's webpage\index{pittetd=\textsf {pittetd}\xspace >webpage}.
254 %
255 %After the file has been downloaded and put where \LaTeX\ can find it (the easiest way is to put it in the same folder as the document itself), it should be accessed. \index{patches|(}\DescribeMacro{\patch}The command |\patch|, that takes the name of the package as its argument, reads any patch that exists for it. For example, there is already a patch for the |achicago| package\package{achicago}; to ensure the proper behavior of this package, the user should type, \emph{after} |\usepackage{achicago}|\index{usepackage=\verb!*+\usepackage+}, the command |\patch{achicago}|.
256 %
257 %Alternatively, the command |\usepackage|\index{usepackage=\verb!*+\usepackage+} can itself be replaced by \DescribeMacro{\usewithpatch}|\usewithpatch|. When a package is invoked by means of |\usewithpatch|, \pittetd will search the system for the corresponding patch; if it exists, it loads it; if not, nothing happens. Options to the package, as usual, are indicated by the optional argument |[|\meta{options}|]|. The drawback of this mechanism is that several packages \emph{cannot} be loaded at once (i.e., by comma-separating them, as in |\usepackage{color,graphicx}|)\index{usepackage=\verb!*+\usepackage+}; each must receive its own |\usewithpatch|. But using |\usewithpatch| ensures that \pittetd will always look for a patch when loading a package.\index{incompatibility|)}\index{patches|)}
258 %
259 %The following paragraphs mention some \LaTeX\ packages and tell whether they are supported or not by \pittetd. For information on compatibility with the bibliographical styles\index{bibliography>\BibTeX\ styles} and packages\index{bibliography>packages}, see section~\ref{bibliography}.
260 %
261 %\subsubsection{Unsupported packages}\index{packages>unsupported}
262 %
263 %Many popular \LaTeX\ packages provide formatting features that either go against the \FG\index{FG (Format Guidelines)} or are already incorporated into \pittetd. Therefore, it is assumed that such packages will \emph{not} be loaded. These include |setspace|\package{setspace}, packages for the handling of floating objects (such as |float|\package{float}, |floatflt|\package{floatflt}), for variations of layout (|fancyhdr|\package{fancyhdr}, |fncychap|\package{fncychap}, |multicol|\package{multicol}), and sectioning (|titlesec|\package{titlesec}, |tocbibind|\package{tocbibind}). Using any of those packages might result in error messages\index{error messages}, anomalies, and unpredictable output. Before reporting or trying to solve these problems, keep in mind that departmental approval is needed to include the features.
264 %
265 %\subsubsection{Supported packages}\index{packages>supported}
266 %
267 %Some packages provide features that are legitimate in a Pitt~\ETD. Font packages\index{fonts>packages}\index{packages>fonts}, such as those in the {\small PSNFSS}\index{PSNFSS collection}\index{PostScript>fonts}\index{fonts>PostScript} collection (|times|, |bookman|, |palatino|, |newcent|, etc.) are perfectly compatible with \pittetd. In fact, if {\small CM}\index{CM fonts} fonts are desired, it is recommendable that the |ae|\package{ae} package is loaded.\footnote{The {\small AE}\index{AE fonts} fonts emulate {\small CM}\index{CM fonts}, but are PostScript\index{PostScript>fonts}, not bitmap, fonts, which gives them a better quality for screen display.}
268 %
269 %The packages of the American~Mathematical~Society\index{AMS packages} (|amsmath|\package{amsmath}, |amsthm|\package{amsthm}, etc.) are supported. Likewise, all the packages in the standard\index{packages>standard} distribution of \LaTeX\ (|color|\package{color}, |graphicx|\package{graphicx}, |xspace|\package{xspace}, |verbatim|\package{verbatim}, etc.) are supposed to work. |caption2|\package{caption2} works miraculously fine. In general, packages that \emph{provide}, as opposed to \emph{override}, features, should work fine.\index{packages>use of|)}
270 %
271 %\subsection{Related classes}\label{pitt}\index{classes>related to \pittetd|(textit}
272 %
273 %Currently there are two \LaTeX\ classes that produce theses and dissertations for Pitt, namely \textsf{pitthesis}\index{pitthesis=\textsf{pitthesis} class} (by Wonkoo~Kim, 1999) and \textsf{pittdiss}\index{pittdiss=\textsf{pittdiss} class} (by Will~Slaughter, 2003). The former was designed for paper-based documents, following requirements somewhat different from those of an \ETD; the latter, on the contrary, was created with \ETD in mind.\footnote{It does not produce links or bookmarks, however.} Many features are shared by those classes and \pittetd---notably the creation of preliminaries\index{preliminaries}---but the detailed mechanisms (command names and things like that) are different. This release of \pittetd includes two `patch'\index{patches} files that allow using \pittetd with conventions from the other two classes, so that the user does not have to change every command (some will require handling, though; \pittetd will warn or complain).\index{warnings}
274 %
275 %The patches are called through either
276 %
277 %|\patch{pittdiss}|\index{pittdiss=\textsf{pittdiss} class>patch for|textit}
278 %
279 %\noindent or
280 %
281 %|\patch{pitthesis}|\index{pitthesis=\textsf{pitthesis} class>patch for|textit}
282 %
283 %\noindent (the latter only two t's.) Having read the corresponding patch, \pittetd will try to interpret \textsf{pittdiss}- or \textsf{pitthesis}-commands. Hopefully, most times it will succeed; in any case, it will issue warnings\index{warnings} (or error messages\index{error messages>\pittetd's} in the |final|\option{final} option) for things that \emph{have} to be changed. For example, if acknowledgements\index{acknowledgements} are created with \textsf{pitthesis}'s |acknowledgements| environment, \pittetd will warn that now there is no separate preliminary for that, and that this section should be part of the preface.\index{preface}
284 %
285 %As an extra safety measure when going from \textsf{pitthesis}\index{pitthesis=\textsf{pitthesis} class} or \textsf{pittdiss}\index{pittdiss=\textsf{pittdiss} class} to \pittetd, all auxiliary files\index{auxiliary files} should be deleted before the first \pittetd run. Also, it is very much recommendable to change |\bibliography|\index{bibliography=\verb!*+\bibliography+} to |\safebibliography|\index{safebibliography=\verb!*+\safebibliography+} since the beginning.\index{patches}\index{classes>related to \pittetd|)}
286 %
287 %\subsection{Stage and interaction}\label{stage}\index{stage|(textit}\index{warnings|(}\index{error messages>\pittetd's|(}
288 %
289 %In order to facilitate the process of converting files from standard classes\index{classes>standard} into \pittetd, annoying error messages due to the particularities of \pittetd have been avoided as much as possible. The `stage' of the document is used to decide whether or not the differences should make stop the \LaTeX\ run. The idea is that when the |draft| option\options{draft}{(textit} is used, most problems are reported as `Class~Warnings' that do not stop the process. But if |final|\options{final}{(textit} is used (and eventually it \emph{should} be used), more prominent error messages appear instead.
290 %
291 %However, many packages (including the seminal |hyperref|\package{hyperref}, |color|\package{color}, and |graphicx|\package{graphicx}) themselves operate differently when |draft| is specified. So for example, |hyperref| does not create links\index{links} or bookmarks\index{bookmarks}, and |graphicx| does not import external graphic\index{graphics>inclusion of} files. But the user might want to see these features, still not worrying about detailed \pittetd concerns. That is why an intermediate stage |semifinal|\options{semifinal}{(textit} is introduced. The packages will work as usual, but \pittetd will issue mostly warnings, not error messages. This is the default option.
292 %
293 %Both |semifinal| and |draft| issue a final warning at the end of the job, reminding the user to run the document with |final|. \index{stage|)}\index{warnings|)}\index{error messages>\texttt{pittetd}'s|)} As usual, moreover, |draft| makes overfull boxes visible.
294 %
295 %The `stage' option also governs \pittetd's complaints about the preliminaries when information for the different pages is missing, when the order is wrong, etc.: with |draft| and |semifinal|, there will be a warning, while with |final| there will be an error message.\options{draft}{)}\options{final}{)}\options{semifinal}{)}
296 %
297 %\subsection{Auxiliary files}\index{auxiliary files}
298 %
299 %In addition to the regular auxiliary files (|.aux|, |.toc|, |.lot|, |.lof|, etc.), a run of \pittetd involving all its features will produce two files: one with extension |.out| (written by |hyperref|\package{hyperref} for the `outlines,' or bookmarks\index{bookmarks}), and one with extension |.etd|, used by \pittetd to decide some details. Input or other files created by the user should avoid these extensions. Also, for some implementations of \LaTeX\ that provide a quick erasing of auxiliary files, it is advisable to configure this tool to include |.out| and |.etd| files.
300 %
301 %\subsection[{\small PDF} Document Info]{{\normalsize PDF} Document Info}\index{PDF>Document Info}\index{Document Info}
302 %
303 %\pittetd offers the possibility of filling in the fields of Acrobat~Reader's\index{Acrobat Reader} `Document Info' dialog box. `Title' and `Author' are filled in with the data of the title page\index{title page}. `Subject' and `Keywords' are handled by additional commands (see section~\ref{pdfinfo}).
304 %
305 %\section{Using \pittetd}\label{usage}
306 %\subsection{Loading the class}\index{pittetd=\textsf {pittetd}\xspace >loading|(}\label{loading}
307 %
308 %The \pittetd class is loaded by typing\\
309 %\null\quad|\documentclass[|\meta{options}|]{pittetd}|\index{documentclass=\verb!*+\documentclass+}\\
310 %at the very top of the input file.\index{input files} Table~\ref{options} shows all the \meta{options} available.\index{pittetd=\textsf {pittetd}\xspace >options} Most of the options for conventional classes (i.e., the standard classes \textsf{article}, \textsf{book}, \textsf{report}, and similar ones like \textsf{amsart} and \textsf{amsbook}) have been disabled in \textsf{pittetd}. The document will always be typeset letter paper ($8.5\times 11$ inches), portrait, and one column.\footnote{Thus, options to modify these parameters, namely those for $a)$~paper size (\texttt{letterpaper}, \texttt{legalpaper}, etc.); $b)$~paper orientation (\texttt{portrait}, \texttt{landscape}); $c)$~number of columns (\texttt{onecolumn}, \texttt{twocolumn}); and $d)$~pagination (\texttt{oneside}, \texttt{twoside}; \texttt{openright}, \texttt{openany}; \texttt{titlepage}, \texttt{notitlepage}), are not implemented.}
311 %
312 %\begin{table}[h]\centering
313 %\begin{tabular}{|m{3.5cm}|m{7cm}|}\hline
314 %\textsf{Characteristic}&\textsf{Available Options}\\\hline\hline
315 %Font size&|12pt| (default) \newline|11pt|\newline|10pt|\\\hline\index{10=\texttt{10pt} option}\index{options to \textsf {pittetd}\xspace :>\texttt{10pt}}\index{pittetd=\textsf {pittetd}\xspace >options}\index{10=\texttt{10pt} option}\index{options to \textsf {pittetd}\xspace :>\texttt{11pt}}\index{pittetd=\textsf {pittetd}\xspace >options}\index{11=\texttt{11pt} option}\index{options to \textsf {pittetd}\xspace :>\texttt{12pt}}\index{pittetd=\textsf {pittetd}\xspace >options}\index{12=\texttt{12pt} option}%Stage\newline (see section~\ref{stage})&|final|\newline|semifinal| (default)\newline|draft|\\\hline\option{draft}\option{final}\option{semifinal}
316 %Bibliography\newline layout&|openbib| (`open' bibliographies).\\\hline\option{openbib}
317 %Equations&|leqno| (equation numbers on the left)\newline |fleqn| (flush-left displays)\\\hline\hline\option{fleqn}\option{leqno}
318 %Type & |phd| (dissertation, default)\newline|ms| (M.S.'s thesis)\newline |ma| (M.A.'s thesis)\\\hline\option{ma}\option{ms}\option{phd}
319 %Section numbering\newline (see section~\ref{numbers}) & |sectionnumbers| (default)\newline|sectionletters|\\\hline\hline\option{sectionletters}\option{sectionnumbers}
320 %\PDF production\newline(see section~\ref{pdf}) &|dvipdfm| \newline|pdftex|\option{pdftex}\option{dvipdfm}\option{nohyperref} \newline|nohyperref|\\\hline
321 %\end{tabular}
322 %\caption{Available options for \pittetd}\label{options}
323 %\end{table}\index{pittetd=\textsf {pittetd}\xspace >loading|)}
324 %
325 %\subsection{Font sizes and spacing}\index{fonts>size}\index{spacing|(textit}
326 %
327 %\DescribeMacro{\Small}\DescribeMacro{\SMALL}The usual \LaTeX\ commands are defined according to the font size option selected. In addition, the |\Small| and |\SMALL| commands work as in the classes \textsf{amsart}\index{amsart=\textsf{amsart} class} and \textsf{amsbook}\index{amsbook=\textsf{amsbook} class}, i.e., are equivalent to |\footnotesize| and |\scriptsize| respectively. See figure~\ref{size}.
328 %
329 %The text of a Pitt~\ETD has to be at least ``one half-spaced, with the exception of long quotations\index{quotations}, footnotes\index{footnotes}, bibliographical references\index{bibliography}, and the Index (if included)\index{index}, which may be single-spaced''~(p.~7).\index{FG (Format Guidelines)} A spacing of little more than one-half for regular text has been built in into \pittetd; the text in footnotes and quotations has been set to single spacing. The user can always adjust the spacing in the usual way, |\renewcommand|'ing the command \DescribeMacro{\baselinestretch}|\baselinestretch|\index{baselinestretch=\verb!*+\baselinestretch+}, so that \\
330 %\null\quad|\renewcommand\baselinestretch{1.3}|\\
331 %increases the built-in spacing by a 30\%---for \emph{all} the text, footnotes included.
332 %
333 %The spacing-scheme is achieved in \pittetd by building it into the font sizes. Normal-size font (|\normalsize|) is one-half spaced, while all other sizes are single-spaced. The |quote|\index{environments:>quote=\texttt{quote}}\index{quote=\texttt{quote} (environment)} and |quotation|\index{environments:>quotation=\texttt{quotation}}\index{quotation=\texttt{quotation} (environment)} environments, as well as |\footnote|, all of which set a smaller font, produce thus single-spaced text. \DescribeMacro{\singlespace}An additional `size' has been implemented, namely |\singlespace|, which produces regular-size, but single-spaced, text.
334 %
335 %\DescribeMacro{\smallskip}\DescribeMacro{\medskip}\DescribeMacro{\bigskip}The spacing command |\smallskip| is set to an amount of a single space; |\medskip| is a line (a little more than one and a half space); and |\bigskip| a double space.\index{spacing|)}
336 %
337 %\begin{figure}[h]
338 %\centering
339 %\rule{.8\textwidth}{.4pt}\\[2mm]
340 %|\tiny|\quad\shortstack[l]{\cs{SMALL} or \\\cs{scriptsize}}\quad\shortstack[l]{\cs{Small} or \\\cs{footnotesize}}\quad|\small|\\[2mm]
341 %|\normalsize|\\[2mm]
342 %|\large|\quad|\Large|\quad|\LARGE|\quad|\huge|\quad|\Huge|\\[2mm]
343 %\rule{.8\textwidth}{.4pt}\\
344 %\caption{Font sizes}\label{size}
345 %\end{figure}
346 %
347 %\DescribeMacro{\acro}Adapted from the \textsf{ltugboat} class, \pittetd implements the command |\acro|, that typesets its argument in a font smaller than the surrounding text. It is useful for all-uppercase acronyms like \ETD (|\acro{ETD}|), {\small UNICEF} (|\acro{UNICEF}|), etc., which would be too large in regular size (compare ETD, CTAN, UNICEF); it is better than the direct |\small|, which is not good in contexts of font size other than normal.
348 %
349 %\subsection{Sectioning}
350 %
351 %\subsubsection{Sectioning commands}\index{sections>commands|(textit}\index{sections>titles}
352 %\DescribeMacro{\chapter}\DescribeMacro{\section}\DescribeMacro{\subsection}\DescribeMacro{\subsubsection}The sectioning of a \pittetd document is done through the usual commands |\chapter|, |\section|, |\subsection|, and |\subsubsection|. Note that |\part|, |\paragraph|, and |\subparagraph| are \emph{not} implemented. The |\chapter| command takes care of capitalization\index{capitalization of titles} of the title \emph{both} in the text and in the bookmarks\index{bookmarks}; however, since |\section| capitalizes in the text but not in the bookmarks, it is always advisable to capitalize manually.
353 %
354 %
355 %Within preliminaries\index{preliminaries}, the subdivisions |\section|, |\subsection|, and |\subsubsection| will produce neither a number nor a bookmark entry (|\chapter| is reserved for chapters in the body of the text; about additional preliminary `chapters' see section~\ref{w:prel}). The starred variants |\chapter*|, |\section*|, etc.,\index{starred commands:>\verb!*+\chapter+|textit}\index{starred commands:>\verb!*+\section*+|textit}\index{starred commands:>\verb!*+\subsection*+|textit}\index{starred commands:>\verb!*+\subsubsection*+|textit} work exactly as the non-starred counterparts, although producing a warning.
356 %
357 %All four sectioning commands have the usual optional argument, that contains the alternate version of the heading that appears in the table of contents\index{table of contents}. This, however, is implemented only for compatibility reasons, for the \FG\index{FG (Format Guidelines)} require that the table of contents lists the headings exactly as it appears in the text. The main reason why the optional argument could be used at all is that it permits to cope with the conversion of the text into {\small ASCII}\index{ASCII} text for the bookmarks\index{bookmarks}, but that is best handled by the command |\texorpdfstring|\index{texorpdfstring=\verb!*+\texorpdfstring+} (section~\ref{texorpdf}).\index{sections>commands|)}
358 %
359 %On the other hand, there might be cases in which some letters must appear in lowercase\index{capitalization of titles} even in headings (chemical elements is such a case). The command |\lowercase|\index{lowercase=\verb!*+\lowercase+} works within the arguments to sectioning commands, and can be used for those cases.
360 %
361 %\subsubsection{Numbering}\label{numbers}\index{sections>numbering|(}\index{numbering>chapters and sections|(}\index{chapters>numbering|(}
362 %
363 %The divisions of a Pitt~\ETD can be numbered in two ways, depicted in Figure~\ref{numbering}. The first one is the one used by default (|sectionnumbers|)\options{sectionnumbers}{textit}; the user can specify \pittetd's option |sectionletters|\options{sectionletters}{textit} to use the second one. In this case, in addition, the labels for successive levels of the |enumerate| environment\index{environments:>enumerate=\texttt{enumerate}}\index{enumerate=\texttt{enumerate} (environment)} are also changed from their default appearance, to agree with the section numbering: the first level will be an uppercase roman numeral, the second an uppercase letter, and so on. \DescribeMacro{\regularenum}The user has the command |\regularenum| to revert to the usual appearances (namely arabic, letter, roman, Letter).
364 %
365 %\begin{figure}[h]\small\parskip10pt
366 %\noindent\fbox{\begin{minipage}{.45\textwidth}
367 %1.0\quad FIRST CHAPTER\par
368 %\null\quad1.1\quad FIRST SECTION\par
369 %\null\qquad 1.11\quad First subsection\par
370 %\null\quad\qquad1.11.1\quad First subsubsection\par
371 %\null\end{minipage}}\hfill
372 %\fbox{\begin{minipage}{.45\textwidth}
373 %I.\quad FIRST CHAPTER\par
374 %\null\quad A.\quad FIRST SECTION\par
375 %\null\qquad 1.\quad First subsection\par
376 %\null\quad\qquad a.\quad First subsubsection\par
377 %\null\end{minipage}}\\
378 %\normalsize\makebox[.45\textwidth][l]{\ |sectionnumbers| (default)}\hfill\makebox[.45\textwidth][l]{|sectionletters|}
379 %\caption{The two possibilities for section numbering}\label{numbering}
380 %\end{figure}\index{sections>numbering|)}\index{numbering>chapters and sections|)}\index{chapters>numbering|)}
381 %
382 %\subsection{The preliminaries}\label{prelim}\index{preliminaries|(textit}
383 %
384 %The first part of a Pitt~\ETD is made of the `preliminaries.' They are created in \pittetd with special commands that are the subject of the present section.
385 %
386 %\pittetd will keep track of the order in which the user typesets the preliminaries, and will warn or complain according to the `stage' of the document (see section~\ref{stage}).
387 %
388 %\subsubsection{Title Page}\label{title}\index{title page|(textit}
389 %The title page is produced, as usual, by the command \DescribeMacro{\maketitle}|\maketitle|, but involves several pieces of information in addition to |\title|, |\author| and |\date|, so it is only \emph{deceivingly} similar to the same command in standard \LaTeX\ classes\index{classes>standard}. All efforts have been taken to prevent the differences to ruin the \LaTeX\ run (making easier the conversion from other classes), but the user will eventually have to check it carefully.
390 %
391 %\DescribeMacro{\title}The macro |\title| has an optional argument that sets the title of the document as it will appear in the `Document~Info'\index{PDF>Document Info}\index{Document Info} dialog box of Acrobat~Reader\index{Acrobat Reader}. If no optional argument is given, the required argument will be used (however, bear in mind that only a limited portion of it will be visible). In order for this feature to work properly, |\title| must be issued in the preamble\index{preamble} of the document. In the text, the title will be typeset uppercase.\hfill{\small\textbf{Ex.:\ } |\title[An Anatomy of the World]{An Anatomy of %|\\[-2pt]
392 %\null\hfill|the World on texts by John Donne, %|\\[-2pt]
393 %\null\hfill|for soprano and six instrumentalists}|}
394 %
395 %\clearpage\DescribeMacro{\author}The |\author| command works much the same as in standard \LaTeX\ classes\index{classes>standard}. Again, it should be issued in the preamble\index{preamble} for the author's name to appear in the `Document~Info'\index{PDF>Document Info}\index{Document Info} dialog box. On the other hand, |\thanks| and |\and| are disabled.\ex|\author{Federico Garcia}|\ample
396 %
397 %\bigskip
398 %\noindent The following macros set other information needed by \pittetd to build the preliminaries. None of them is required unless |final|\option{final} option is used. With |semifinal|\option{semifinal} and |draft|\option{draft}, a warning\index{warnings} is issued informing of any missing commands.
399 %
400 %These commands are analogous, but not identical, to additional commands in the classes \textsf{pitthesis}\index{pitthesis=\textsf{pitthesis} class} and \textsf{pittdiss}\index{pittdiss=\textsf{pittdiss} class}. Patches are available to facilitate conversion from those classes to \pittetd.
401 %
402 %\DescribeMacro{\year}The title page does not include the whole date, but only the year. By default, this is set to the current year; the user can optionally specify it with the command |\year|.\ex|\year{2002}|\ample
403 %
404 %\DescribeMacro{\degree}The information of the author's previous degrees is provided by the |\degree| command, and should contain the degree, institution, and year of the each degree. Several lines or degrees can be separated with |\\|.\ex|\degree{B.S. in Music (Composition),\\Bogot\'a, 2001}|\ample
405 %
406 %\DescribeMacro{\school}The title page includes the text `submitted to the graduate faculty of', followed by the school name. The user sets this name with the command |\school|. By default, the article `the' is appended to the school name, but the user can change it with the optional argument.\par
407 %
408 %\vskip-4pt
409 %{\raggedleft\small\textbf{Ex.:\ }|\school{Department of Mathematics}|\\\textbf{Ex.:\ } |\school[]{FAS}|\\\textbf{Ex.:\ } |\school[certain]{Other department}|\\}
410 %
411 %\smallskip\DescribeMacro{\degreesought}According to the option used (|phd|\option{phd}, |ms|,\option{ms} or |ma|\option{ma}), \pittetd sets the value of |\degreesought| to either `Doctor of Philosophy,' `Master of Sciences,' or `Master of Arts'. If desired, |\renewcommand| can be used to modify it.\ex|\renewcommand\degreesought{M. A. in Composition and Theory}|\ample
412 %
413 %\bigskip\noindent
414 %Figure~\ref{titlefig} is the title page produced by the examples above.
415 %
416 %\begin{figure}\centering\fbox{\begin{minipage}[c][.65\textheight][c]{.78\textwidth}
417 %\scriptsize
418 %\baselineskip16pt
419 %\centering\vspace*{1cm}
420 %\textbf{AN ANATOMY OF THE WORLD ON TEXTS BY JOHN DONNE FOR SOPRANO AND SIX INSTRUMENTALISTS}
421 %
422 %\vfill
423 %by\\
424 %\textbf{Federico Garcia}\\
425 %B.S. in Music (Composition)\\
426 %Bogot\'a, 2001
427 %
428 %\vfill
429 %Submitted to the Graduate Faculty of\\
430 %Arts and Sciences in partial fulfillment\\
431 %of the requirements for the degree of\\
432 %\textbf{M. A. in Composition and Theory}
433 %
434 %\vfill
435 %University of Pittsburgh\\
436 %2002
437 %
438 %\vspace*{1cm}
439 %\end{minipage}}\caption{Example of title page}\label{titlefig}\end{figure}\index{title page|)}
440 %
441 %\subsubsection{Committee membership page}\index{committee page|(textit}
442 %
443 %\DescribeMacro{\makecommittee}The |\makecommittee| command builds up the committee membership page. The author is typeset as it was in the Title~Page (i.e., as is provided by the |\author|\index{author=\verb!*+author+} command); the school name comes initially from the |\school| command, although capitalized (see section~\ref{title} for these two commands). In some cases, the name of the school in the committee membership page should be different from the one that appears on the Title~Page (for example, when it starts with `Faculty'); the user can insert a new |\school|\index{school=\verb!*+\school+} command right before |\makecommittee| (and after |\maketitle|) to control the second appearance.
444 %
445 %In addition to that information, the committee membership page takes also the date and the committee members, which are provided with the next commands.
446 %
447 %\DescribeMacro{\date}The |\date| command is intended for the date of the thesis/dis\-ser\-ta\-tion defense\index{defense}\index{date}, which will appear after the text `It was defended on'. The default value is |\today|. It can be omitted with |\date{}| (in whose case there will be no `It was defended'), but a warning will be issued.\index{warnings}\ex|\date{May 15, 2003}|\ample
448 %
449 %\DescribeMacro{\committeemember}The list of committee members\index{committee members} is typeset with information from one or more |\committeemember| commands (one for each member). The argument of |\committeemember| cannot contain more than one line.\ex|\committeemember{N. Chimpsky, Ph.\ D., Professor}|\ample
450 %
451 %The \emph{first} name will be treated as the thesis/dis\-sert\-a\-tion advisor\index{thesis advisor(s)}\index{dissertation advisor(s)}\index{advisor(s)}. When there are two advisors, the second one should be provided with the \DescribeMacro{\coadvisor}|\coadvisor| command.\index{coadvisor}
452 %
453 %In master's theses, inclusion of the rest of the committee is optional, but in Ph.~D. dissertations it is required. Accordingly, if \pittetd has been loaded with the |phd|\option{phd} option, it will require at least two |\committemember| commands, the requirement taking the form of a warning\index{warnings} for |draft|\option{draft} and |semifinal|\option{semifinal} options, an error for |final|\option{final}\index{error messages>\pittetd's}.
454 %
455 %In any case, if just one member (the advisor) is listed, \pittetd will omit the text `approved by', only typesetting the advisor's name at the bottom of the page.\index{committee page|)}
456 %
457 %\subsubsection{Copyright page}\index{copyright page}
458 %
459 %\DescribeMacro{\copyrightpage}Optionally, a copyright page can be appended immediately after the committee membership page, through the command |\copyrightpage|.
460 %
461 %\subsubsection{Abstract}\label{abstract}\index{abstract|(textit}
462 %
463 %\DescribeEnv{abstract}An abstract of no more than 350 words is required for every Pitt~\ETD. It is created as usual with the |abstract| environment:\\
464 %\null\quad|\begin{abstract}|\\
465 %\null\qquad\meta{text of the abstract}\\\enlargethispage*{1cm}
466 %\null\quad|\end{abstract}|\\
467 %\clearpage The page will start with the title\index{title}, the author\index{author}, and the year of the document, followed by the text of the abstract.
468 %
469 %Optionally, a list of keywords\index{keywords} or descriptors can be appended at the end of the abstract. The keywords themselves have to be set in the preamble\index{preamble} by the command |\keywords|\index{keywords=\verb!*+\keywords+} (section~\ref{pdfinfo}). Then, an optional argument to the |abstract| environment sets the title of the list. For example, the command |\begin{abstract}[Keywords:]| produces, after the text of the abstract, the expression `\textbf{Keywords:}' followed by the contents of the previous |\keywords| command.\index{abstract|)}
470 %
471 %Some schools (including the School of Engineering) recommend that the word `{\small ABSTRACT}' appears on the abstract page. \pittetd provides for that requirement in the form of a starred version for the |abstract| environment:\\
472 %\null\quad|\begin{abstract*}|\\
473 %\null\qquad\meta{text of the abstract}\\
474 %\null\quad|\end{abstract*}|\\
475 %Keywords can be appended to this kind of |abstract| in the same way.
476 %
477 %\subsubsection{Table of Contents, and Lists of Figures and Tables}\index{table of contents|textit}\index{list of figures|textit}\index{list of tables|textit}
478 %
479 %\DescribeMacro{\tableofcontents}\DescribeMacro{\listoffigures}\DescribeMacro{\listoftables}The table of contents and the lists of figures and tables are created with the usual \LaTeX\ commands. If |hyperref|\package{hyperref} is used, the entries in these lists are links pointing to the corresponding page, and are included as bookmarks.\index{bookmarks}\index{links}
480 %
481 %\subsubsection{Preface}\index{preface|(textit}
482 %
483 %\DescribeMacro{\preface}The preface is optional. If one is desired, the user needs only to type |\preface| followed by the text itself. Acknowledgements\index{acknowledgements}, dedication\index{dedication}, etc., should be included in this preliminary.\index{preface|)} The preface is the only preliminary that is included in the table of contents.\index{table of contents}
484 %
485 %\subsubsection{Additional preliminaries}\label{addprel}
486 %
487 %\DescribeMacro{\preliminarychapter}As has been said, preliminaries in a Pitt~\ETD are in principle limited to those described above. Just for the sake of completeness, however, a command for additional preliminaries is implemented (and its use is discouraged) in \pittetd:
488 %
489 %|\preliminarychapter{|\meta{heading}|}|
490 %
491 %\noindent The \meta{heading} will be both typeset and bookmarked\index{bookmarks}, but not included in the table of contents\index{table of contents}). Sections within the additional preliminary will be unnumbered.\index{preliminaries|)}
492 %
493 %\subsection{\PDF Document Info}\label{pdfinfo}\index{PDF>Document Info|(textit}\index{Document Info|(textit}
494 %
495 %The `Document~Info' dialog box of Acrobat~Reader\index{Acrobat Reader} includes information for title\index{title}, author\index{author}, subject\index{subject}, and keywords\index{keywords}. \pittetd will fill in these fields (if |hyperref|\package{hyperref} is used) with, respectively: the optional argument to the command |\title|; the |\author|; the |\subject| command; and the |\keywords| command. All four commands must be issued in the preamble\index{preamble} for the information to go to the Document~Info (although there is no error message if any or all are missing).
496 %
497 %\DescribeMacro{\subject}\DescribeMacro{\keywords}For example, the commands |\subject{Musical Composition}| and |\keywords{Music \& Text, John Donne, Vocal Music}| define the contents of the `subject' and `keywords' fields. The latter will, optionally, also be typeset at the end of the abstract\index{abstract} (see section~\ref{abstract}).\index{PDF>Document Info|)}\index{Document Info|)}
498 %
499 %\subsection{Main body}\label{text}
500 %
501 %The way the main body of the document is typeset by \LaTeX\ is very little modified by \pittetd. As has been said, footnotes\index{footnotes} and quotations\index{quotations} appear in a smaller font, and single-spaced. Within the |table|\index{environments:>table={\ttfamily table}}\index{table=\texttt{table} (environment)} and |figure|\index{environments:>figure=\texttt{figure}}\index{figure={\ttfamily figure} (environment)} environments, moreover, |\singlespace|\index{singlespace=\verb!*+\singlespace+} is declared, so their contents appears single-spaced\index{spacing}\index{tables>spacing in}\index{figures>spacing in}. To resort to one-half spacing, the declaration |\normalsize|\index{normalsize=\verb!*+\normalsize+} is enough.
502 %
503 %\subsubsection{Numbering and captions for tables and figures}\label{optional}
504 %
505 %\index{figures>numbering}\index{tables>numbering}\index{numbering>figures and tables}By default, figures and tables are numbered consecutively (1, 2, etc.), independently from the chapter. This can be changed with the \DescribeMacro{\chapterfloats}|\chapterfloats| command, that has to appear \index{preamble}before |\begin{document}|. In that case, figures and tables will be numbered within chapters (1.4, 2.5, etc., or I.4, II.5, etc.); \pittetd reserves enough space for the figure or table number in the list of figures or tables (that might be something long like `VIII.14') , but this requires several runs.
506 %
507 %\index{tables>captions|(textit}\index{figures>captions|(textit}\index{captions|(textit}As has been mentioned, captions are subject to the limitations of bookmarking\index{bookmarks>limitations}: they must be short and contain only {\small ASCII} text\index{ASCII}. \DescribeMacro{\caption}In case this poses problems, the optional argument to the |\caption| command is the best tool to deal with them:
508 %
509 %|\caption[|\meta{alternate caption}|]{|\meta{caption}|}|
510 %
511 %\noindent When present, it is \meta{alternate caption}, instead \meta{caption}, what is actually typeset in the list of tables or figures\index{list of tables}\index{list of figures}, and into the corresponding bookmark\index{bookmarks}. So, if a long caption is necessary, it can be handled as in the following example (note the avoidance of |\cite|\index{cite=\verb!*+\cite+} in the optional argument):
512 %
513 %{\small\begin{verbatim}
514 %\caption[A modern `wave model' of the Indo-European
515 %languages according to Raimo~Antilla~(1972).]{A
516 %modern `wave model' of the Indo-European languages
517 %according to \cite{r-a}. The numbers indicate 24
518 %isogglosses (similarities) shared among different
519 %Indo-European languages. Isogloss 1 indicates the
520 %centum:satem split...
521 %}
522 %\end{verbatim}
523 %}
524 %
525 %Refer also to section~\ref{texorpdf} for more details on |hyperref|\package{hyperref} conversion of \TeX\ into {\small ASCII} text.\index{ASCII}\index{tables>captions|)}\index{figures>captions|)}\index{captions|)}
526 %
527 %\subsubsection{Cross references}\index{cross referencing}
528 %
529 %When using |hyperref|\package{hyperref}, cross references created with the |\ref|\index{ref=\verb!*+\ref+} and |\pageref|\index{pageref=\verb!*+\pageref+} commands are interactive links\index{links}. The package offers, as an alternative, the command |\nameref|\index{nameref=\verb!*+\nameref+}, that is used exactly as |\ref|, but typesets the \emph{name} of the chapter or section, instead of its number.\footnote{\texttt{hyperref} achieves this by means of invoking the \texttt{nameref}\package{nameref} package.} This kind of reference seems to be more consistent with interactivity (for, when a click is enough, the main motivation for an ordered numbering is called into question).
530 %
531 %In any case, with \pittetd, the |\nameref| command is slightly modified when it refers to an appendix\index{appendices}: it does not produce the appendix's title, but its label (`APPENDIX', or `APPENDIX A', etc.).
532 %
533 %\subsection{Appendices}\index{appendices|(textit}
534 %
535 %\DescribeMacro{\appendix}The |\appendix| command tells \pittetd that the following chapters (i.e., the following |\chapter|\index{chapter=\verb!*+\chapter+} commands) are appendices. If there is only one appendix, its heading will be `APPENDIX'; if there are more, they will be numbered with capital letters, `APPENDIX~A', etc. \pittetd needs a second run to know which way to follow.\index{appendices|)}
536 %
537 %\subsection{Bibliography}\label{bibliography}\index{bibliography|(}\index{bibliography>packages|(}
538 %
539 %\subsubsection{\BibTeX\ styles}\index{Bibtex=\BibTeX|(}\index{Bibtex=\BibTeX>styles|(textit}
540 %
541 %This section applies only to documents whose bibliography is generated through \BibTeX. Manually-created bibliographies (i.e., produced with the |thebibliography|\index{environments:>{\ttfamily thebibliography}}\index{thebib=\texttt{thebibliography} (environment)} environment) need no special warning to work properly with \pittetd, which handles spacing after the \FG (single space within entries; entries separated by one-half space\index{spacing}).
542 %
543 %As far as \pittetd is concerned, there are three kinds of \BibTeX\ styles (|.bst| files). The first kind includes the styles that limit themselves to ordering and formatting the different pieces of information within the bibliography entries (without modifying the appearance of the list as a whole). The vast majority of \BibTeX\ styles, including the standard ones (|plain|, |unsrt|, |alpha|, |abbrv|), fall in this category. These styles pose no problem to \pittetd, and nothing special is needed to fulfill the requirements of the \FG.
544 %
545 %The second group comprises those styles that, in addition to the individual entries, format the list as well. In general, styles that do not use bracketed labels (`[1]' or `[Cas44]') are part of this group, for they need to redefine the |thebibliography|\index{environments:>{\ttfamily thebibliography}}\index{thebib=\texttt{thebibliography} (environment)} environment to conform to the absence of such labels. They usually come with an associated package\index{packages>bibliography} (|.sty| file) that takes care of this task. To ensure proper behavior when using these packages, \pittetd offers the command \DescribeMacro{\safebibliography}|\safebibliography|. Its use is identical to that of |\bibliography|\index{bibliography=\verb!*+\bibliography+}, and it tries to make a compromise between the style's conventions and the \FG.\footnote{It of course is not guaranteed that it will always succeed in doing so. If it does not, it is possible that the bibliography style is actually of the third kind.}
546 %
547 %The last kind of bibliography styles is that of systems that modify aspects of formatting other than the final list of bibliographical references. All these systems have not only |.bst| files, but also substantial packages (|.sty|). |harvard|\package{harvard}, |natbib|\package{natbib} and |achicago|\package{achicago} are common instances. When \pittetd has a close encounter with packages of the third kind, there can be erratic behavior. It is recommended that |\safebibliography| is used instead of |\bibliography|, but this will probably not be enough. Since there is no general solution, the problems have to be treated individually, with patches\index{patches}, as explained in \ref{packages} above.
548 %
549 %The three mentioned systems have already been tackled: |natbib|\package{natbib} is an extremely well-written program, so that conciliating it with \pittetd is easy and does not merit a separate patch file. No special treatment (other than using |\safebibliography|) will normally be needed.
550 %
551 %On the other hand, |harvard|\package{harvard} is a more complicated case, for the package creates interactive links. The |hyperref|\package{hyperref} package has support for |harvard|\package{harvard}, but there is no way to foresee potential problems. It is strongly recommended if possible not to use this package, replacing it with |natbib|\package{natbib}.
552 %
553 %|achicago|\package{achicago} poses other kinds of problems. It is an ambitious package that modifies things other than bibliography-related functions. For example, using this package, the effect of |\emph|\index{emph=\verb!*+\emph+} will not be \emph{italic}, but \textsl{slanted} shape; the |quote|\index{environments:>quote=\texttt{quote}}\index{quote=\texttt{quote} (environment)} and |quotation|\index{environments:>quotation=\texttt{quotation}}\index{quotation=\texttt{quotation} (environment)} environments are also modified, so that \pittetd cannot set single spacing\index{spacing} within them. Again, it is recommended to avoid this package, but in any case there is a patch\index{achicago=\texttt {achicago} package>patch for|textit} available at \pittetd's webpage, the file |achicago.pit|. It should be loaded saying |\patch{achicago}|.
554 %
555 %\bigskip
556 %Thus, through the means just explained, a broad range of bibliographical usages is supported by \pittetd. Bracketed-labels referencing\index{bibliography>bracket labels}, being what \LaTeX\ is designed for, can generally be used without restriction; for author-year referencing\index{author-year}\index{bibliography>author-year}, |natbib|\package{natbib} and |achicago|\package{achicago} are supported; and for footnote referencing\index{bibliography>footnote}, the package |opcit|\package{opcit} (available from {\small CTAN}) works fine if |\safebibliography| is used.\index{Bibtex=\BibTeX>styles|)}
557 %
558 %\subsubsection{Citation packages}\index{bibliography>citations}
559 %
560 %There are some packages that handle the way bibliographical references are handled within the text, rather than the way the entries of the final list are typeset. It is unfortunate that the package |cite|\package{cite}, that sorts the numbers of a multiple |\cite|\index{cite=\verb!*+\cite+}, creates deep and quite un-traceable conflicts with |hyperref|\package{hyperref}. The package can be loaded, but it will have no effect. As a result, the |overcite|\package{overcite} package will \emph{not} sort the numbers either, although it will typeset them as superscripts (which, in addition, will be interactive links\index{links}). |achemso|\package{achemso} also causes problems, and it is recommended not to use it at all.\footnote{In \texttt{hyperref}'s documentation, Sebastian Rahtz admits not having been able to make hyper-bibliography robust, ``since many styles redefine these things\dots\ Any or all of \emph{achemso}, \emph{chapterbib}, and \emph{drftcite} may break.'' For the case of \texttt{cite}, I tried to make a compromise, sacrificing the interactivity of the bibliographical references to keep the effects of the package. But I got completely lost in the attempt\dots\ As Rahtz says, ``life is too short,'' and I am not going to understand all the workings of \cs{@cite}, \cs{@citex}, \cs{@citen}, \dots\ Sigh.} |chapterbib|\package{chapterbib}, going against \FG, is not supposed to be loaded.
561 %
562 %On the other hand, support for the |multibib|\package{multibib} package, that allows multiple lists of references in the same document, is in progress. For the time being, the recommendation is to plan on writing one general bibliography if possible.\index{bibliography>packages|)} In any case, several reference lists can be manually created (i.e., without using \BibTeX).
563 %
564 %\subsection{The index}\index{index|(textit}
565 %
566 %The code of \pittetd defines the environment |theindex|\index{environments:>theindex=\texttt{theindex}}\index{theindex=\texttt{theindex} (environment)} to suit the \FG, but otherwise exactly as standard classes define it. This means that the production of the index, be it manually or through \emph{MakeIndex}\index{MakeIndex=\emph{MakeIndex}}, remains the same. |hyperref|\package{hyperref} offers an option to create a `hyper-index,' whose page numbers are interactive links. However, the option is not very robust, and therefore \pittetd uses |hyperref| but turns hyper-indexing off.
567 %
568 %At the moment there is no support for multiple indexes to be generated automatically by \emph{MakeIndex}\index{MakeIndex=\emph{MakeIndex}}, although several indexes can be manually created.\index{index|)}
569 %
570 %\section{Using the \texttt{hyperref} package}\index{packages mentioned:>hyperref=\texttt {hyperref}>use of|(}\index{hyperref=\texttt {hyperref} package>use of|(}\label{hyperref}
571 %
572 %This section is a very brief and incomplete guide to some extra features of the |hyperref| package that have not been explained before. Unfortunately, if something is missing to |hyperref|, it is documentation. Useful information is to be found in \cite{manual} and \cite{paper}, but those documents are not intended for the average user. The present section is a translated adaptation of the relevant section in \cite{luly}, to my knowledge the most complete (but still not comprehensive) user's guide on the package.
573 %
574 %Section~\ref{diffhyperref} provides a starting point to use |hyperref| in a way different of \pittetd's default.
575 %
576 %\subsection{New user's commands}\index{links|(}\label{texorpdf}
577 %
578 %Certain character strings (notably the text of the bookmarks\index{bookmarks>limitations}) are converted by |hyperref| into {\small ASCII}\index{ASCII} text, ignoring most \LaTeX\ commands. In general, macros that expand into a piece of text (such as the |\LaTeX| command itself, the italic correction |\/|, or things like |`| and |'|) are appropriately handled. But math mode, for example, is completely ignored. The process leads virtually never to an error message\index{error messages}; warnings, however, are issued for every ignored token.
579 %
580 %\DescribeMacro{\texorpdfstring}In any case, the user has a way to `help' |hyperref| in the conversion, namely the command
581 %
582 %|\texorpdfstring{|\meta{\TeX\ text}|}{|\meta{\PDF text}|}|
583 %
584 %\noindent that can be used in sectioning commands\index{sections>commands} or captions\index{captions} for figures and tables. For example, a caption with the text `An H$_2$O molecule,' that would produce a bad bookmark entry, can be fixed by typing
585 %
586 %\noindent{\small|\caption{\texorpdfstring{An H$_2$O molecule}{A water molecule}}|}
587 %
588 %\noindent After this, the caption for the figure will feature `H$_2$O' (both in the figure and the list of figures), but its bookmark will substitute `\texttt{water}'.
589 %
590 %\bigskip\noindent
591 %To create links other than those produced by the \LaTeX\ commands |\ref|, |\pageref|, and |\cite|, |hyperref| makes available other commands. Only some of them will be mentioned here. See \cite{manual} for the rest.
592 %
593 %\DescribeMacro{\nameref}The |\nameref| command works like |ref|, but creates a link with the chapter or section \emph{name}. It is only applicable to sectioning commands.
594 %
595 %\DescribeMacro{\url}The command |\url{|\meta{URL address}|}| prints the \meta{URL address} as a link that launches the local Internet surfer and leads to the corresponding page.
596 %
597 %\DescribeMacro{\hypertarget}Analogous to |\label|, the command |\hypertarget{|\meta{key}|}{|\meta{text}|}| makes the \meta{text} to be the target of a cross reference.
598 %
599 %\DescribeMacro{\hyperlink}Analogous to |\ref|, the command |\hyperlink{|\meta{key}|}{|\meta{expression}|}| sets up an internal link whose target has been previously defined with |\hypertarget|.
600 %
601 %\bigskip\noindent
602 %\DescribeMacro{\Acrobatmenu}Through the command |\Acrobatmenu{|\meta{menu function}|}{|\meta{text}|}|, a \meta{text} is typeset as a link that activates the \meta{menu function} of Acrobat~Reader (or Exchange). For a list of the available functions, see section~4 of \cite{manual}.\index{links|)}
603 %
604 %
605 %\subsection{Overriding \pittetd's preferences}\label{diffhyperref}
606 %
607 %As has been said, \pittetd loads |hyperref| with a fixed set of options. In order to access the package keeping control of it, it is needed to specify the |nohyperref|\option{nohyperref} option for \pittetd and then load |hyperref|:
608 %
609 %\noindent|\documentclass[nohyperref]{pittetd}|\\[-2pt]
610 %\noindent|\usepackage[|\meta{personal options}|]{hyperref}|
611 %
612 %This procedure is of course recommended only to users experienced with |hyperref|. A comprehensive list of |hyperref|'s options is given in \cite{options}. Here is the list of options that \pittetd uses by default (when allowed to):
613 %
614 %\noindent{\ttfamily letterpaper, colorlinks,\\[-2pt]
615 %hyperindex=false\\[-2pt]
616 %bookmarks, bookmarksnumbered, bookmarksopen, \\[-2pt]
617 %citecolor=blue, urlcolor=blue}
618 %
619 %An option not used by \pittetd that might be relevant is |backref|, that makes the bibliographical entries produce links to the sections in which the corresponding |\cite| appear (there is also the alternative |pagebackref|, with links leading to the \emph{page} of the |\cite|'s).
620 %
621 %In any case, it is always good to indicate the driver for |hyperref|, for example |pdftex|\option{pdftex} or |dvipdfm|\option{dvipdfm}, as an option to this package. In fact, when such an option is given to \pittetd, all that is done by the latter is to pass it on to packages that need it, including |hyperref|, |graphicx|\package{graphicx} and |color|\package{color}.
622 %
623 %\bigskip\noindent By loading |hyperref| manually, some automatic features of \pittetd are lost: the bookmarks\index{bookmarks} for the bibliography\index{bibliography}, the index\index{index}, and the appendices\index{appendices}; and the filling in of the `Document~Info'\index{Document Info}\index{PDF>Document Info} dialog box of Acrobat~Reader\index{Acrobat Reader}. Figures and tables\index{figures}\index{tables}, however, will still create bookmarks. To get those bookmarks created was the thorniest issue in the writing of \pittetd, and we have decided to keep this working even if the user has chosen to override \pittetd's preferences about |hyperref| (see the code for |\listoffigures| and |\listoftables|).
624 %
625 %\DescribeMacro{\pdfbookmark}To create bookmarks\index{bookmarks} additional to those that come from sections in the table of contents (or from the lists of figures and tables), |hyperref| provides the |\pdfbookmark| command:
626 %
627 %|\pdfbookmark[|\meta{level}|]{|\meta{bookmark text}|}{|\meta{key}|}|
628 %
629 %\noindent where \meta{level} is |0| for chapters, |1| for sections, and so on. The \meta{key} is a unique name chosen by the user. The bookmark will be appended to the panel in the current position, and will point to the page of the text, in which |\pdfbookmark| appears. For more complicated instances (bookmarks that lead to a different location in the document, or that lead to different documents), see sections 5.2.4~and~7.2 of \cite{paper}.\index{packages mentioned:>hyperref=\texttt {hyperref}>use of|)}\index{hyperref=\texttt {hyperref} package>use of|)}
630 %
631 %\section{Before submitting}\label{checklist}
632 %
633 %The \pittetd \LaTeX\ class is programmed to follow closely and consistently the \FG. In general, the author of a thesis or dissertation needs not to be concerned about most of the formatting requirements (for example, checking the bookmarks\index{bookmarks} and links\index{links} one by one is unnecessary). However, this creates the danger of implying that nothing can go wrong. There are in fact some things beyond \pittetd's control, and those things must be checked by the authors themselves (and will probably be checked closely by format reviewers). This section highlights the most common and likely problems.
634 %
635 %\begin{description}
636 %\item[Captions of tables and figures.] Captions\index{captions} for tables\index{tables>captions} should appear at the top of the table, while those for figures\index{figures>captions} go at the bottom. \pittetd does not force nor check this requirement.
637 %\item[Captions as bookmarks.] Very long captions\index{captions} for tables and figures tend to be truncated when converted to bookmarks\index{bookmarks>limitations}. Also, \LaTeX\ constructions (like formulas, cite commands, etc.) are lost. Sections \ref{optional}~and~\ref{texorpdf} show two ways of dealing with these limitations.
638 %\item[Capitalization of sections.] The section\index{sections>titles}\index{capitalization of titles} titles are capitalized by \pittetd in the text, but \emph{not} in the bookmarks\index{bookmarks}. The best thing is to provide |\section|\index{section=\verb!*+\section+} with an already-all-capitals argument.
639 %\item[The \texttt{final} option.] Before submitting it is always very important to run the document with \texttt{final}\option{final} option (i.e., adding `\texttt{final}' to the list of options to |\documentclass|\index{documentclass=\verb!*+documentclass+}). This will catch and make evident any problems in the preliminary pages\index{preliminaries}. See section~\ref{stage}.
640 %\item[Bad line breaks.] Sometimes \LaTeX\ cannot break a paragraph into lines satisfactorily. The result is one (or more) `overfull' lines\index{overfull lines}, that stick to the right of the margin. \LaTeX\ always gives a warning\index{warnings} about each and every overfull, and these can be seen in the \texttt{.log} file. This file, a plain-text file, can (and should) be read for overfull and other kinds of warnings. Overfull warnings start with the text `{\ttfamily Overfull |\hbox| in paragraph}'.
641 %\item[Bad page breaks.] Similarly, \LaTeX\ issues an `underfull'\index{underfull boxes} warning for bad page breaking---when it is able to recognize it. But sometimes \LaTeX\ will break a page just after a heading\index{headings}, which is wrong. The best way to check page breaking is to make the pages fit the screen and go scanning quickly page by page (\textsf{PgDn}).
642 %\item[Warnings.] There are also warnings\index{warnings} about other things, such as incomplete cross~references\index{cross referencing}, undefined |\cite|'s, etc., which are important to fix. The warnings are all collected in the |.log| file, and usually reveal at least one problem that had not been noticed before.\index{warnings} It is not good to neglect reading this file; getting it to report no problems should be the crowning, final step in the thesis/dissertation production.
643 %\end{description}
644 %
645 %\begin{thebibliography}{9}
646 %\addcontentsline{toc}{section}{References}
647 %\bibitem{comments} Federico Garcia, \emph{Comments on using \LaTeX\ for theses}, July~2003, file |comments.dvi| or |comments.pdf|, available at \pittetd's webpage.
648 %\bibitem{manual} Sebastian Rahtz, \emph{Hypertext marks in \LaTeX: the \textsf{hyperref} package}, June~1998, file |manual.pdf|, part of the |hyperref| package distribution. Available at \pittetd's webpage.
649 %\bibitem{paper} Heiko Oberdiek, \emph{PDF information and navigation elements with hyperref, pdf\TeX, and thumbpdf}, paper at Euro\TeX'99. File |paper.pdf|, part of the |hyperref| package distribution. Available at \pittetd's webpage.
650 %\bibitem{luly} Rodrigo De Castro, \emph{El Universo \LaTeX}, 2nd.\ edition, Bogot\'a, Universidad Nacional de Colombia, 2003.
651 %\bibitem{options}Sebastian Rahtz, \emph{hyperref package options}, October 1999, file |options.pdf|, part of the |hyperref| package distribution. Available at \pittetd's webpage.
652 %\end{thebibliography}
653 %
654 %
655 %\PrintIndex
656 %\StopEventually
657 %
658 %\section{The program}
659 %
660 %\textsc{docstrip} modules: |class|, |10pt|, |11pt|, |12pt|, |pittdiss|, |pitthesis|, |achicago|
661 %
662 %\subsection{Identification}
663 % \begin{macrocode}
664 %<*class>
665 \NeedsTeXFormat{LaTeX2e}[1995/12/01]
666 \ProvidesClass{pittetd}[2004/08/17 v1.618
667 University of Pittsburgh ETD
668 (Electronic Thesis & Dissertations) class]
669 % \end{macrocode}
670 %
671 %\subsection{Declarations}
672 %
673 % \begin{macrocode}
674 \newwrite\@etdaux
675 \newif\if@errors
676 \newif\if@keywords
677 \newif\if@tables
678 \newif\if@figures
679 \newif\if@mainmatter\@mainmattertrue
680 \newif\if@hyper@ref\@hyper@reftrue
681 \newif\if@secletters
682 \newif\if@yeargiven\@yeargivenfalse
683 \newif\if@dategiven\@dategiventrue
684 \newlength\@chapterl
685 \newlength\@sectionl
686 \newlength\@subsectionl
687 \newlength\@subsubsectionl
688 \newlength\@singleline
689 \newlength\@presubs
690 \newlength\@presubsub
691 \newlength\@floatl
692 \newdimen\bibindent
693 \newlength\abovecaptionskip
694 \newlength\belowcaptionskip
695 \newcounter{@members}\setcounter{@members}{0}
696 \newcounter{@addprel}\setcounter{@addprel}{8}
697 \newcounter{@appno}\setcounter{@appno}{0}
698 \newcounter{chapter}
699 \newcounter{section}[chapter]
700 \newcounter{subsection}[section]
701 \newcounter{subsubsection}[subsection]
702 \newcounter{paragraph}
703 \newcounter{subparagraph}
704 \newcounter{figure}
705 \newcounter{table}
706 \newtoks\@expectedprelim
707 \newtoks\@committee
708 \newtoks\@coadv
709 % \end{macrocode}
710 %
711 %\subsection{Options}
712 %
713 %These come pretty unchanged from the standard classes:
714 %
715 % \begin{macrocode}
716 \newcommand\@ptsize{}
717 \DeclareOption{10pt}{\renewcommand\@ptsize{0}}
718 \DeclareOption{11pt}{\renewcommand\@ptsize{1}}
719 \DeclareOption{12pt}{\renewcommand\@ptsize{2}}
720 \DeclareOption{leqno}{\input{leqno.clo}}
721 \DeclareOption{fleqn}{\input{fleqn.clo}}
722 \DeclareOption{openbib}{%
723 \AtEndOfPackage{%
724 \renewcommand\@openbib@code{%
725 \advance\leftmargin\bibindent
726 \itemindent -\bibindent
727 \listparindent \itemindent
728 \parsep \z@
729 }%
730 \renewcommand\newblock{\par}}}
731 % \end{macrocode}
732 %
733 %Now for \pittetd's own options.
734 % \begin{macrocode}
735 \newcommand\t@or@d{}
736 \newcommand\@this{}
737 \newcommand\@@@degree{}
738 \DeclareOption{phd}{\renewcommand{\t@or@d}{phd}%
739 \renewcommand\@this{Dissertation}%
740 \renewcommand\@@@degree{PhD}%
741 \def\@degreesought{\textbf{Doctor of Philosophy}}%
742 \def\@advisor{Director}}
743 \DeclareOption{ma}{\renewcommand{\t@or@d}{ma}%
744 \renewcommand\@this{Thesis}%
745 \renewcommand\@@@degree{M.A.}%
746 \def\@degreesought{\textbf{Master of Arts}}%
747 \def\@advisor{Advisor}}
748 \DeclareOption{ms}{\renewcommand{\t@or@d}{ms}%
749 \renewcommand\@this{Thesis}%
750 \renewcommand\@@@degree{M.S.}%
751 \def\@degreesought{\textbf{Master of Sciences}}%
752 \def\@advisor{Advisor}}
753 \DeclareOption{sectionnumbers}{\@seclettersfalse}
754 \DeclareOption{sectionletters}{\@secletterstrue}
755 % \end{macrocode}
756 %
757 %The next are the `stage' options. By declaration, |\if@errors| is false, so only |final| is required to mention it explicitly. See section~\ref{stagecode} for the actual effect of this switch.
758 %
759 % \begin{macrocode}
760 \DeclareOption{draft}{\setlength{\overfullrule}{5pt}}
761 \DeclareOption{semifinal}{\setlength{\overfullrule}{5pt}}
762 \DeclareOption{final}{\setlength{\overfullrule}{0pt}%
763 \@errorstrue}
764 % \end{macrocode}
765 %
766 %The following |\let|'ting of |\nameref| to |\ref| provides for the case that a document that has been processed all the time with |hyperref| is suddenly changed to |nohyperref|. If |hyperref| (the package) is to be loaded, it will redefine the command (fortunately it is defined with |\def| in |nameref.sty|; for a not-as-lucky case, see the handling of |\texorpdfstring| below).
767 % \begin{macrocode}
768 \DeclareOption{nohyperref}{\let\nameref\ref\@hyper@reffalse}
769 % \end{macrocode}
770 %
771 %Note that the `options' |pdftex| and |dvipdfm|, advertised so much in the documentation above, are not actually defined in |pittetd.cls|. Because of \LaTeX\ options mechanism, they will be simply passed on to any package that is loaded.
772 %
773 %Okay. Default options, and processing of any non-default:
774 %
775 % \begin{macrocode}
776 \ExecuteOptions{12pt,semifinal,hyperref,phd}
777 \ProcessOptions
778 % \end{macrocode}
779 %
780 %\subsection{Stage and error handling}\label{stagecode}
781 %
782 %\begin{macro}{\@linemessage}Through |\@linemessage| and |\@nolinemessage|, whose actual performance depends on the `stage' option, most problems will only warn, unless the |final| option has turned |\if@errors| true.
783 % \begin{macrocode}
784 \newcommand\@linemessage[2]{%
785 \if@errors
786 \ClassError{pittetd}{#1}{#2}
787 \else
788 \ClassWarning{pittetd}{#1}
789 \fi}
790 % \end{macrocode}
791 %\begin{macro}{\@nolinemessage}
792 % \begin{macrocode}
793 \newcommand\@nolinemessage[2]{\if@errors
794 \ClassError{pittetd}{#1}{#2}\else
795 \ClassWarningNoLine{pittetd}{#1}\fi}
796 % \end{macrocode}
797 %\end{macro}\end{macro}
798 %
799 %\subsection{Initialization}
800 %
801 %First, let's get the font size done: one file for each of the three available sizes. The length |\@singleline| is an important one: it is the space between two lines of text, which is exactly 1.5 of the regular spacing in a standard \LaTeX\ class (according to size). |\normalsize| is the only size that really sets everything up, and the only whose spacing is more than single line. The others modify only the font size itself, and are just a little more than single-spaced (as are all sizes in standard classes). Other things that depend on the font size are set in these files. % \begin{macrocode}
802 %</class>
803 %<*10pt>
804 \setlength{\@singleline}{18\p@}
805 \renewcommand\normalsize{%
806 \@setfontsize\normalsize\@xpt{18}%
807 \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
808 \abovedisplayshortskip \z@ \@plus3\p@
809 \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
810 \belowdisplayskip \abovedisplayskip
811 \let\@listi\@listI}
812 \newcommand\small{\@setfontsize\small\@ixpt{11}}
813 \newcommand\footnotesize{\@setfontsize\footnotesize\@viiipt{9.5}}
814 \newcommand\scriptsize{\@setfontsize\scriptsize\@viipt\@viiipt}
815 \newcommand\tiny{\@setfontsize\tiny\@vpt\@vipt}
816 \newcommand\large{\@setfontsize\large\@xiipt{14}}
817 \newcommand\Large{\@setfontsize\Large\@xivpt{18}}
818 \newcommand\LARGE{\@setfontsize\LARGE\@xviipt{22}}
819 \newcommand\huge{\@setfontsize\huge\@xxpt{25}}
820 \newcommand\Huge{\@setfontsize\Huge\@xxvpt{30}}
821 \newcommand\singlespace{\@setfontsize\singlespace\@xpt\@xiipt}
822 \setlength\footnotesep{6.65\p@}
823 \setlength{\skip\footins}{9\p@ \@plus 4\p@ \@minus 2\p@}
824 \setlength\parindent{15\p@}
825 %</10pt>
826 % \end{macrocode}
827 % \begin{macrocode}
828 %<*11pt>
829 \setlength{\@singleline}{20.4\p@}
830 \renewcommand\normalsize{%
831 \@setfontsize\normalsize\@xipt{20.4}%
832 \abovedisplayskip 11\p@ \@plus3\p@ \@minus6\p@
833 \abovedisplayshortskip \z@ \@plus3\p@
834 \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@
835 \belowdisplayskip \abovedisplayskip
836 \let\@listi\@listI}
837 \newcommand\small{\@setfontsize\small\@xpt\@xiipt}
838 \newcommand\footnotesize{\@setfontsize\footnotesize\@ixpt{11}}
839 \newcommand\scriptsize{\@setfontsize\scriptsize\@viiipt{9.5}}
840 \newcommand\tiny{\@setfontsize\tiny\@vipt\@viipt}
841 \newcommand\large{\@setfontsize\large\@xiipt{14}}
842 \newcommand\Large{\@setfontsize\Large\@xivpt{18}}
843 \newcommand\LARGE{\@setfontsize\LARGE\@xviipt{22}}
844 \newcommand\huge{\@setfontsize\huge\@xxpt{25}}
845 \newcommand\Huge{\@setfontsize\Huge\@xxvpt{30}}
846 \newcommand\singlespace{\@setfontsize\singlespace\@xipt{13.6}}
847 \setlength\footnotesep{7.7\p@}
848 \setlength{\skip\footins}{10\p@ \@plus 4\p@ \@minus 2\p@}
849 \setlength\parindent{17\p@}
850 %</11pt>
851 % \end{macrocode}
852 % \begin{macrocode}
853 %<*12pt>
854 \setlength{\@singleline}{21.75\p@}
855 \renewcommand\normalsize{%
856 \@setfontsize\normalsize\@xiipt{21.75}%
857 \abovedisplayskip 12\p@ \@plus32\p@ \@minus7\p@
858 \abovedisplayshortskip \z@ \@plus3\p@
859 \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@
860 \belowdisplayskip \abovedisplayskip
861 \let\@listi\@listI}
862 \newcommand\small{\@setfontsize\small\@xipt{13.6}}
863 \newcommand\footnotesize{\@setfontsize\footnotesize\@xpt\@xiipt}
864 \newcommand\scriptsize{\@setfontsize\scriptsize\@viiipt{9.5}}
865 \newcommand\tiny{\@setfontsize\tiny\@vipt\@viiipt}
866 \newcommand\large{\@setfontsize\large\@xivpt{18}}
867 \newcommand\Large{\@setfontsize\Large\@xviipt{22}}
868 \newcommand\LARGE{\@setfontsize\LARGE\@xxpt{25}}
869 \newcommand\huge{\@setfontsize\huge\@xxvpt{30}}
870 \let\Huge\huge
871 \newcommand\singlespace{\@setfontsize\singlespace\@xiipt{14.5}}
872 \setlength\footnotesep{8.4\p@}
873 \setlength{\skip\footins}{10.8\p@ \@plus 4\p@ \@minus 2\p@}
874 \setlength{\parindent}{19\p@}
875 %</12pt>
876 %<*class>
877 % \end{macrocode}
878 %
879 %The right file is loaded next. For all sizes, the following |\let|'s are true.
880 % \begin{macrocode}
881 \input{pitetd1\@ptsize.clo}
882 \let\Small\footnotesize
883 \let\SMALL\scriptsize
884 \let\bibindent\parindent
885 % \end{macrocode}
886 %
887 %\bigskip
888 %\noindent Now for some initial values. The first five are needed to format the table of contents and the lists of tables and figures, and are to be changed by the |\jobname.etd| file below. Oh!, |\normalfont| must come before for |em| to make sense as a length unit.
889 % \begin{macrocode}
890 \normalfont
891 \setlength\@chapterl{1.5em}
892 \setlength\@sectionl{1.5em}
893 \setlength\@subsectionl{1em}
894 \setlength\@subsubsectionl{1em}
895 \setlength\@floatl{2.3em}
896 % \end{macrocode}
897 % \begin{macrocode}
898 \newcommand\@phd{phd}
899 \newcommand\contentsname{CONTENTS}
900 \newcommand\listfigurename{LIST OF FIGURES}
901 \newcommand\listtablename{LIST OF TABLES}
902 \newcommand\bibname{BIBLIOGRAPHY}
903 \newcommand\indexname{INDEX}
904 \newcommand\figurename{Figure}
905 \newcommand\tablename{Table}
906 \newcommand\chaptername{Chapter}
907 \newcommand\appendixname{APPENDIX}
908 \newcommand\abstractname{}
909 \newcommand\convname{CONVENTIONS}
910 % \end{macrocode}
911 %
912 %For the table of contents and related:
913 % \begin{macrocode}
914 \setcounter{secnumdepth}{3}
915 \setcounter{tocdepth}{3}
916 \newcommand\@pnumwidth{1.55em}
917 \newcommand\@tocrmarg{2.55em}
918 \newcommand\@dotsep{4.5}
919 % \end{macrocode}
920 %
921 %And here we go with the |\jobname.etd| file. It will tell \pittetd whether there are tables and/or figures---switches |\if@figures| and |\if@tables|, both initially false---and the lengths |\@chapterl|, |\@sectionl|, etc., which hold the width of the widest label of each sectioning level and the widest float number (plus some extra space). The indentation of the sections in the table of contents is equal to |\@chapterl|; that of the lesser levels (lengths |\@presubs| and |\@presubsub|) is then calculated as the sum of the widths of higher levels.
922 %
923 %These calculations are necessary for potentially long Roman numerals of chapters. For example, in \textsf{pittesis}, the number \textbf{VIII} collides with the title of the chapter. And once we have to fix this, why not do it with all the levels, in all the cases? Likewise, if figures and tables are numbered within chapters, it is not that unlikely that expressions like `VIII.10' have to appear in the corresponding list. The width has to be kept track of.
924 %
925 % \begin{macrocode}
926 \InputIfFileExists{\jobname.etd}{}{%
927 \if@errors
928 \ClassWarningNoLine{pittetd}{%
929 No \jobname.etd file. Entering semifinal mode}%
930 \@errorsfalse
931 \fi}
932 \if@errors\else\AtEndDocument{\ClassWarningNoLine{pittetd}{%
933 Remember to run the document with `final' option}}\fi
934 \setlength\@presubs{1\@sectionl}
935 \addtolength\@presubs{1\@chapterl}
936 \setlength\@presubsub{1\@presubs}
937 \addtolength\@presubsub{1\@subsectionl}
938 \newcommand*\l@chapter{%
939 \@dottedtocline{0}{\z@}{\@chapterl}}
940 \newcommand*\l@section{%
941 \@dottedtocline{1}{\@chapterl}{\@sectionl}}
942 \newcommand*\l@subsection{%
943 \@dottedtocline{2}{\@presubs}{\@subsectionl}}
944 \newcommand*\l@subsubsection{%
945 \@dottedtocline{3}{\@presubsub}{\@subsubsectionl}}
946 % \end{macrocode}
947 %
948 %Other parameters:
949 % \begin{macrocode}
950 \setlength\arraycolsep{5\p@}
951 \setlength\tabcolsep{6\p@}
952 \setlength\arrayrulewidth{.4\p@}
953 \setlength\doublerulesep{2\p@}
954 \setlength\tabbingsep{\labelsep}
955 \skip\@mpfootins=\skip\footins
956 \setlength\fboxsep{3\p@}
957 \setlength\fboxrule{.4\p@}
958 \@addtoreset{equation}{chapter}
959 \renewcommand\theequation{\ifnum \c@chapter>\z@
960 \thechapter.\fi\@arabic\c@equation}
961 % \end{macrocode}
962 %
963 %Page style and initialization:
964 % \begin{macrocode}
965 \pagestyle{plain}
966 \pagenumbering{roman}
967 \setcounter{footnote}{0}
968 \let\@openbib@code\@empty
969 % \end{macrocode}
970 %
971 %And just in case some \LaTeX\ commands need to know this:
972 % \begin{macrocode}
973 \@twosidefalse
974 \@mparswitchfalse
975 \@twocolumnfalse
976 % \end{macrocode}
977 %
978 %\subsection{Counters and numbers}
979 %
980 %The issue here is the two kinds of section numbering, 1.1.1.1 or I.A.1.a. In the second case, the headings for each section is \emph{not} to include the `number' of the previous (I. First Chapter; but A. First section). This involves two subtleties concerning cross references in the text: firstly, a reference to `section B' would mean nothing without the chapter `number;' secondly, the `number' bears a final period in headings, but we do not want the period to appear within the text.
981 %
982 %\begin{macro}{\period@or@not}\begin{macro}{\gobble@or@not}This is handled with the |\period@or@not| and |\gobble@or@not| mechanisms. In principle, both commands expand to nothing, but when |\@withperiod| or |\@withgobble| are declared (always locally in a group), they expand to period or to gobble.
983 % \begin{macrocode}
984 \let\period@or@not\relax
985 \def\@withperiod{\def\period@or@not{.}}
986 \let\gobble@or@not\relax
987 \def\@withgobble{\let\gobble@or@not\@gobble}
988 % \end{macrocode}\end{macro}\end{macro}
989 %
990 %\begin{macro}{\thechapter}\begin{macro}{\thesection}\begin{macro}{\thesubsection}\begin{macro}{\thesubsubsection}Now section numbers have to be defined accordingly. A regular call to |\thesubsection|, such as that done by a |\ref| command, for example, will not produce a period nor gobble the previous stuff.
991 % \begin{macrocode}
992 \renewcommand\thechapter{\if@secletters
993 \expandafter\@Roman\c@chapter\period@or@not
994 \else\@arabic\c@chapter\fi}
995 \renewcommand\thesection{\if@secletters
996 \gobble@or@not{\thechapter.}\expandafter\@Alph
997 \c@section\period@or@not
998 \else\thechapter.\@arabic\c@section\fi}
999 \renewcommand\thesubsection{\if@secletters
1000 \gobble@or@not{\thesection.}\@arabic
1001 \c@subsection\period@or@not
1002 \else\thesection.\@arabic\c@subsection\fi}
1003 \renewcommand\thesubsubsection{\if@secletters
1004 \gobble@or@not{\thesubsection.}\@alph
1005 \c@subsubsection\period@or@not
1006 \else\thesubsection.\@arabic\c@subsubsection\fi}
1007 % \end{macrocode}\end{macro}\end{macro}\end{macro}\end{macro}
1008 %
1009 %\begin{macro}{\pdfstringdefPreHook}We also have to instruct |hyperref| how to handle these commands when building a \PDF string. We take the chance to avoid a series of warnings for |\ignorespace|, and also tell about |\acro|, which is defined below.
1010 % \begin{macrocode}
1011 \newcommand\pdfstringdefPreHook{%
1012 \let\acro\relax
1013 \let\ignorespaces\relax
1014 \let\gobble@or@not\@gobble
1015 \def\period@or@not{.}}
1016 % \end{macrocode}\end{macro}
1017 %
1018 %\begin{macro}{\thefigure}\begin{macro}{\thetable}\begin{macro}{\chapterfloats}Next, floating-objects numbering. In principle it is consecutive, but the user might want to make it chapter-dependent. In implementing that option (as |\chapterfloats|), |\thechapter| cannot be used, since the |\period@or@not| would wrongly expand into a period in the bookmarks, creating double periods. And there is no way around it, so we have to use |\c@chapter| directly.
1019 %
1020 %On the other hand, with |\chapterfloats|, floats in the appendices should be numbered `A1,' not `A.1.' This is achieved by using |\if@mainmatter|, since only |\appendix| sets |\@mainmatterfalse|.\index{appendices}
1021 % \begin{macrocode}
1022 \renewcommand\thefigure{\@arabic\c@figure}
1023 \renewcommand\thetable{\@arabic\c@table}
1024 \newcommand\chapterfloats{\@addtoreset{figure}{chapter}%
1025 \@addtoreset{table}{chapter}%
1026 \renewcommand\thefigure{%
1027 \if@mainmatter
1028 \if@secletters
1029 \expandafter\@Roman\c@chapter
1030 \else\@arabic\c@chapter
1031 \fi.%
1032 \else\expandafter\@Alph\c@chapter\fi
1033 \@arabic\c@figure}%
1034 \renewcommand\thetable{%
1035 \if@mainmatter
1036 \if@secletters
1037 \expandafter\@Roman\c@chapter
1038 \else\@arabic\c@chapter
1039 \fi.%
1040 \else\expandafter\@Alph\c@chapter\fi
1041 \@arabic\c@table}}
1042 \@onlypreamble\chapterfloats
1043 % \end{macrocode}\end{macro}\end{macro}\end{macro}
1044 %
1045 %\begin{macro}{\regularenum}Finally, the labels for the four levels of the |enumerate| environment are set. In case the second numbering is used for sections, these labels are set to Roman, Alpha, arabic, alpha.
1046 % \begin{macrocode}
1047 \newcommand\regularenum{%
1048 \renewcommand\theenumi{\@arabic\c@enumi}%
1049 \renewcommand\theenumii{\@alph\c@enumii}%
1050 \renewcommand\theenumiii{\@roman\c@enumiii}%
1051 \renewcommand\theenumiv{\@Alph\c@enumiv}}
1052 \if@secletters
1053 \renewcommand\theenumi{\@Roman\c@enumi}
1054 \renewcommand\theenumii{\@Alph\c@enumii}
1055 \renewcommand\theenumiii{\@arabic\c@enumiii}
1056 \renewcommand\theenumiv{\@alph\c@enumiv}
1057 \else\regularenum\fi
1058 % \end{macrocode}\end{macro}
1059 %
1060 %\subsection{Layout parameters}
1061 %
1062 %This follows closely the standard classes.
1063 % \begin{macrocode}
1064 \setlength\lineskip{1\p@}
1065 \setlength\normallineskip{1\p@}
1066 \setlength\parskip{0\p@ \@plus \p@}
1067 \setlength{\smallskipamount}{%
1068 .25\@singleline \@plus 1\p@ \@minus 1\p@}
1069 \setlength{\medskipamount}{%
1070 .5\@singleline \@plus 2\p@ \@minus 2\p@}
1071 \setlength{\bigskipamount}{%
1072 1\@singleline \@plus 4\p@ \@minus 4\p@}
1073 \@lowpenalty 51
1074 \@medpenalty 151
1075 \@highpenalty 301
1076 \clubpenalty 250
1077 \widowpenalty 250
1078 % \end{macrocode}
1079 %
1080 %But page layout, being fixed here, is set directly and not through options.
1081 % \begin{macrocode}
1082 \setlength\paperwidth{8.5in}
1083 \setlength\textwidth{6.5in}
1084 \setlength\oddsidemargin{\z@}
1085 \setlength\paperheight{11in}
1086 \setlength\textheight{9in}
1087 \setlength\topskip{1\@ptsize \p@}
1088 \setlength\maxdepth{.5\topskip}
1089 \setlength\footskip{.5in}
1090 \setlength\topmargin{\z@}
1091 \setlength\headheight{\z@}
1092 \setlength\headsep{\z@}
1093 \setlength\marginparwidth{\z@}
1094 \setlength\marginparsep{\z@}
1095 % \end{macrocode}
1096 %
1097 %By the way, if the |showidx| package is loaded, we should allow room for |\marginpar|'s (lest a forest of overfull messages populates the |.log| file).
1098 % \begin{macrocode}
1099 \AtBeginDocument{\@ifpackageloaded{showidx}{%
1100 \setlength\marginparwidth{1in}
1101 \setlength\marginparsep{2pt}}{}}
1102 % \end{macrocode}
1103 %
1104 %More layout: this follows the standard classes, with adapted values, and omitting the double-column parameters.
1105 % \begin{macrocode}
1106 \setcounter{topnumber}{2}
1107 \renewcommand{\topfraction}{.5}
1108 \setcounter{bottomnumber}{1}
1109 \renewcommand\bottomfraction{.3}
1110 \setcounter{totalnumber}{3}
1111 \renewcommand\textfraction{.2}
1112 \renewcommand\floatpagefraction{.5}
1113 \setlength{\@fptop}{0\p@ \@plus 1fill}
1114 \setlength{\@fpsep}{8\p@ \@plus 1fill}
1115 \setlength{\@fpbot}{0\p@ \@plus 1fill}
1116 \setlength{\floatsep}{.5\@singleline \@plus \z@ \@minus 10.2\p@}
1117 \setlength{\textfloatsep}%
1118 {1.5\@singleline \@plus \z@ \@minus 10.2\p@}
1119 \setlength{\intextsep}{.5\@singleline \@plus \z@ \@minus 10.2\p@}
1120 \setlength\abovecaptionskip{\@singleline}
1121 \setlength\belowcaptionskip{\@singleline}
1122 % \end{macrocode}
1123 %
1124 %\subsection{Font commands}
1125 %
1126 % \begin{macrocode}
1127 \DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
1128 \DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
1129 \DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
1130 \DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
1131 \DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
1132 \DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl}
1133 \DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc}
1134 \DeclareRobustCommand*\cal{\@fontswitch\relax\mathcal}
1135 \DeclareRobustCommand*\mit{\@fontswitch\relax\mathnormal}
1136 % \end{macrocode}
1137 %
1138 %Here comes the first thing we have to deal with for the |achicago| package, that makes |\emph| behave as |\textsl|, rather than |\textit|. For the use of patches, see section~\ref{patchescode}.
1139 % \begin{macrocode}
1140 %</class>
1141 %<*achicago>
1142 \makeatletter
1143 \@ifundefined{achicago@patch}\relax\endinput
1144 \renewcommand{\emph}[1]{{\itswitch #1}}%
1145 %</achicago>
1146 %<*class>
1147 % \end{macrocode}
1148 %
1149 %\begin{macro}{\acro}The |\acro| command is an adaptation from the one in the |ltugboat| class:
1150 % \begin{macrocode}
1151 \@ifundefined{acro}{%
1152 \DeclareRobustCommand\SMC{%
1153 \ifx\@currsize\normalsize\small\else
1154 \ifx\@currsize\singlesize\small\else
1155 \ifx\@currsize\small\footnotesize\else
1156 \ifx\@currsize\footnotesize\scriptsize\else
1157 \ifx\@currsize\large\normalsize\else
1158 \ifx\@currsize\Large\large\else
1159 \ifx\@currsize\LARGE\Large\else
1160 \ifx\@currsize\scriptsize\tiny\else
1161 \ifx\@currsize\tiny\tiny\else
1162 \ifx\@currsize\huge\LARGE\else
1163 \ifx\@currsize\Huge\huge\else
1164 \small\SMC@unknown@warning
1165 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
1166 }
1167 \newcommand\SMC@unknown@warning{\ClassWarning{pittetd}{%
1168 \string\SMC: unrecognized text font size
1169 command---using \string\small}}
1170 \newcommand\textSMC[1]{{\SMC #1}}
1171 \newcommand\acro[1]{\textSMC{#1}\@}}{}
1172 % \end{macrocode}\end{macro}
1173 %\subsection{Hyperref}
1174 %
1175 %We begin by loading |hyperref|; at the end of the preamble, the proper options are set. Here, the user will already have provided the information for the `Document~Info' dialog box (|\@pdftitle|, |\@author|, etc.). We take pride on \pittetd having created the \PDF file, too.
1176 % \begin{macrocode}
1177 \if@hyper@ref
1178 \AtEndOfClass{%
1179 \usepackage[bookmarks,hyperindex=false]{hyperref}%
1180 \def\@pdfcreator{LaTeX, pittetd class, hyperref package}}
1181 \AtBeginDocument{%
1182 \hypersetup{letterpaper,bookmarksnumbered,%
1183 colorlinks,bookmarksopen,%
1184 linkcolor=blue,citecolor=blue,urlcolor=blue,%
1185 pdftitle=\@pdftitle,pdfauthor=\@author,%
1186 pdfkeywords=\@keywords,%
1187 pdfsubject=\the\subject}}
1188 \fi
1189 % \end{macrocode}
1190 %
1191 %|hyperref| redefines |\maketitle| to implement the special footnotes for |\author| and so on. This is disabled here. Also, the switch |\@hyper@ref| is set to true |\AtBeginDocument|, in case the user has loaded it manually. If |hyperref| is not loaded, |\texorpdfstring| is not defined. Since it could be still used in the document (if it was ever typeset with |hyperref| in mind), we provide a definition it here.
1192 % \begin{macrocode}
1193 \AtBeginDocument{\@ifpackageloaded{hyperref}{%
1194 \let\maketitle\HyOrg@maketitle
1195 \@hyper@reftrue}{%
1196 \@hyper@reffalse
1197 \let\texorpdfstring\@firstoftwo}}
1198 % \end{macrocode}
1199 %
1200 %\subsection{Packages and patches}\label{patchescode}
1201 %
1202 %\begin{macro}{\patch}\begin{macro}{\usewithpatch}A difficult decision about the file extension for the patches. For one thing, an automatic search mechanism required the file name to be the same as the package's. But then extensions like |.clo| or |.def|, already in use by \LaTeX, could very well confuse \pittetd, for it is possible that files called that way, but not designed for the class, are already installed in the system.
1203 % \begin{macrocode}
1204 \newcommand*\patch[1]{\InputIfFileExists{#1.pit}{%
1205 \ClassInfo{pittetd}{Patch for #1 loaded}}{%
1206 \ClassInfo{pittetd}{No patch found for #1}}}
1207 \newcommand*\usewithpatch[2][\@empty]{%
1208 \ifx\@empty#1\usepackage{#2}\else\usepackage[#1]{#2}\fi%
1209 \patch{#2}}
1210 \@onlypreamble\patch
1211 % \end{macrocode}\end{macro}\end{macro}
1212 %
1213 %The patches for the \textsf{pitthesis} and \textsf{pittdiss} classes are given below (section~\ref{pitt}), and serve as illustration.
1214 %
1215 %
1216 %\subsection{Preliminaries}
1217 %
1218 %\subsubsection{Commands for the information}
1219 %
1220 %\begin{macro}{\title}First of all, |\title| has to be redefined for the optional argument, but |\author| remains the same (it |\gdef|'s |\@author| to its argument). However, standard-classes command |\thanks| is disabled here: it gobbles its argument and issues a warning.
1221 %
1222 % \begin{macrocode}
1223 \renewcommand*{\title}[2][\@empty]{%
1224 \gdef\@title{#2}\ifx\@empty#1%
1225 \gdef\@pdftitle{#2}%
1226 \else\gdef\@pdftitle{#1}\fi}
1227 \renewcommand{\thanks}[1]{\ClassWarning{pittetd}{%
1228 The argument of \string\thanks\space has been ignored.}}
1229 % \end{macrocode}\end{macro}
1230 %
1231 %\begin{macro}{\date}For master's theses the committee may be omitted. I conclude that everything concerning the defense may be omitted too. So, \pittetd needs a way to know whether it should typeset the text `It was approved' or not, which means scanning the |\date| to see if it is void. In any case, default value is |\today|.
1232 % \begin{macrocode}
1233 \renewcommand*{\date}[1]{%
1234 \sbox\@tempboxa{\normalfont #1}
1235 \ifnum\wd\@tempboxa>0\global\@dategiventrue
1236 \else\global\@dategivenfalse\fi
1237 \gdef\@date{\ #1\ }}
1238 \edef\today{\ifcase\month\or
1239 January\or February\or March\or April\or May\or June\or
1240 July\or August\or September\or October\or November\or
1241 December\fi\space\number\day, \number\year}
1242 \date{\today}
1243 % \end{macrocode}\end{macro}
1244 %
1245 %\begin{macro}{\year}The year, on the contrary, must be present. Since it is not a standard \LaTeX\ requirement, we provide for the user not having thought of it: it assumes the current year and makes sure to remember that it was not provided.
1246 % \begin{macrocode}
1247 \edef\@year{\number\year}
1248 \renewcommand{\year}[1]{%
1249 \gdef\@year{#1}\@yeargiventrue}
1250 % \end{macrocode}\end{macro}
1251 %
1252 %\begin{macro}{\@degree}\begin{macro}{\@school}And there are many other commands that regular \LaTeX\ never defined. They have to be kept from stopping the run, so we initialize some of values to produce a warning (or error, according to stage).
1253 % \begin{macrocode}
1254 \newcommand\@degree{\@nolinemessage{No \string\degree\space
1255 command}{It is required to list the author's previous
1256 degree(s). Use the \string\degree\space (or \string\previousdegree\space command.}}
1257 \newcommand\@school{\@nolinemessage{No \string\school\space
1258 command}{It is required to name the school (and
1259 optionally the department). Use the \string\school\space
1260 command.}}
1261 \newcommand\@@school{\relax}
1262 % \end{macrocode}\end{macro}\end{macro}
1263 %
1264 %\begin{macro}{\degree}\begin{macro}{\previousdegree}User's commands, if any, will override the previous definitions. |\previousdegree| is useful in case |\degree| is assigned other meaning by a package.
1265 % \begin{macrocode}
1266 \newcommand{\degree}[1]{\gdef\@degree{#1}}
1267 \let\previousdegree\degree
1268 % \end{macrocode}\end{macro}\end{macro}
1269 %\begin{macro}{\school}|\school| defines one thing for the title page, another one for the committee page.
1270 % \begin{macrocode}
1271 \newcommand\school[2][the]{\gdef\@school{#1\ #2}%
1272 \gdef\@@school{\uppercase{#2}}}
1273 % \end{macrocode}\end{macro}
1274 %
1275 %\begin{macro}{\degreesought}\begin{macro}{\subject}\begin{macro}{\keywords}Now the only information missing is the degree sought, already initialized, and `Subject' and `Keywords' for the Document~Info dialog box. The former is best implemented as a token register (the user fills it in if types |\subject{...}|). Both commands should be in the preamble, before |hyperref| builds up the Document~Info.
1276 % \begin{macrocode}
1277 \newcommand\degreesought[1]{\def\@degreesought{#1}}
1278 \newtoks\subject
1279 \def\@keywords{}
1280 \newcommand\keywords[1]{\gdef\@keywords{#1}}
1281 \@onlypreamble\subject
1282 \@onlypreamble\keywords
1283 % \end{macrocode}\end{macro}\end{macro}\end{macro}
1284 %
1285 %\subsubsection{The order}
1286 %
1287 %\begin{macro}{\@enable}\begin{macro}{\@disable}The mechanism by which \pittetd checks that the preliminaries are in the right order is the next: each preliminary `disables' those that cannot be placed afterwards, and `enables' the one or more than can follow. `Disable' and `enable' mean `create the right warning/error:'
1288 % \begin{macrocode}
1289 \newcommand\@enable[2]{%
1290 \global\expandafter\let\csname @#1message\endcsname\relax
1291 \global\@expectedprelim{#2}}
1292 \newcommand\@disable[1]{%
1293 \global\expandafter\def\csname @#1message\endcsname{%
1294 \@linemessage{Something is missing or misplaced.
1295 I was expecting \the\@expectedprelim}{%
1296 The preliminaries should be placed in the next order:
1297 \MessageBreak title, committee, [copyright],
1298 abstract, [preface/foreword], tableofcontents,
1299 [listoftables], [listoffigures].\MessageBreak
1300 \MessageBreak I think something is either missing or
1301 misplaced in your document. I will typeset things in
1302 the given order, but you should double-check.}}}
1303 % \end{macrocode}\end{macro}\end{macro}
1304 %When something is `enabled,' the `expected preliminary' (used by \pittetd when complaining) is changed (it's the second argument to |\@enable|). Note that the enabled preliminaries and expected ones are not necessarily the same, because there are optional preliminaries.
1305 %
1306 %\begin{macro}{\@@disable}A second kind of `disable' (|\@@disable|) is for lists of tables or figures with no tables or figures in it:
1307 % \begin{macrocode}
1308 \newcommand\@@disable[2]{%
1309 \global\expandafter\def\csname @#1message\endcsname{%
1310 \@linemessage{There is no #2}{I have found no #2, so it
1311 makes no sense to me to include a list of them.
1312 Proceed, but expect an ugly heading followed by
1313 nothing...}}}
1314 % \end{macrocode}\end{macro}
1315 %
1316 %So, each preliminary has (and executes) its own |\@...message| command, which is a complaint or a relaxation, according to the enable-status. To initialize these commands, we need to:
1317 % \begin{macrocode}
1318 \@enable{title}{\maketitle}
1319 \@disable{committee}
1320 \@disable{copyright}
1321 \@disable{abstract}
1322 \@disable{preface}
1323 \@disable{table}
1324 \@disable{lof}
1325 \@disable{lot}
1326 \@disable{conv}
1327 % \end{macrocode}
1328 %
1329 %\subsubsection{Bookmarking the preliminaries}
1330 %
1331 %Every preliminary is bookmarked by default. This is done by placing an |\hypertarget| and writing directly into the bookmark file, |\@outlinefile| (the bookmarks of figures and tables are discussed below). Option |nohyperref| turns this off, but in a round-about way: the test is no |\if@hyper@ref|, but |\@ifundefined{@outlinefile}|, because if no driver (|pdftex| or |dvipdfm|) is loaded by the user, |hyperref| will not create bookmarks anyway (it does not know which convention to use).
1332 %
1333 %\subsubsection{The title}
1334 %
1335 %\begin{macro}{\maketitle}
1336 % \begin{macrocode}
1337 \newcommand\maketitle{\@titlemessage
1338 \if@dategiven
1339 \if@yeargiven\else
1340 \ClassWarningNoLine{pittetd}{%
1341 I assumed `\@year' for the year.
1342 You can use \string\year\space to change it}%
1343 \fi
1344 \fi
1345 \@ifundefined{@outlinefile}{}{%
1346 \hypertarget{prelim.0}{}%
1347 \protected@write\@outlinefile{}{%
1348 \protect\BOOKMARK
1349 [0][]{prelim.0}{TITLE PAGE}{}}}
1350 \thispagestyle{empty}%
1351 % \end{macrocode}
1352 %
1353 %I chose to ignore the `8~spaces' kind of stuff. That is more suited for typewriters than for \TeX, and far less robust, for multiple-line things could cause the information to overflow the page if the directions are followed at face value. A large font is used, with an interline spacing of around `2~spaces,' which is what the \FG ask the most for in the title page. But for the `2~spaces' from the the top, a |\vskip| is needed, and |1.3\@singleline| is about right ($\mbox{\cs{@singleline}}\simeq3s/2\Rightarrow4/3\mbox{\cs{@singleline}}\simeq2s$)!
1354 % \begin{macrocode}
1355 {\centering
1356 \fontsize\@xviipt{1.5\@singleline}\selectfont
1357 \null\vskip 1.3\@singleline
1358 {\bfseries\uppercase\expandafter{\@title}}\par
1359 \vfill
1360 by\par
1361 {\bfseries\@author}\par
1362 {\let\noexpand\relax\@degree}\par
1363 \vfill
1364 Submitted to the Graduate Faculty of\par
1365 \@school\ in partial fulfillment\par
1366 of the requirements for the degree of\par
1367 \@degreesought\par
1368 \vfill
1369 University of Pittsburgh\par
1370 \@year\par}
1371 \@enable{committee}{\makecommittee}
1372 % \end{macrocode}
1373 %
1374 %And, to save memory:
1375 % \begin{macrocode}
1376 \global\let\thanks\relax
1377 \global\let\maketitle\relax
1378 \global\let\title\relax
1379 \global\let\author\relax
1380 \global\let\and\relax}
1381 % \end{macrocode}\end{macro}
1382 %
1383 %\subsubsection{The committee page}
1384 %
1385 %\begin{macro}{\@commline}\begin{macro}{\@committee}The interesting thing here is the handling of committee members. First of all, the user shouldn't be asked to count the members---that sounds like a task for \LaTeX---and, second, the advisor could be just the first member mentioned.
1386 % \begin{macrocode}
1387 \def\@commline{\ifhmode\\\else\relax\fi}
1388 \def\committeemember#1{%
1389 \stepcounter{@members}
1390 \@committee\expandafter{\the\@committee#1\@commline}}
1391 % \end{macrocode}\end{macro}\end{macro}
1392 %
1393 %Thus the register |\@committee| is a list of members separated by |\@comline|. The latter expands into |\\| only when the list is actually typeset.
1394 %
1395 %\begin{macro}{\committeepage}Now for the actual page (which is typeset only if the user provided at least one |\committeemember|).
1396 % \begin{macrocode}
1397 \newcommand\makecommittee{\clearpage\@committeemessage
1398 \ifnum\value{@members}>0
1399 \@ifundefined{@outlinefile}{}{%
1400 \hypertarget{prelim.1}{}%
1401 \protected@write\@outlinefile{}{%
1402 \protect\BOOKMARK
1403 [0][]{prelim.1}{COMMITTEE MEMBERSHIP PAGE}{}}}
1404 \@committee\expandafter{\the\@committee\relax}%
1405 {\centering
1406 \normalsize\fontsize\f@size{1.3\@singleline}\selectfont
1407 \null\vskip 1.3\@singleline
1408 UNIVERSITY OF PITTSBURGH\par
1409 \@@school\par
1410 \vfill
1411 This \lowercase\expandafter{\@this} was presented\\
1412 by\\[.67\@singleline]\@author\\[.67\@singleline]
1413 \if@dategiven
1414 It was defended on\\
1415 \@date\\ \else\ClassWarningNoLine{pittetd}{%
1416 You really should provide the date of the defense
1417 (command \string\date)}\fi
1418 \ifnum\value{@members}>1
1419 \if@dategiven and \else It was \fi
1420 approved by\\
1421 \the\@committee
1422 % \end{macrocode}
1423 %
1424 %If more than one member is given, the advisor has yet to be found (the trick is done by |\@getadvisor|, defined below). If not, and the document is a dissertation, \pittetd complains.
1425 % \begin{macrocode}
1426 \expandafter\@getadvisor\the\@committee
1427 \else
1428 \ifx\t@or@d\@phd\@linemessage{Just one committee
1429 member}{For Ph. D. dissertations, the whole committee
1430 must be included. For the moment, I will typeset only
1431 the advisor.}\fi
1432 \vfill\fi
1433 % \end{macrocode}
1434 %However, support for two advisors has to be given.
1435 % \begin{macrocode}
1436 \@this\ \@advisor: \the\@committee\the\@coadv
1437 \vfill
1438 \newpage}
1439 \renewcommand\committeemember[1]{\ClassError{pittetd}{%
1440 Command \string\committeemember\space after
1441 \string\makecommittee}{The new name will just be
1442 ignored.}}
1443 \let\makecommittee\relax
1444 \else\@linemessage{No members for the committee}{%
1445 I will ignore the \string\makecommittee\space command
1446 until you give me some names.}
1447 \fi
1448 \@enable{copyright}{\begin{abstract}}%
1449 \@enable{abstract}{\begin{abstract}}}
1450 % \end{macrocode}\end{macro}
1451 %\begin{macro}{\@getadvisor}When |\@getadvisor| is called, it is followed by the whole committee, names separated by |\@commline|, and all followed by |\relax|. Thus this command can take only the first name. Note that by the moment |\@getadvisor| is called, the whole list of the committee has been typeset already, and that is why it can be redefined. % \begin{macrocode}
1452 \def\@getadvisor#1\@commline#2\relax{\@committee{#1}}
1453 % \end{macrocode}\end{macro}
1454 %
1455 %\begin{macro}{\coadvisor}The |\coadvisor| command simply redefines |\@coadv| (initially void) and |\@advisor|.
1456 % \begin{macrocode}
1457 \newcommand\coadvisor[1]{%
1458 \renewcommand\@advisor{Advisors}%
1459 \@coadv{,\\#1}}
1460 % \end{macrocode}\end{macro}
1461 %
1462 %\subsubsection{Copyright page}
1463 %\begin{macro}{\copyrightpage}
1464 % \begin{macrocode}
1465 \newcommand\copyrightpage{\clearpage\@copyrightmessage
1466 \null\vfill
1467 {\centering\normalsize Copyright
1468 \textcopyright\ by \@author\\\@year\\}%
1469 \vfill\newpage
1470 \@enable{abstract}{\begin{abstract}}}
1471 % \end{macrocode}\end{macro}
1472 %
1473 %\subsubsection{The abstract}
1474 %
1475 %The optional argument is the title for the list of Keywords. The construction has to be done through a switch |\@keywordstrue| because environment arguments can only be used for the opening part. \pittetd appends a period to the list, if it is not already there.
1476 % \begin{macrocode}
1477 \newenvironment{abstract}[1][\@empty]
1478 {\ifx\@empty#1\else\@keywordstrue\def\@tempcsa{#1}\fi
1479 \clearpage\@abstractmessage
1480 \@afterindentfalse
1481 \typeout{Abstract}%
1482 \@ifundefined{@outlinefile}{}{%
1483 \hypertarget{prelim.2}{}%
1484 \protected@write\@outlinefile{}{%
1485 \protect\BOOKMARK
1486 [0][]{prelim.2}{ABSTRACT}{}}}
1487 \null\nobreak\vskip 1in
1488 {\centering\normalfont
1489 {\bfseries\uppercase
1490 \expandafter{\@title}}\\[.3\@singleline]
1491 \@author, \@@@degree\\[.3\@singleline]
1492 University of Pittsburgh, \@year\par}
1493 \par\vspace{1\@singleline}\@afterheading}%
1494 {\if@keywords
1495 \medskip\begin{description}\item[\@tempcsa]\@keywords
1496 {\normalsfcodes\ifnum\spacefactor=\sfcode`.\else.\fi}
1497 \end{description}\fi
1498 \@disable{copyright}%
1499 \newpage\@enable{table}{\tableofcontents}}
1500 \newenvironment{abstract*}[1][\@empty]
1501 {\ifx\@empty#1\else\@keywordstrue\def\@tempcsa{#1}\fi
1502 \clearpage\@abstractmessage
1503 \@afterindentfalse
1504 \typeout{Abstract}%
1505 \@ifundefined{@outlinefile}{}{%
1506 \hypertarget{prelim.2}{}%
1507 \protected@write\@outlinefile{}{%
1508 \protect\BOOKMARK
1509 [0][]{prelim.2}{ABSTRACT}{}}}
1510 \null\nobreak\vskip 1in
1511 {\centering\normalfont
1512 {\bfseries ABSTRACT\\[.3\@singleline]
1513 \uppercase\expandafter{\@title}}\\[.3\@singleline]
1514 \@author, \@@@degree\\[.3\@singleline]
1515 University of Pittsburgh, \@year\par}
1516 \par\vspace{1\@singleline}\@afterheading}%
1517 {\if@keywords
1518 \medskip\begin{description}\item[\@tempcsa]\@keywords
1519 {\normalsfcodes\ifnum\spacefactor=\sfcode`.\else.\fi}
1520 \end{description}\fi
1521 \@disable{copyright}%
1522 \newpage\@enable{table}{\tableofcontents}}
1523 % \end{macrocode}
1524 %
1525 %\subsubsection{The table of contents}
1526 %\begin{macro}{\tableofcontents}
1527 % \begin{macrocode}
1528 \newcommand\tableofcontents{\clearpage\@tablemessage
1529 \typeout{Table of Contents}%
1530 \@ifundefined{@outlinefile}{}{%
1531 \hypertarget{prelim.4}{}%
1532 \protected@write\@outlinefile{}{%
1533 \protect\BOOKMARK
1534 [0][]{prelim.4}{TABLE OF CONTENTS}{}}
1535 }
1536 \null\vskip 1in
1537 {\normalfont\bfseries\centering
1538 TABLE OF CONTENTS\par}
1539 \par\vspace{54\p@}%
1540 {\@withperiod\@withgobble\@starttoc{toc}}%
1541 \if@tables
1542 \@enable{lot}{\listoftables}%
1543 \else
1544 \@@disable{lot}{tables}
1545 \if@figures
1546 \@enable{lof}{\listoffigures}%
1547 \else
1548 \@@disable{lof}{figures}%
1549 \@enable{preface}{the first chapter}%
1550 \@enable{conv}{the first chapter}%
1551 \fi
1552 \fi\@disable{preface}}
1553 % \end{macrocode}\end{macro}
1554 %
1555 %\subsubsection{Bookmarking tables and figures}
1556 %
1557 %So far things have been at most challenging. But when it came to bookmarking the tables and figures, research and hard thinking had to be done. The main problem is that the location (within the bookmarks panel) of the bookmarks for tables and figures does not reflect their location in the document. So the immediate approach, modifying the |figure| and |table| environments to make them append a bookmark, does not work (the bookmarks would be appended in the current position of the panel). On the other hand, modifying those environments clearly invites incompatibilities, so it is only the last resource.
1558 %
1559 %\begin{macro}{\prepare@bookmarks}|hyperref| builds the bookmarks from information contained in the |.out| file. Each sectioning command, for example, appends a bookmark command to this file. So, the only way to get the bookmarks for floats in the right place is to make the |.out| file call another file where the table or figure bookmarks are compiled. At the beginning I thought that the figures and tables (actually, the |\caption| command) would append lines to these additional files. But that involved changing very basic \LaTeX\ commands, and also having to deal with different |hyperref| drivers. And, after all, the information would be basically the same as that already compiled in the |.lot| and |.lof| files. So, the point is to redefine the commands there included to interpret those files in terms of bookmarks. That is what |\prepare@bookmarks| does:
1560 % \begin{macrocode}
1561 \def\prepare@bookmarks#1{%
1562 \def\@prelim{#1}%
1563 \def\numberline##1{##1. }
1564 \let\\\relax
1565 \def\contentsline##1##2##3##4{%
1566 \pdfstringdef\@tempcsa{##2}%
1567 \@expandedBOOKMARK{##4}{\@tempcsa}{prelim.\@prelim}}}
1568 \def\@expandedBOOKMARK#1#2{\edef\reserved@a{%
1569 \noexpand\BOOKMARK[1][-]{#1}{#2}}\reserved@a}
1570 % \end{macrocode}\end{macro}
1571 %
1572 %The |\let|'ting of |\\| to |\relax| is a due to a subtlety with strong bug flavor. When |hyperref| is converting \TeX\ strings into \PDF ones, |\escapechar| is defined to be the |\| character, by means of |\escapechar`\\|. But then, just before reading the bookmarks, |\escapechar| is |\let| to |\@gobble|. So |\escapechar`\\| expands into |\@gobble`\\|, which ultimately renders |\\|. \LaTeX\ then complains that ``\texttt{there is no line here to end}.'' On the other hand, |\@expandedBOOKMARK| is needed because otherwise |#2| (|\@tempcsa|) is not expanded.
1573 %
1574 %But, after this tricky preparation (which of course has to take place within a group), the |.out| line can be instructed to read and interpret the |.lot| and |.lof| files.
1575 %
1576 %\subsubsection{The list of tables}
1577 %
1578 %\begin{macro}{\listoftables}
1579 % \begin{macrocode}
1580 \newcommand\listoftables{\clearpage\@lotmessage
1581 \typeout{List of Tables}%
1582 \@ifundefined{@outlinefile}{}{%
1583 \hypertarget{prelim.5}{}%
1584 \protected@write\@outlinefile{}{%
1585 \protect\BOOKMARK
1586 [0][]{prelim.5}{LIST OF TABLES}{}%
1587 % \end{macrocode}
1588 %Here:
1589 % \begin{macrocode}
1590 \protect\begingroup\protect\makeatletter
1591 \protect\prepare@bookmarks5
1592 \protect\@input{\jobname.lot}
1593 \protect\endgroup}}
1594 \null\vskip 1in
1595 {\normalfont\bfseries\centering
1596 LIST OF TABLES\par}
1597 \par\vspace{54\p@}%
1598 \@starttoc{lot}%
1599 \newpage
1600 \if@figures\@enable{lof}{\listoffigures}\else
1601 \@enable{preface}{the first chapter}%
1602 \@enable{conv}{the first chapter}%
1603 \fi}
1604 % \end{macrocode}\end{macro}
1605 %
1606 %The width for the table numbers in the list depends on the widest float number (|\@floatl|), which is calculated at the end of the job, and written in the |.etd| file. Here it is used:
1607 % \begin{macrocode}
1608 \newcommand*\l@table{\@dottedtocline{1}{1.5em}{\@floatl}}
1609 % \end{macrocode}
1610 %
1611 %\subsubsection{The list of figures}
1612 %
1613 %\begin{macro}{\listoffigures}This is analogous.
1614 % \begin{macrocode}
1615 \newcommand\listoffigures{\clearpage\@lofmessage
1616 \typeout{List of Figures}%
1617 \@ifundefined{@outlinefile}{}{%
1618 \hypertarget{prelim.6}{}%
1619 \protected@write\@outlinefile{}{%
1620 \protect\BOOKMARK
1621 [0][]{prelim.6}{LIST OF FIGURES}{}%
1622 \protect\begingroup\protect\makeatletter
1623 \protect\prepare@bookmarks6
1624 \protect\@input{\jobname.lof}
1625 \protect\endgroup}}
1626 \null\vskip 1in
1627 {\normalfont\bfseries\centering
1628 LIST OF FIGURES\par}
1629 \par\vspace{54\p@}%
1630 \@starttoc{lof}\newpage
1631 \@enable{preface}{the first chapter}%
1632 \@disable{lot}}
1633 \let\l@figure\l@table
1634 % \end{macrocode}\end{macro}
1635 %
1636 %\subsubsection{The preface}
1637 %
1638 %\begin{macro}{\preface}The only difference with other preliminaries is that this makes it into the table of contents. |\addcontents| creates the bookmark automatically.
1639 % \begin{macrocode}
1640 \newcommand\preface{%
1641 \clearpage\@prefacemessage
1642 \@afterindentfalse
1643 \typeout{Preface}%
1644 \addcontentsline{toc}{chapter}{\bfseries PREFACE}
1645 \null\vskip 1in
1646 {\normalfont\bfseries\centering
1647 PREFACE\par}
1648 \par\vspace{1.5\@singleline}
1649 \@enable{conv}{the first chapter}%
1650 \@afterheading}
1651 % \end{macrocode}\end{macro}
1652 %
1653 %\subsubsection{Additional preliminaries}
1654 %\begin{macro}{\preliminarychapter}
1655 % \begin{macrocode}
1656 \newcommand\preliminarychapter[1]{%
1657 \clearpage\@afterindentfalse
1658 \typeout{#1}
1659 \@ifundefined{@outlinefile}{}{%
1660 \hypertarget{prelim.\the\c@@addprel}{}%
1661 \protected@write\@outlinefile{}{%
1662 \protect\BOOKMARK
1663 [0][]{prelim.\the\c@@addprel}{#1}{}}
1664 }%
1665 \null\vskip 1in
1666 {\normalfont\bfseries\centering
1667 #1\par}
1668 \par\vspace{1.5\@singleline}
1669 \@afterheading}
1670 % \end{macrocode}\end{macro}
1671 %
1672 %\subsubsection{Support for other Pitt classes}\label{pitt}
1673 %
1674 %These two patches serve as an illustration of patches in general. The |\@ifundefined| line makes sure the patch is not loaded twice. Of course, the final |\let| is companion. |\makeatletter| and |\makeatother| are a needed security measure.
1675 %
1676 %For \textsf{pitthesis}:
1677 % \begin{macrocode}
1678 %</class>
1679 %<*pitthesis>
1680 \makeatletter
1681 \@ifundefined{pittthesis@patch}{\relax}{\endinput}
1682 \let\degrees\degree
1683 \def\degree#1{\renewcommand\degreesought{#1}}
1684 \let\university\@gobble
1685 \let\proposal\@gobble
1686 \let\advisor\committeemember
1687 \let\coadvisor\committeemember
1688 \newenvironment{acknowledgements}{%
1689 \preliminarychapter{ACKNOWLEDGEMENTS}%
1690 \@linemessage{Acknowledgments should be included in the
1691 preface}{I'm complaining because this comes from the
1692 `pittthesis' class. You haven't been reading my
1693 warnings.}}{\relax}
1694 \newenvironment{committeesignature}[1][5]{\relax}{\makecommittee}
1695 \let\advisorname\@gobble
1696 \let\chairpersonname\@gobble
1697 \let\authortitle\@gobble
1698 \newenvironment{appendices}{\appendix}{\relax}
1699 \newenvironment{singleappendix}{\appendix}{\relax}
1700 \let\pittthesis@patch\@empty
1701 \makeatother
1702 %</pitthesis>
1703 % \end{macrocode}
1704 %
1705 %For \textsf{pittdiss}:
1706 % \begin{macrocode}
1707 %<*pittdiss>
1708 \makeatletter
1709 \@ifundefined{pittdiss@patch}\relax\endinput
1710 \let\disstitle\title
1711 \let\dissauthor\author
1712 \newcommand\diplomaone[1]{\gdef\@degree{#1}}
1713 \newcommand\diplomatwo[1]{\xdef\@degree{%
1714 \@degree\noexpand\noexpand
1715 \noexpand\noexpand\noexpand\noexpand\noexpand\\#1}}
1716 \newcommand\diplomathree[1]{\xdef\@degree{%
1717 \@degree\noexpand\noexpand\noexpand\\#1}}
1718 \newcommand\diplomafour[1]{\xdef\@degree{\@degree\noexpand\\#1}}
1719 \let\university\@gobble
1720 \let\degree\degreesought
1721 \let\degreeabr\@gobble
1722 \let\dissyear\year
1723 \newcommand\dissdate[1]{\date{#1, \@year}}
1724 \let\doctype\@gobble
1725 \newcommand\chair[1]{\@striptitle#1\relax}
1726 \def\@striptitle#1:#2\relax{\committeemember{#2}}
1727 \let\committeetwo\committeemember
1728 \let\committeethree\committeemember
1729 \let\committeefour\committeemember
1730 \let\committeefive\committeemember
1731 \let\committeesix\committeemember
1732 \let\disstitlepage\maketitle
1733 \let\committeepage\makecommittee
1734 \newenvironment{nomenclature}{\preliminarychapter{NOMENCLATURE}
1735 \@linemessage{Nomenclature is not a recognized
1736 preliminary.}{I'm complaining because this comes from the
1737 `pittdiss' class. You haven't been reading my
1738 warnings.}}{\relax}
1739 \let\appendices\appendix
1740 \let\pittdiss@patch\@empty
1741 \makeatother
1742 %</pittdiss>
1743 %<*class>
1744 % \end{macrocode}
1745 %
1746 %\subsection{Sectioning}
1747 %
1748 %\begin{macro}{\@startsection}Section commands in the preliminaries create non-numbered divisions. This initial definition makes it happen:
1749 % \begin{macrocode}
1750 \def\@startsection#1#2#3#4#5#6{%
1751 \if@noskipsec \leavevmode \fi
1752 \par
1753 \@afterindentfalse
1754 \@tempskipa #4\relax
1755 \@tempskipa -\@tempskipa
1756 \if@nobreak
1757 \everypar{}%
1758 \else
1759 \addpenalty\@secpenalty\addvspace\@tempskipa
1760 \fi
1761 \@ifstar
1762 {\ClassWarning{pittetd}{Starred
1763 \expandafter\string\csname #1\endcsname*\space
1764 has been treated as
1765 \expandafter\string\csname #1\endcsname}%
1766 \@ssect{#3}{#4}{#5}{#6}}%
1767 {\@ssect{#3}{#4}{#5}{#6}}}
1768 % \end{macrocode}\end{macro}
1769 %
1770 %\begin{macro}{\@startbody}\begin{macro}{\chapter}When the first |\chapter| appears, it acts also as the starting point of the body of the document: the page numbering is set to arabic, and sectioning commands are redefined.
1771 % \begin{macrocode}
1772 \def\@startbody{%
1773 \pagenumbering{arabic}%
1774 \global\def\@startsection##1##2##3##4##5##6{%
1775 \@getlength{##1}%
1776 \if@noskipsec \leavevmode \fi
1777 \par
1778 \@afterindentfalse
1779 \@tempskipa ##4\relax
1780 \@tempskipa -\@tempskipa
1781 \if@nobreak
1782 \everypar{}%
1783 \else
1784 \addpenalty\@secpenalty\addvspace\@tempskipa
1785 \fi
1786 \@ifstar
1787 {\ClassWarning{pittetd}{Starred
1788 \expandafter\string\csname ##1\endcsname*\space
1789 has been treated as
1790 \expandafter\string\csname ##1\endcsname}%
1791 \@dblarg{\@sect{##1}{##2}{##3}{##4}{##5}{##6}}}%
1792 {\@dblarg{\@sect{##1}{##2}{##3}{##4}{##5}{##6}}}}%
1793 \renewcommand\chapter{\clearpage\global\@topnum\z@
1794 \@afterindentfalse
1795 \@ifstar{%
1796 \ClassWarning{pittetd}{Starred
1797 \string\chapter*\space has been treated as
1798 \string\chapter}%
1799 \@dblarg{\@chapter}}{\@dblarg\@chapter}}}
1800 \newcommand\chapter{\clearpage\@startbody\chapter}
1801 % \end{macrocode}\end{macro}\end{macro}
1802 %
1803 %\subsubsection{Chapters and sections}
1804 %
1805 %\begin{macro}{\@chapter}\begin{macro}{\@@chapter}The actual chapters invoke |\@chapter|. The deferring construction with |\@@chapter| makes sure the chapter's title gets capitalized in the table of contents.
1806 % \begin{macrocode}
1807 \def\@chapter[#1]#2{%
1808 \refstepcounter{chapter}%
1809 \@getlengthchapter
1810 {\@withperiod\typeout{Chapter\space\thechapter}}%
1811 \uppercase{\@@chapter{#1}}%
1812 \null\vskip 1in
1813 {\@withperiod\normalfont\bfseries\centering
1814 \if@mainmatter\thechapter\if@secletters\else.0\fi\quad\fi
1815 \uppercase\expandafter{#2}\par}
1816 \par\vspace{2\@singleline}\@afterheading}
1817 \def\@@chapter#1{\addcontentsline{toc}{chapter}{{\bfseries
1818 \protect\numberline{\thechapter\if@secletters\else.0\fi}#1}}}
1819 % \end{macrocode}\end{macro}\end{macro}
1820 %
1821 %\begin{macro}{\section}\begin{macro}{\subsection}\begin{macro}{\subsubsection}The rest of sectioning commands invoke |\@startsection|. Note that all |\@withperiod|'s and |\@withgobble|'s will be expanded inside a group.
1822 % \begin{macrocode}
1823 \newcommand\section{\@startsection{section}{1}%
1824 {\z@}{-2\@singleline \@plus -1ex \@minus -.2ex}%
1825 {1\@singleline \@plus .2ex}{\@withperiod\@withgobble%
1826 \centering\normalfont\bfseries\expandafter\MakeUppercase}}
1827 \newcommand\subsection{\@startsection{subsection}%
1828 {2}{\z@}{-1\@singleline\@plus -1ex \@minus -.2ex}%
1829 {.5\@singleline \@plus .2ex}%
1830 {\@withperiod\@withgobble\normalfont\expandafter\bfseries}}
1831 \newcommand\subsubsection{\@startsection{subsubsection}%
1832 {3}{\z@}{-1\@singleline \@plus -1ex \@minus -.2ex}%
1833 {-1em}{\@withperiod\@withgobble
1834 \normalfont\expandafter\bfseries}}
1835 % \end{macrocode}\end{macro}\end{macro}\end{macro}
1836 %
1837 %The following are disabled:
1838 % \begin{macrocode}
1839 \let\part\@gobble
1840 \let\paragraph\@gobble
1841 \let\subparagraph\@gobble
1842 % \end{macrocode}
1843 %
1844 %\begin{macro}{\@getlengthchapter}\begin{macro}{\@getlength}Now, |\chapter|'s and |\...section|'s keep track of the widest numbers by means of the following commands:
1845 % \begin{macrocode}
1846 \newcommand\@getlengthchapter{\begingroup\normalfont
1847 \@withgobble\@withperiod
1848 \settowidth\@tempskipa{%
1849 {\bfseries\thechapter\if@secletters\else0\fi}\quad
1850 \mbox{}}%
1851 \ifnum\@tempskipa > \@chapterl
1852 \global\@chapterl =\@tempskipa
1853 \fi
1854 \endgroup}
1855 \newcommand\@getlength[1]{\begingroup\normalfont
1856 \@withgobble\@withperiod
1857 \stepcounter{#1}%
1858 \settowidth\@tempskipa{\csname the#1\endcsname.\ \mbox{}}%
1859 \ifnum\@tempskipa > \csname @#1l\endcsname
1860 \global\csname @#1l\endcsname = \@tempskipa
1861 \fi
1862 \addtocounter{#1}{-1}
1863 \endgroup}
1864 % \end{macrocode}\end{macro}\end{macro}
1865 %
1866 %\subsubsection{Appendices}
1867 %
1868 %\begin{macro}{\appendix}\begin{macro}{\@appendix}\begin{macro}{\@@appendix}Only important thing: keeping track of the number of appendices, done through |@appno|. Minor details: redefinition of |\@currentlabel| to make |\nameref| refer to `{\small APPENDIX}' instead of the title; and redefinition of |\thefigure| and |\thetable| to omit period after the chapter number, in case |\chapterfloats| has been issued.
1869 %
1870 % \begin{macrocode}
1871 \newcommand\appendix{%
1872 \@mainmatterfalse
1873 \setcounter{chapter}{0}%
1874 \setcounter{section}{0}%
1875 \ifnum 2>\value{@appno}
1876 \gdef\thechapter{}%
1877 \gdef\thesection{A.\@arabic\c@section}%
1878 \else
1879 \gdef\thechapter{ \@Alph{\c@chapter}}
1880 \fi
1881 \renewcommand\chapter{\clearpage\global\@topnum\z@
1882 \@afterindentfalse
1883 \protected@write\@auxout{}%
1884 {\string\stepcounter{\string @appno}}%
1885 \@ifstar{%
1886 \ClassWarning{pittetd}{Starred
1887 \string\chapter*\space has been treated as
1888 \string\chapter}%
1889 \@dblarg{\@appendix}}{\@dblarg\@appendix}}
1890 \let\appendix\relax}
1891 \def\@appendix[#1]#2{\refstepcounter{chapter}%
1892 \xdef\@currentlabelname{\appendixname\thechapter}%
1893 \typeout{Appendix\thechapter}%
1894 \uppercase{\@@appendix{#1}}%
1895 \null\vskip 1in
1896 {\normalfont\bfseries\centering
1897 APPENDIX\thechapter\\[2\@singleline]
1898 \uppercase\expandafter{#2}\par}
1899 \par\vspace{2\@singleline}\@afterheading}
1900 \def\@@appendix#1{\addcontentsline{toc}{chapter}{%
1901 {\bfseries APPENDIX\thechapter. #1}}}
1902 % \end{macrocode}\end{macro}\end{macro}\end{macro}
1903 %
1904 %There are no |\...matter| commands in \pittetd.
1905 % \begin{macrocode}
1906 \let\frontmatter\relax
1907 \let\backmatter\relax
1908 \let\mainmatter\relax
1909 % \end{macrocode}
1910 %
1911 %
1912 %\subsection{Floating objects}
1913 %
1914 %The two-column (starred) versions are implemented just for completeness. They might be used if the document is converted from other classes.
1915 % \begin{macrocode}
1916 \def\fps@table{tbp}
1917 \def\ftype@table{1}
1918 \def\ext@table{lot}
1919 \def\fnum@table{Table\nobreakspace\thetable}
1920 \newenvironment{table}
1921 {\global\@tablestrue
1922 \singlespace\@float{table}}{%
1923 % \end{macrocode}
1924 %The following is the main difference with standard classes: the widest label has to be tracked down. This could have been implemented as part of |\@makecaption|, instead of repeated four times here (in addition, there might be figures with no caption, and the test will still run). But I prefer to change here and not there, |\@makecaption| is probably redefined by many packages. |caption2| for one.
1925 % \begin{macrocode}
1926 \end@float
1927 \settowidth\@tempskipa{%
1928 \thetable\ \mbox{}}%
1929 \ifnum\@tempskipa > \@floatl
1930 \global\@floatl = \@tempskipa
1931 \fi}
1932 \newenvironment{table*}
1933 {\global\@tablestrue
1934 \singlespace\@dblfloat{table}}{%
1935 \end@dblfloat
1936 \settowidth\@tempskipa{%
1937 \thetable\ \mbox{}}%
1938 \ifnum\@tempskipa > \@floatl
1939 \global\@floatl = \@tempskipa
1940 \fi}
1941 % \end{macrocode}
1942 % \begin{macrocode}
1943 \def\fps@figure{tbp}
1944 \def\ftype@figure{1}
1945 \def\ext@figure{lof}
1946 \def\fnum@figure{Figure\nobreakspace\thefigure}
1947 \newenvironment{figure}
1948 {\global\@figurestrue
1949 \singlespace\@float{figure}}{%
1950 \end@float
1951 \settowidth\@tempskipa{%
1952 \thefigure\ \mbox{}}%
1953 \ifnum\@tempskipa > \@floatl
1954 \global\@floatl = \@tempskipa
1955 \fi}
1956 \newenvironment{figure*}
1957 {\global\@figurestrue
1958 \singlespace\@dblfloat{figure}}{%
1959 \end@dblfloat
1960 \settowidth\@tempskipa{%
1961 \thefigure\ \mbox{}}%
1962 \ifnum\@tempskipa > \@floatl
1963 \global\@floatl = \@tempskipa
1964 \fi}
1965 % \end{macrocode}
1966 %
1967 %\begin{macro}{\@makecaption}This modified version of |\@makecaption| can be lost if some package redefines it, but it would not hurt much. Only the warning would be lost.
1968 % \begin{macrocode}
1969 \def\@makecaption#1#2{%
1970 \vskip\abovecaptionskip
1971 \sbox\@tempboxa{#1: #2}%
1972 \ifdim \wd\@tempboxa >\hsize
1973 {\let\nobreakspace\space\ClassWarning{pittetd}{%
1974 The caption of #1 is longer than one line}}%
1975 #1: #2\par
1976 \else
1977 \global\@minipagefalse
1978 \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
1979 \fi
1980 \vskip\belowcaptionskip}
1981 % \end{macrocode}\end{macro}
1982 %
1983 %
1984 %\subsection{Lists}
1985 %
1986 % \begin{macrocode}
1987 \setlength\leftmargini\parindent
1988 \leftmargin\leftmargini
1989 \setlength\leftmarginii{2.2em}
1990 \setlength\leftmarginiii{1.87em}
1991 \setlength\leftmarginiv{1.7em}
1992 \setlength\leftmarginv{1em}
1993 \setlength\leftmarginvi{1em}
1994 \setlength\labelsep{.5em}
1995 \setlength\labelwidth{\leftmargini}
1996 \addtolength\labelwidth{-\labelsep}
1997 \setlength\partopsep{\@ptsize\p@ \@plus 1\p@ \@minus 1\p@}
1998 \addtolength\partopsep{1.5\p@}
1999 \@beginparpenalty -\@lowpenalty
2000 \@endparpenalty -\@lowpenalty
2001 \@itempenalty -\@lowpenalty
2002 % \end{macrocode}
2003 % \begin{macrocode}
2004 \def\@listi{\topsep\smallskipamount
2005 \leftmargin\leftmargini
2006 \parsep \z@ \@plus 2\p@
2007 \itemsep \z@ \@plus 2\p@}
2008 \let\@listI\@listi\@listi
2009 \def\@listii{\leftmargin\leftmarginii
2010 \labelwidth\leftmarginii
2011 \advance\labelwidth-\labelsep
2012 \topsep \z@ \@plus 2\p@
2013 \parsep \z@ \@plus\p@
2014 \itemsep \parsep}
2015 \def\@listiii{\leftmargin\leftmarginiii
2016 \labelwidth\leftmariniii
2017 \advance\labelwidth-\labelsep
2018 \topsep \z@ \@plus\p@
2019 \parsep \z@
2020 \itemsep \topsep}
2021 \def\@listiv{\leftmargin\leftmarginiv
2022 \labelwidth\leftmarginiv
2023 \advance\labelwidth-\labelsep}
2024 \def\@listiv{\leftmargin\leftmarginv
2025 \labelwidth\leftmarginv
2026 \advance\labelwidth-\labelsep}
2027 \def\@listiv{\leftmargin\leftmarginvi
2028 \labelwidth\leftmarginvi
2029 \advance\labelwidth-\labelsep}
2030 % \end{macrocode}
2031 % \begin{macrocode}
2032 \newcommand\labelenumi{\theenumi.}
2033 \newcommand\labelenumii{\theenumii.}
2034 \newcommand\labelenumiii{\theenumiii.}
2035 \newcommand\labelenumiv{\theenumiv.}
2036 % \end{macrocode}
2037 % \begin{macrocode}
2038 \newcommand\labelitemi{\textbullet}
2039 \newcommand\labelitemii{\normalfont\bfseries\textendash}
2040 \newcommand\labelitemiii{\textasteriskcentered}
2041 \newcommand\labelitemiv{\textperiodcentered}
2042 % \end{macrocode}
2043 % \begin{macrocode}
2044 \newenvironment{description}
2045 {\list{}{\labelwidth\z@ \itemindent-\leftmargin
2046 \let\makelabel\descriptionlabel}}
2047 {\endlist}
2048 \newcommand*\descriptionlabel[1]{%
2049 \hspace\labelsep\normalfont\bfseries #1}
2050 % \end{macrocode}
2051 %
2052 %\subsection{Miscellaneous environments}
2053 %
2054 % \begin{macrocode}
2055 \newenvironment{verse}
2056 {\let\\\@centercr
2057 \list{}{\itemsep \z@
2058 \itemindent -1.5em
2059 \listparindent\itemindent
2060 \rightmargin\leftmargin
2061 \advance\leftmargin 1.5em}
2062 \item\relax}
2063 {\endlist}
2064 % \end{macrocode}
2065 %
2066 %Since |quotation| and |quote| are redefined (against \FG) by the |achicago| package, we must include the following definitions in the patch.
2067 % \begin{macrocode}
2068 \newenvironment{quotation}\relax\relax
2069 \newenvironment{quote}\relax\relax
2070 %</class>
2071 %<*class|achicago>
2072 \renewenvironment{quotation}
2073 {\list{}{\topsep\medskipamount
2074 \listparindent 1.5em\relax
2075 \itemindent \listparindent
2076 \rightmargin \leftmargin
2077 \parsep \z@ \@plus\p@}
2078 \item\small\relax}
2079 {\endlist}
2080 \renewenvironment{quote}
2081 {\list{}{\topsep\medskipamount
2082 \rightmargin\leftmargin}%
2083 \item\relax\small}
2084 {\endlist}
2085 %</class|achicago>
2086 %<*class>
2087 % \end{macrocode}
2088 %
2089 %\subsection{Footnotes}
2090 %
2091 % \begin{macrocode}
2092 \renewcommand\footnoterule{%
2093 \kern-3\p@
2094 \hrule\@width.3\columnwidth
2095 \kern2.6\p@}
2096 \@addtoreset{footnote}{chapter}
2097 \newcommand\@makefntext[1]{%
2098 \parindent 1em%
2099 \noindent
2100 \hb@[email protected]{\hss\@makefnmark}#1}
2101 % \end{macrocode}
2102 %
2103 %\subsection{Bibliography}
2104 %
2105 %The |thebibliography| environment calls for |\@safebibliography|, which takes care of the heading, bookmark, spacing, etc.
2106 % \begin{macrocode}
2107 \newenvironment{thebibliography}[1]{%
2108 \@safebibliography
2109 \list{\@biblabel{\@arabic\c@enumiv}}%
2110 {\settowidth\labelwidth{\@biblabel{#1}}%
2111 \leftmargin\labelwidth
2112 \advance\leftmargin\labelsep
2113 \@openbib@code
2114 \usecounter{enumiv}%
2115 \let\p@enumiv\@empty
2116 \renewcommand\theenumiv{\@arabic\c@enumiv}}%
2117 \sloppy
2118 \clubpenalty4000
2119 \@clubpenalty \clubpenalty
2120 \widowpenalty4000%
2121 \sfcode`\.\@m}
2122 {\def\@noitemerr{\@latex@warning{Empty
2123 `thebibliography' environment}}%
2124 \endlist}
2125 % \end{macrocode}
2126 %
2127 %\begin{macro}{\@safebibliography}The spacing within entries is |\singlespacing|. Between entries, |\itemsep| applies.
2128 % \begin{macrocode}
2129 \newcommand\@safebibliography{%
2130 \renewcommand\chapter{\@ifstar{\@gobble}{\@gobble}}%
2131 \renewcommand\section{\@ifstar{\@gobble}{\@gobble}}%
2132 \renewcommand\@mkboth[2]{\relax}%
2133 \clearpage\null\vskip 1in
2134 \typeout{\bibname}%
2135 \@ifundefined{@outlinefile}{}{\phantomsection}%
2136 \addcontentsline{toc}{chapter}{{\bfseries\protect\bibname}}%
2137 {\normalfont\bfseries\centering\bibname\par}%
2138 \par\vspace{2\@singleline}%
2139 \singlespace
2140 \let\@listi\@listI
2141 \setlength{\itemsep}{.5\@singleline \@plus 4\p@}%
2142 \def\@listi{\topsep\z@
2143 \leftmargin\leftmargini
2144 \parsep \z@ \@plus 2\p@
2145 \itemsep .5\@singleline \@plus 2\p@}
2146 \@afterheading
2147 \let\@safebibliography\relax}
2148 % \end{macrocode}\end{macro}
2149 %
2150 %\begin{macro}{\safebibliography}|\@safebibliography| is also used by |\safebibliography|.
2151 % \begin{macrocode}
2152 \newcommand\safebibliography{\@safebibliography\bibliography}
2153 \newcommand\newblock{\hskip .11em\@plus.33em\@minus.07em}
2154 % \end{macrocode}\end{macro}
2155 %
2156 %The |natbib| package handles the spacing not with |\itemsep|, but with the new |\bibsep|. As far as I know, this is the only thing we need to make the package work, so it is done here rather than in a patch.
2157 % \begin{macrocode}
2158 \AtBeginDocument{\@ifundefined{bibsep}{}{%
2159 \setlength{\bibsep}{.5\@singleline \@plus 4\p@}}}
2160 % \end{macrocode}
2161 %
2162 %Support for the |achicago| package, on the contrary, goes to a patch:
2163 % \begin{macrocode}
2164 %</class>
2165 %<*achicago>
2166 \renewenvironment*{thebibliography}{%
2167 \@safebibliography
2168 \begin{list}{}{%
2169 \leftmargin\z@
2170 \advance\leftmargin\labelsep
2171 \advance\leftmargin\bibindent
2172 \itemindent -\bibindent
2173 \listparindent \itemindent
2174 \parsep \z@
2175 \itemsep .5\@singleline \@plus 4\p@}
2176 \sfcode`\.=\@m
2177 \let\@biblabel\Gobble
2178 \sloppy
2179 \clubpenalty4000 \widowpenalty4000
2180 }{%
2181 \def\@noitemerr{\@latex@warning{Empty
2182 `thebibliography' environment}}%
2183 \relax\end{list}}
2184 \let\achicago@patch\@empty
2185 \makeatother
2186 %</achicago>
2187 %<*class>
2188 % \end{macrocode}
2189 %
2190 %\subsubsection{The index}
2191 %
2192 % \begin{macrocode}
2193 \newenvironment{theindex}{%
2194 \clearpage\typeout{\indexname}%
2195 \@ifundefined{@outlinefile}{}{\phantomsection}%
2196 \addcontentsline{toc}{chapter}{{\bfseries\protect\indexname}}%
2197 \twocolumn[\null\vskip 1in{\normalfont\bfseries\centering
2198 \indexname\par}\par\vspace{2\@singleline}]%
2199 \thispagestyle{plain}\parindent\z@
2200 \columnseprule \z@
2201 \columnsep 35\p@
2202 \parskip\z@ \@plus .3\p@\relax
2203 \small
2204 \let\item\@idxitem}
2205 {\clearpage}
2206 \newcommand\@idxitem{\par\hangindent 40\p@}
2207 \newcommand\subitem{\@idxitem \hspace*{20\p@}}
2208 \newcommand\subsubitem{\@idxitem \hspace*{30\p@}}
2209 \newcommand\indexspace{\par\vskip10\p@ \@plus5\p@ \@minus3\p@
2210 \relax}
2211 % \end{macrocode}
2212 %
2213 %\subsection{The \texttt{.etd} file}
2214 %
2215 %The \LaTeX\ run of the document has carefully taken note of certain values for the next run. It is now time to write them down in the |.etd| file.
2216 % \begin{macrocode}
2217 \AtEndDocument{\immediate\openout\@etdaux=\jobname.etd
2218 \if@tables
2219 \immediate\write\@etdaux{\string\@tablestrue}
2220 \fi
2221 \if@figures
2222 \immediate\write\@etdaux{\string\@figurestrue}
2223 \fi
2224 \immediate\write\@etdaux{%
2225 \string\setlength{\string\@chapterl}{\the\@chapterl}}
2226 \immediate\write\@etdaux{%
2227 \string\setlength{\string\@sectionl}{\the\@sectionl}}
2228 \immediate\write\@etdaux{%
2229 \string\setlength{\string\@subsectionl}{\the\@subsectionl}}
2230 \immediate\write\@etdaux{%
2231 \string\setlength{\string\@subsubsectionl}{\the\@subsubsectionl}}
2232 \immediate\write\@etdaux{%
2233 \string\setlength{\string\@floatl}{\the\@floatl}}
2234 \immediate\closeout\@etdaux}
2235 % \end{macrocode}
2236 %
2237 %And that is it.
2238 %\IndexPrologue{\section*{Index}\addcontentsline{toc}{section}{Index} Numbers written in italics refer to the page where the corresponding entry is described. A list of mentioned packages is found under `packages mentioned;' of environments under `environments;' of \pittetd options under `\pittetd.' For commands, numbers in regular font refer to code lines, and to the line of the definition if underlined.}
2239 %\PrintIndex