texlive[60331] Master/texmf-dist: ut-thesis (26aug21)

commits+karl at tug.org commits+karl at tug.org
Thu Aug 26 23:26:10 CEST 2021


Revision: 60331
          http://tug.org/svn/texlive?view=revision&revision=60331
Author:   karl
Date:     2021-08-26 23:26:10 +0200 (Thu, 26 Aug 2021)
Log Message:
-----------
ut-thesis (26aug21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/ut-thesis/README
    trunk/Master/texmf-dist/doc/latex/ut-thesis/ut-thesis.pdf
    trunk/Master/texmf-dist/source/latex/ut-thesis/ut-thesis.dtx
    trunk/Master/texmf-dist/tex/latex/ut-thesis/ut-thesis.cls

Modified: trunk/Master/texmf-dist/doc/latex/ut-thesis/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/ut-thesis/README	2021-08-26 21:25:34 UTC (rev 60330)
+++ trunk/Master/texmf-dist/doc/latex/ut-thesis/README	2021-08-26 21:26:10 UTC (rev 60331)
@@ -6,7 +6,7 @@
 
 Copyright (c) 1998-2013 Francois Pitt <fpitt at cs.utoronto.ca>,
               2020-2021 Jesse Knight <jesse.knight at mail.utoronto.ca>
-last updated at 23:30 (EST) on Tue 20 July 2021
+last updated at 13:00 (EST) on Thu 26 Aug 2021
 
 This work may be distributed and/or modified under the conditions of
 the LaTeX Project Public Licence, either version 1.3c of this licence

Modified: trunk/Master/texmf-dist/doc/latex/ut-thesis/ut-thesis.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/ut-thesis/ut-thesis.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/ut-thesis/ut-thesis.dtx	2021-08-26 21:25:34 UTC (rev 60330)
+++ trunk/Master/texmf-dist/source/latex/ut-thesis/ut-thesis.dtx	2021-08-26 21:26:10 UTC (rev 60331)
@@ -5,7 +5,7 @@
 %<class>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
 %<class>\ProvidesClass{ut-thesis}
 %<*class>
-[2021/07/20 v3.0.5 University of Toronto thesis class]
+[2021/08/26 v3.1.5 University of Toronto thesis class]
 %</class>
 %
 %<*driver>
@@ -20,13 +20,10 @@
 \let\ottfamily\ttfamily
 \renewcommand{\ttfamily}{\color{code}\ottfamily}
 \renewcommand{\MacroFont}{\ttfamily\color{code}}
-\usepackage[colorlinks,linkcolor=link]{hyperref}
+\usepackage[colorlinks,linkcolor=link,urlcolor=link]{hyperref}
 \setlength{\skip\footins}{4ex}
 \setlength{\parindent}{0pt}
 \setlength{\parskip}{6pt}
-\newcommand{\smacro}[2][0]{%
-  \begin{macro}{#2}\end{macro}%
-  \vspace{\dimexpr #1\baselineskip-3\baselineskip}}
 \begin{document}
   \DocInput{ut-thesis.dtx}
 \end{document}
@@ -65,7 +62,7 @@
 % There are two ways to do this:
 % \begin{itemize}
 %   \item \textbf{local file}: Place the file |ut-thesis.cls| in your project directory.
-%         This is usually easiest, and works if you don't have write access
+%         This works if you don't have write access
 %         in the \LaTeX\ distribution, such as if you use Overleaf.
 %   \item \textbf{installing}: Installation steps will depend on your \LaTeX\ distribution.
 %         Some helpful instructions can be found
@@ -84,72 +81,68 @@
 %
 % The default class options are denoted like |option*|.
 %
-% \subsubsection{Paper Size}\label{use:opt:paper}
-%
-% The standard page sizes are supported, including:
-% |[letterpaper*]|, and |[a4paper]|.
-%
 % \subsubsection{Font Size}\label{use:opt:fontsize}
 %
-% \smacro[ 1]{[10pt*]}
-% \smacro[ 1]{[11pt]}
-% \smacro[-2]{[12pt]}
-% \begin{macro}{]}
+% \begin{macro}{[10pt*]}
+% \begin{macro}{[11pt]}
+% \begin{macro}{[12pt]}
 %   The three standard font sizes are supported.
 %   SGS requires at least 10\,pt font for the text,
 %   but captions, footnotes, etc.\ can be smaller.
 % \end{macro}
+% \end{macro}
+% \end{macro}
 %
 % \subsubsection{Line Spacing}\label{use:opt:spacing}
 %
-% \smacro[ 1]{[singlespacing]}
-% \smacro[ 1]{[onehalfspacing*]}
-% \smacro[-2]{[doublespacing]}
-% \begin{macro}{]}
+% \begin{macro}{[singlespacing]}
+% \begin{macro}{[onehalfspacing*]}
+% \begin{macro}{[doublespacing]}
 %   Three options are available for line spacing.
 %   Note that |[singlespacing]| does not conform to the SGS guidelines,
 %   but we provide it in case you ever prefer it while writing.
 % \end{macro}
+% \end{macro}
+% \end{macro}
 %
 % \subsubsection{Margins}\label{use:opt:margins}
 %
-% \paragraph{Sides:}
-% Three variants of margins are defined,
-% reflecting preferences for printing and binding,
-% the first two being the same as in the |book| class:
+% We aim to support both digital and print copies of the thesis,
+% with two aspects affected:
+% \begin{enumerate}
+%   \item whether margins are equal (digital) or unequal (print),
+%         where unequal margins include a wider inner margin for binding
+%   \item whether pages will be printed on one or both sides,
+%         essentially only relevant for print copies
+% \end{enumerate}
 %
-% \begin{macro}{[oneside]}
-%   All pages behave as if they open to the right (wider left margin).
+% \begin{macro}{[equalmargins*]}
+%   The inner and outer margins are averaged
+%   to keep the |\textwidth| consistent with the |[unequalmargins]| option.
 % \end{macro}
 %
-% \begin{macro}{[twoside*]}
-%   Most pages will alternate opening to the right and left;
-%   however, the commands: |\maketitle|, |\begin{abstract}| and |\mainmatter|,
-%   which create new pages, will always open to the right,
-%   sometimes requiring a blank page before to do so.
+% \begin{macro}{[unequalmargins]}
+%   The outer margin is equal to the top and bottom margins;
+%   the inner margin is 0.50~inches wider than the outer margin.
 % \end{macro}
 %
-% \begin{macro}{[equalmargins]}
-%   The left and right margins are equal (averaged);
-%   all pages behave as if they open to the right.
+% \begin{macro}{[oneside*]}
+%   All pages behave as if they open to the right (wider left margin);
+%   no extra blank pages.
 % \end{macro}
 %
-% \paragraph{Opening:}
-% Only if |[twoside]| is used, two additional options from the |book| class
-% control how other new pages will open, including new pages created by:
-% |\listoftables|, |\listoffigures|, and |\chapter{}|.
-%
-% \begin{macro}{[openright*]}
-%   These pages will always open to the right (like |\maketitle|, etc.).
+% \begin{macro}{[twoside]}
+%   Most pages will alternate opening to the right and left;
+%   however, some commands which create new pages
+%   will always open to the right,
+%   sometimes requiring a blank page before to do so.
+%   See the |book| class for more information, as well as
+%   details about the |[openright*]| and |[openany]| options.
 % \end{macro}
 %
-% \begin{macro}{[openany]}
-%   These pages can open to the left or right.
-% \end{macro}
-%
-% \paragraph{Widths:}
 % Four widths of margins are defined based on
-% the inner (left) and outer (right/top/bottom) dimensions:
+% the inner (left) and outer (right/top/bottom) dimensions.
+% If |[equalmargins]| is used, the left/right margins are averaged.
 %
 % \begin{macro}{[narrowmargins]}
 %   Inner: 1.25 inch; outer: 0.75 inch
@@ -165,12 +158,12 @@
 %   Inner: 2.00 inch; outer: 1.50 inch
 % \end{macro}
 %
-% \subsubsection{Draft}\label{use:opt:draft}
+% \subsubsection{Book Options}\label{use:opt:book}
 %
-% \begin{macro}{[draft]}
-%   Adds ``DRAFT'' to all 4 corners, plus the date centered below the footer.
-%   The default |draft| behaviour for the |book| class is also supported.
-% \end{macro}
+% This class inherits from the standard \LaTeX\ |book| class,
+% so all other |book| options are processed by that class.
+% Two caveats are that |[titlepage]|/|[notitlepage]| have no effect and
+% |[twocolumn]| has undefined behaviour.
 %
 % \subsection{Commands}\label{use:cmd}
 %
@@ -177,7 +170,8 @@
 % \subsubsection{Author Information}\label{use:cmd:author}
 %
 % The following 5 commands should be used in the preamble
-% to define the content of the titlepage (|\maketitle|) and abstract page (|abstract| environment).
+% to define the content of the titlepage (|\maketitle|)
+% and abstract page (|abstract| environment).
 %
 % \begin{macro}{\author}
 %   Your full name.
@@ -191,14 +185,17 @@
 %   The title of your degree (spelled out, like ``Doctor of Philosophy'' not ``PhD'').
 % \end{macro}
 %
+% \begin{macro}{\gradyear}
+%   The year of your degree completion.
+% \end{macro}
+%
 % \begin{macro}{\department}
 %   The name of your department.
+%   The optional first argument (|\department[this]{}|)
+%   can be used to replace or leave blank
+%   the default text ``Department of'' preceeding the department name.
 % \end{macro}
 %
-% \begin{macro}{\gradyear}
-%   The year of your degree completion.
-% \end{macro}
-%
 % If undefined, template values are used like ``(author)''.
 %
 % \subsubsection{Document Parts}\label{use:cmd:parts}
@@ -272,14 +269,14 @@
 % \subsubsection{Dedication \& Acknowledgements}\label{use:env:ded-ackn}
 %
 % \begin{macro}{dedication}
-%   The |dedication| environment formats text flush right and 2/3 down a new page.
-%   Not necessary for SGS requirements, so you're welcome to redefine this environment.
+%   The |dedication| environment formats text flush right and 1/3 down a new page.
+%   Not necessary for SGS requirements, so you can redefine this environment.
 % \end{macro}
 %
 % \begin{macro}{acknowledgements}
 %   The |acknowledgements| environment creates a centered heading using |\section*{}|,
 %   and a new page after the text.
-%   Not necessary for SGS requirements, so you're welcome to redefine this environment.
+%   Not necessary for SGS requirements, so you can redefine this environment.
 % \end{macro}
 %
 % \subsubsection{Base Environments}\label{use:env:misc}
@@ -298,81 +295,75 @@
 %
 % \section{Implementation}\label{imp}
 %
-% \subsection{Option Declaration}\label{imp:opt}
+% \subsection{Margin Math}\label{imp:margins}
 %
-% \subsubsection{Draft Mode}\label{imp:opt:draft}
-% Specifying |draft| adds ``DRAFT'' to all 4 corners,
-% plus the date centered below the footer.
-% The default |draft| behaviour for the |book| class is also supported.
-%    \begin{macrocode}
-\newcommand{\draftmarkstyle}{\scriptsize\sffamily}
-\DeclareOption{draft}{%
-  \PassOptionsToClass{\CurrentOption}{book}
-  \AtEndOfClass{
-    \AtBeginShipout{\AtBeginShipoutUpperLeft{%
-      \draftmarkstyle
-      \put(+0.125in,            -0.125in-\f at size pt  ){\rlap{DRAFT}}
-      \put(-0.125in+\paperwidth,-0.125in-\f at size pt  ){\llap{DRAFT}}
-      \put(+0.125in,            +0.125in-\paperheight){\rlap{DRAFT}}
-      \put(-0.125in+\paperwidth,+0.125in-\paperheight){\llap{DRAFT}}
-      \put(+0.5\paperwidth,+0.125in-\paperheight)%
-        {\makebox[0in][c]{\today}}
-}}}}
-%    \end{macrocode}
+% First, we define a boolean |margins at equal| to store
+% whether margins should be equal or not, plus
+% two lengths to help us compute the margins:
+% |\margin at base| is the minimum used directly for the top and bottom, and
+% |\margin at offset| is the difference between inner/outer margins
+% if they are not equal.
 %
-% \subsubsection{Margins}\label{imp:opt:margins}
-% First, we define three lengths to help us compute the margins:
-% |\margin at v| is the top and bottom margins;
-% |\margin at xhi| is the inner margin offset;
-% |\margin at xho| is the outer margin offset.
 %    \begin{macrocode}
-\newlength{\margin at v}
-\newlength{\margin at xhi}\setlength{\margin at xhi}{0.5in}
-\newlength{\margin at xho}\setlength{\margin at xho}{0.0in}
+\newif\ifmargins at equal
+\newlength{\margin at base}
+\newlength{\margin at offset}
+\setlength{\margin at offset}{0.5in}
 %    \end{macrocode}
 %
-% The options are based off |\margin at v|:
-%    \begin{macrocode}
-\DeclareOption{narrowmargins}   {\setlength{\margin at v}{0.75in}}
-\DeclareOption{normalmargins}   {\setlength{\margin at v}{1.00in}}
-\DeclareOption{widemargins}     {\setlength{\margin at v}{1.25in}}
-\DeclareOption{extrawidemargins}{\setlength{\margin at v}{1.50in}}
-%    \end{macrocode}
+% After processing all options,
+% we compute the margins using the above lengths,
+% and adjust the placement of the header, footer, and margin notes.
+% If margins are equal, we average |\margin at offset|
+% to keep the |\textwidth| consistent with the unequal case.
 %
-% For digital copies, |equalmargins| may be preferred.
-% However, to keep the |\textwidth| consistent
-% for any of the above margin options with and without |equalmargins|,
-% we simply average the inner and outer offsets:
 %    \begin{macrocode}
-\DeclareOption{equalmargins}%
-  {\setlength{\margin at xho}{0.5\margin at xhi}
-   \setlength{\margin at xhi}{0.5\margin at xhi}}
-%    \end{macrocode}
-%
-% Finally, we actually compute the margins using the above three lengths,
-% and adjust the placement of the header, footer, and margin notes.
-%    \begin{macrocode}
 \AtEndOfClass{
-  \setlength{\leftmargin}{\dimexpr\margin at v+\margin at xhi}
-  \setlength{\rightmargin}{\dimexpr\margin at v+\margin at xho}
+  \ifmargins at equal
+    \setlength{\leftmargin}{\dimexpr\margin at base+.5\margin at offset}
+    \setlength{\rightmargin}{\dimexpr\margin at base+.5\margin at offset}
+  \else
+    \setlength{\leftmargin}{\dimexpr\margin at base+\margin at offset}
+    \setlength{\rightmargin}{\dimexpr\margin at base}
+  \fi
   \geometry{
-    top      = \margin at v,
-    bottom   = \margin at v,
+    top      = \margin at base,
+    bottom   = \margin at base,
     inner    = \leftmargin,
     outer    = \rightmargin,
-    headsep  = \dimexpr 0.5\margin at v - \headheight,
-    footskip = \dimexpr 0.5\margin at v,
-    marginparwidth = \dimexpr \rightmargin - 0.25in,
+    headsep  = \dimexpr0.5\margin at base-\headheight,
+    footskip = \dimexpr0.5\margin at base,
+    marginparwidth = \dimexpr\rightmargin-0.25in,
     marginparsep   = 0.125in,
 }}
 %    \end{macrocode}
 %
+% \subsection{Option Declaration}\label{imp:opt}
+%
+% \subsubsection{Margins}\label{imp:opt:margins}
+%
+% Four margin width options are based on |\margin at base|:
+%
+%    \begin{macrocode}
+\DeclareOption{narrowmargins}   {\setlength{\margin at base}{0.75in}}
+\DeclareOption{normalmargins}   {\setlength{\margin at base}{1.00in}}
+\DeclareOption{widemargins}     {\setlength{\margin at base}{1.25in}}
+\DeclareOption{extrawidemargins}{\setlength{\margin at base}{1.50in}}
+%    \end{macrocode}
+%
+% Setting the margins either equal or unequal:
+%
+%    \begin{macrocode}
+\DeclareOption{equalmargins}{\margins at equaltrue}
+\DeclareOption{unequalmargins}{\margins at equalfalse}
+%    \end{macrocode}
+%
 % \subsubsection{Line Spacing}\label{imp:opt:spacing}
+%
 % We're using the |setspace| package.
 % We simply call one of the spacing commands after the class is loaded.
 % So, be careful to place any line spacing commands within a group,
 % or the global setting can be changed in the middle of the document.
-% The default is |onehalfspacing|.
 %
 %    \begin{macrocode}
 \DeclareOption{doublespacing}{%
@@ -388,11 +379,18 @@
 %
 % \subsubsection{Book Options}\label{imp:opt:misc}
 %
+% We need to redeclare the |oneside| option from |book| so that
+% it can be used as a default:
+%
+%    \begin{macrocode}
+\DeclareOption{oneside}{\PassOptionsToClass{oneside}{book}}
+%    \end{macrocode}
+%
 % Finally, we try to process all remaining options using the |book| class,
 % so the usual options and default values should be defined, like:
 % \begin{itemize}
-%   \item page size: e.g. |letterpaper|, |a4paper|, \dots
 %   \item font size: e.g. |10pt|, |11pt|, |12pt|
+%   \item sides: e.g. |oneside|, |twoside|
 %   \item open side for twoside: e.g. |openright|, |openany|
 % \end{itemize}
 %
@@ -407,18 +405,16 @@
 % |LaTeX Warning: Unused global option(s): ...|
 %
 %    \begin{macrocode}
-\ExecuteOptions{letterpaper} % book
-\ExecuteOptions{normalmargins,onehalfspacing,chapterhead} % ut-thesis
-\ProcessOptions
+\ExecuteOptions{onehalfspacing,normalmargins,equalmargins,oneside}
+\ProcessOptions\relax
 %    \end{macrocode}
 %
-% \subsection{Initialization}\label{imp:init}
+% \subsection{Loading Dependencies}\label{imp:load}
+%
 % We load the |book| class and the required packages.
 %
 %    \begin{macrocode}
 \LoadClass{book}
-\RequirePackage{picture}  % for draft mode
-\RequirePackage{atbegshi} % for draft mode
 \RequirePackage{geometry} % for margins etc.
 \RequirePackage{setspace} % for line spacing
 %    \end{macrocode}
@@ -431,8 +427,9 @@
 \renewcommand*{\author}  [1]{\gdef\@author{#1}}
 \renewcommand*{\title}   [1]{\gdef\@title{#1}}
 \newcommand*{\degree}    [1]{\gdef\@degree{#1}}
-\newcommand*{\department}[1]{\gdef\@department{#1}}
 \newcommand*{\gradyear}  [1]{\gdef\@gradyear{#1}}
+\newcommand*{\department}[2][Department of]%
+  {\gdef\@deptpre{#1}\gdef\@deptname{#2}}
 %    \end{macrocode}
 %
 % Setting default values that will hopefully be overwritten.
@@ -441,23 +438,19 @@
 \author    {(author)}
 \title     {(title)}
 \degree    {(degree)}
+\gradyear  {(gradyear)}
 \department{(department)}
-\gradyear  {(gradyear)}
 %    \end{macrocode}
 %
 % \subsection{Front Matter}\label{imp:front}
 %
 % \subsubsection{Matter Commands}\label{imp:front:pp}
+%
 % We enforce that the |\frontmatter| and |\mainmatter| use the right
 % page numbering and styles.
-% Also, if we are using |[twoside]|,
-% then we need to reduce all page numbers in the front matter by 1,
-% so that the |abstract| is page ``ii'',
-% because adjusting the |page| counter directly causes typesetting problems,
-% such as incorrect alternating margins.
+%
 %    \begin{macrocode}
-\newcommand{\@romanskip}[1]{\@roman{\if at twoside\numexpr#1-1\else#1\fi}}
-\g at addto@macro\frontmatter{\pagenumbering{romanskip}\pagestyle{plain}}
+\g at addto@macro\frontmatter{\pagenumbering{roman}\pagestyle{plain}}
 \g at addto@macro\mainmatter {\pagenumbering{arabic}\pagestyle{headings}}
 %    \end{macrocode}
 %
@@ -486,7 +479,7 @@
       \vfill
       A thesis submitted in conformity with the requirements\\
       for the degree of {\@degree}\\[1ex]
-      Graduate Department of {\@department}\\
+      {\@deptpre} {\@deptname}\\
       University of Toronto\\
       \vfill
       {\copyright} Copyright {\@gradyear} by {\@author}
@@ -511,7 +504,7 @@
       {\@title}\\[2ex]
       {\@author}\\
       {\@degree}\\[1ex]
-      Graduate Department of {\@department}\\
+      {\@deptpre} {\@deptname}\\
       University of Toronto\\
       {\@gradyear}\\
       \section*{Abstract}
@@ -554,8 +547,10 @@
 % \subsection{Page Styles}\label{imp:hf}
 %
 % \subsubsection{Blank Pages}\label{imp:hf:blank}
+%
 % By default, all blank pages will have page style |plain|,
 % but the original definition is stored in |\ocleardoublepage|.
+%
 %    \begin{macrocode}
 \let\ocleardoublepage\cleardoublepage
 \def\cleardoublepage{{\newpage\pagestyle{plain}\ocleardoublepage}}
@@ -562,9 +557,11 @@
 %    \end{macrocode}
 %
 % \subsubsection{Headers \& Footers}\label{imp:hf:hf}
+%
 % We redefine the |headings| page style
 % with a new formatting hook |\headerstyle{}|,
 % but is otherwise similar to the original |headings|.
+%
 %    \begin{macrocode}
 \newcommand{\headerstyle}[1]{\footnotesize\MakeUppercase{#1}}
 \if at twoside
@@ -590,11 +587,13 @@
 %    \end{macrocode}
 %
 % Default page style.
+%
 %    \begin{macrocode}
 \pagestyle{headings}
 %    \end{macrocode}
 %
 % \subsection{Spacing Adjustments}\label{imp:adj}
+%
 % The default spacing below captions is too small
 % for captions on top of floats (e.g.\ for tables),
 % so we make it consistent above and below.

Modified: trunk/Master/texmf-dist/tex/latex/ut-thesis/ut-thesis.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/ut-thesis/ut-thesis.cls	2021-08-26 21:25:34 UTC (rev 60330)
+++ trunk/Master/texmf-dist/tex/latex/ut-thesis/ut-thesis.cls	2021-08-26 21:26:10 UTC (rev 60331)
@@ -51,43 +51,35 @@
 %% 
 \NeedsTeXFormat{LaTeX2e}[1999/12/01]
 \ProvidesClass{ut-thesis}
-[2021/07/20 v3.0.5 University of Toronto thesis class]
-\newcommand{\draftmarkstyle}{\scriptsize\sffamily}
-\DeclareOption{draft}{%
-  \PassOptionsToClass{\CurrentOption}{book}
-  \AtEndOfClass{
-    \AtBeginShipout{\AtBeginShipoutUpperLeft{%
-      \draftmarkstyle
-      \put(+0.125in,            -0.125in-\f at size pt  ){\rlap{DRAFT}}
-      \put(-0.125in+\paperwidth,-0.125in-\f at size pt  ){\llap{DRAFT}}
-      \put(+0.125in,            +0.125in-\paperheight){\rlap{DRAFT}}
-      \put(-0.125in+\paperwidth,+0.125in-\paperheight){\llap{DRAFT}}
-      \put(+0.5\paperwidth,+0.125in-\paperheight)%
-        {\makebox[0in][c]{\today}}
-}}}}
-\newlength{\margin at v}
-\newlength{\margin at xhi}\setlength{\margin at xhi}{0.5in}
-\newlength{\margin at xho}\setlength{\margin at xho}{0.0in}
-\DeclareOption{narrowmargins}   {\setlength{\margin at v}{0.75in}}
-\DeclareOption{normalmargins}   {\setlength{\margin at v}{1.00in}}
-\DeclareOption{widemargins}     {\setlength{\margin at v}{1.25in}}
-\DeclareOption{extrawidemargins}{\setlength{\margin at v}{1.50in}}
-\DeclareOption{equalmargins}%
-  {\setlength{\margin at xho}{0.5\margin at xhi}
-   \setlength{\margin at xhi}{0.5\margin at xhi}}
+[2021/08/26 v3.1.5 University of Toronto thesis class]
+\newif\ifmargins at equal
+\newlength{\margin at base}
+\newlength{\margin at offset}
+\setlength{\margin at offset}{0.5in}
 \AtEndOfClass{
-  \setlength{\leftmargin}{\dimexpr\margin at v+\margin at xhi}
-  \setlength{\rightmargin}{\dimexpr\margin at v+\margin at xho}
+  \ifmargins at equal
+    \setlength{\leftmargin}{\dimexpr\margin at base+.5\margin at offset}
+    \setlength{\rightmargin}{\dimexpr\margin at base+.5\margin at offset}
+  \else
+    \setlength{\leftmargin}{\dimexpr\margin at base+\margin at offset}
+    \setlength{\rightmargin}{\dimexpr\margin at base}
+  \fi
   \geometry{
-    top      = \margin at v,
-    bottom   = \margin at v,
+    top      = \margin at base,
+    bottom   = \margin at base,
     inner    = \leftmargin,
     outer    = \rightmargin,
-    headsep  = \dimexpr 0.5\margin at v - \headheight,
-    footskip = \dimexpr 0.5\margin at v,
-    marginparwidth = \dimexpr \rightmargin - 0.25in,
+    headsep  = \dimexpr0.5\margin at base-\headheight,
+    footskip = \dimexpr0.5\margin at base,
+    marginparwidth = \dimexpr\rightmargin-0.25in,
     marginparsep   = 0.125in,
 }}
+\DeclareOption{narrowmargins}   {\setlength{\margin at base}{0.75in}}
+\DeclareOption{normalmargins}   {\setlength{\margin at base}{1.00in}}
+\DeclareOption{widemargins}     {\setlength{\margin at base}{1.25in}}
+\DeclareOption{extrawidemargins}{\setlength{\margin at base}{1.50in}}
+\DeclareOption{equalmargins}{\margins at equaltrue}
+\DeclareOption{unequalmargins}{\margins at equalfalse}
 \DeclareOption{doublespacing}{%
   \AtEndOfClass{\doublespacing}
 }
@@ -97,27 +89,25 @@
 \DeclareOption{singlespacing}{%
   \AtEndOfClass{\singlespacing}
 }
+\DeclareOption{oneside}{\PassOptionsToClass{oneside}{book}}
 \DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}}
-\ExecuteOptions{letterpaper} % book
-\ExecuteOptions{normalmargins,onehalfspacing,chapterhead} % ut-thesis
-\ProcessOptions
+\ExecuteOptions{onehalfspacing,normalmargins,equalmargins,oneside}
+\ProcessOptions\relax
 \LoadClass{book}
-\RequirePackage{picture}  % for draft mode
-\RequirePackage{atbegshi} % for draft mode
 \RequirePackage{geometry} % for margins etc.
 \RequirePackage{setspace} % for line spacing
 \renewcommand*{\author}  [1]{\gdef\@author{#1}}
 \renewcommand*{\title}   [1]{\gdef\@title{#1}}
 \newcommand*{\degree}    [1]{\gdef\@degree{#1}}
-\newcommand*{\department}[1]{\gdef\@department{#1}}
 \newcommand*{\gradyear}  [1]{\gdef\@gradyear{#1}}
+\newcommand*{\department}[2][Department of]%
+  {\gdef\@deptpre{#1}\gdef\@deptname{#2}}
 \author    {(author)}
 \title     {(title)}
 \degree    {(degree)}
+\gradyear  {(gradyear)}
 \department{(department)}
-\gradyear  {(gradyear)}
-\newcommand{\@romanskip}[1]{\@roman{\if at twoside\numexpr#1-1\else#1\fi}}
-\g at addto@macro\frontmatter{\pagenumbering{romanskip}\pagestyle{plain}}
+\g at addto@macro\frontmatter{\pagenumbering{roman}\pagestyle{plain}}
 \g at addto@macro\mainmatter {\pagenumbering{arabic}\pagestyle{headings}}
 \renewcommand*{\maketitle}%
   {\thispagestyle{empty}
@@ -135,7 +125,7 @@
       \vfill
       A thesis submitted in conformity with the requirements\\
       for the degree of {\@degree}\\[1ex]
-      Graduate Department of {\@department}\\
+      {\@deptpre} {\@deptname}\\
       University of Toronto\\
       \vfill
       {\copyright} Copyright {\@gradyear} by {\@author}
@@ -149,7 +139,7 @@
       {\@title}\\[2ex]
       {\@author}\\
       {\@degree}\\[1ex]
-      Graduate Department of {\@department}\\
+      {\@deptpre} {\@deptname}\\
       University of Toronto\\
       {\@gradyear}\\
       \section*{Abstract}



More information about the tex-live-commits mailing list.