University of Utah Dissertation Class
From charlesreid1
University of Utah Thesis Class
This document describes how to utilize the University of Utah Thesis Class to write your University of Utah dissertation in LyX. The procedure described has been confirmed to work on both Windows and Mac.
You can download the class file here:
You can download the layout file here:
You can download the example LyX file illustrating use of the dissertation class here:
Introduction
This document assumes you have a working knowledge of both TeX/LaTeX and LyX, and a working, up-to-date copy installed on your system. At the time of this writing, that was LyX 2.0.1. See http://www.lyx.org for a copy, or google "mactex" if you need a tex distribution on your computer.
You can also visit my LaTeX page and my LyX page. I wrote up a detailed guide on how I figured out how to meet the absurd requirements of the thesis office.
This document has two parts.
First, there is a guide on how to use it in your dissertation LyX file and recognized by LaTeX.
Second, there is an example LyX file, and an explanation of the exmaple file.
These two parts are woven together, so each step of the user guide is illustrated with the example LyX file.
Usage Guide
Before You Begin
As mentioned in the introduction, it is assumed you have a TeX distribution and LyX installed on your machine.
To use the University of Utah thesis class, you will first need to download all of the necessary files:
- Thesis class file: http://files.charlesmartinreid.com/cmr_uuthesis.cls
- Example LyX file: http://files.charlesmartinreid.com/dissertation_class_example.lyx
To use the class file, you can tell LyX to use a local layout by going to "Document > Settings..." and clicking the "Local Layout" button. Then browse to find the file "cmr_uuthesis.layout". I recommend putting it in the same directory as your LyX file.
Macros
A couple of LaTeX macros define some important things, like who is on your committee and such. The important ones are included in the example file. You can add straight TeX into a LyX document by picking "Insert > TeX Code...". Use this to put macros into your dissertation. Also, see the example file.
Title and Author
You'll have to enter the title of the dissertation in all caps, but that's just about the only tricky thing you'll have to do for the title and author.
Front Matter
There are more LaTeX macros after the title and author, but these macros actually insert pages (as opposed to just defining important things).
The order of these pages is dictated by the University of Utah Thesis Office. See the dissertation handbook on the University of Utah Thesis Office web page for more info.
Table of Contents, List of Tables and Figures
There is some code before the table of contents that dictates the level of information displayed in the table of contents:
% Set the depth of the Table of Contents numbering
\setcounter{tocdepth}{1}
% 0 = chapter titles only
% 1 = chapter & section titles
% 2 = chapter, section, & subsection titles
% etc.
The Table of Contents is required. The List of Figures and List of Tables is only required if you have LESS THAN 25 ITEMS in each list. If you have more than 25 items in either of these lists, that list is optional.
Start of the Document
The document begins with \body in this block of text:
\body
\parindent 2em
\parskip 0pt
% This fixes some problems with equation spacing
\setlength{\abovedisplayskip}{0pt}
\setlength{\abovedisplayshortskip}{0pt}
\setlength{\belowdisplayskip}{15pt}
\setlength{\belowdisplayshortskip}{15pt}
As with any dissertation, I had to include some kludges to get this class to work (these four lines are a kludge for equation spacing). Fortunately there were very few kludges required.
Document Settings
There are a couple of things to address in the document settings, reached by picking "Document > Settings...".
Class Options
There are a couple of class options for this class, but nothing too fancy. To set class options, pick "Document Class" on the left-hand side of the Document Settings window.
First, you can set your department. Only "che" is provided, so if you want to add a different department, search the LaTeX class file for "che" or "chemical engineering", and add your own option (e.g. "ee" for electrical engineering, etc.)
Second, "dissertation" specifies that this is a Ph.D. dissertation. My LaTeX class was originally ported from a LaTeX class that also allowed for Masters theses, but I cut out all of that because it was not useful to me.
There is also a "twoside" option, which will print a two-sided dissertation; otherwise, it will print everything one-sided. Keep this in mind for the page numbering - one-sided puts the page numbers all in the upper right corner, while two-sided puts the page numbers in alternating top left and top right.
Bibliography
Pick "Bibliography" on the left-hand side of the Document Settings window. I left the "default (numerical)" option selected.
PDF Properties
Unfortunately, the hyperref package is inexplicably broken sometimes for this class, so you'll have to test it out on your document to see if it works. Otherwise, leave it disabled.
Math Options
I checked the "Use AMS math/esint/mathdots/mhchem package automatically" options. I recommend you check any options that are available.
Files
- Thesis class file: http://files.charlesmartinreid.com/cmr_uuthesis.cls
- Example LyX file: http://files.charlesmartinreid.com/dissertation_class_example.lyx
Debugging
Specific Issues
Title should be double-spaced
You can do this by adding a \begin{doublespace} and \end{doublespace} around \uppercase{\Ztitle}
Then it should look like this:
\renewcommand*{\maketitle}%
{{
\thispagestyle{empty}%
\noindent\hspace{1em}%
%\begin{minipage}[c]{\minilength}%
\begin{center}%
\vbox to 9\baselineskip{
\vfil
\HFmainhead\bf
\begin{doublespace}
\uppercase{\Ztitle}
\end{doublespace}
\vfil
}%end vbox
Fix spacing between chapter and quote, or quote and text, to be triple space
First I had to figure out what "triple space" means, precisely. I looked at Abstract page, and there was exactly 0.5 inches between Abstract title and abstract text. However, when I changed the quote environment to have 0.5 inches of space, it automatically added some space to that, so I had to reduce 0.5 to 0.3.
First, add 0.3 in vertical space after the quote environment:
% Add 0.5in of extra space after Quote environment
% to make it triple-spaced
\renewenvironment{quote}{%
% before
}{%
% after
%% triple space, the charles way
\vskip 0.30in
}
And second, add 0.35 in vertical space after the chapter environment:
%% triple space, the charles way
\vspace{0.35in}
2 or more lines required to be under a subheading at end of page
This is controlled with widow and orphan settings. The following can be added in the LyX file in the area that's having problems, using straight TeX code. Alternatively, this could be set in the class file somewhere, but when I tried to do this, it didn't have any effect.
% minimize orphans and widows
\clubpenalty=999999999
\widowpenalty=999999999
\displaywidowpenalty=9999
\brokenpenalty=9999
Spaces between words on wrapped section headers are stretched too wide
When a section title is too long for a single line, LaTeX will wrap it, but will also try and justify it by increasing the spacing between all of the words. This can look really ugly, and the thesis editor doesn't like it.
There are two solutions:
1) case-by-case fix
\begin{flushleft}
Section 8: Title of Section
\end{flushleft}
Note that the flushleft commands must be verbatim tex code, and they must occur BEFORE and AFTER the line that contains the section. That is, when you look at the format drop down box in the upper left hand corner of LyX, it should not say "Section" for those two blocks of Tex code.
2) fix to "inverted pyramid" function
The alternative is to change the "inverted pyramid" function (defined elsewhere in the thesis class) to exclude the following two lines:
%\parfillskip=0pt plus1fil
%\emergencystretch=1in
Fix the big dumb spaces that occur between enumerated or itemized lists
This fix took me forever to figure out.
\usepackage{enumitem}
\setlist{nolistsep}
% no big dumb spaces inbetween list items
\let\oldenumerate=\enumerate
\def\enumerate{%
%\vspace{-5mm}
\oldenumerate%
\setlength{\itemsep}{0pt}%
\setlength{\parskip}{-1pt}%
}
% no big dumb spaces inbetween list items
\let\olditemize=\itemize
\def\itemize{%
\olditemize%
\setlength{\itemsep}{0pt}%
\setlength{\parskip}{-1pt}%
}
Figures should not be, but are, placed in middle of text
Change figure placement by right-clicking the figure float and picking settings. Placement should be changed from "here if possible" to "top of page" or "bottom of page."
Triple space needed between title heading and section heading (and quotes)
Fixed by adding vertical space to the end of quote environment.
Quote environment: only quotes at beginning of chapter.
Quotation environment: only quotations in text.
Need two or more lines underneath subheads at bottom of pages
Problem was with Section 2.3.1: Quadrature Approximation.
This is what windows and orphans are all about: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=widows
Solution: put
widowpenalty 100000
in a block of TeX code just before the problematic section. For some reason this isn't always pervasive, so forcing it to go at the beginning of a section helps make sure it is enforced.