From 46eb6bad8700abdfef52fd83445607228016b10b Mon Sep 17 00:00:00 2001
From: Blaise Thompson <blaise@untzag.com>
Date: Sat, 24 Mar 2018 16:45:13 -0500
Subject: 2018-03-24 16:45

---
 dissertation.cls | 92 ++++++++++++++++++++++++--------------------------------
 1 file changed, 40 insertions(+), 52 deletions(-)

(limited to 'dissertation.cls')

diff --git a/dissertation.cls b/dissertation.cls
index 6397be2..bf2e6f6 100644
--- a/dissertation.cls
+++ b/dissertation.cls
@@ -13,21 +13,30 @@
 \RequirePackage{xcolor}
 \RequirePackage{array} 
 
+% --- floats --------------------------------------------------------------------------------------
+
+
+% force all floats to center (see https://tex.stackexchange.com/a/53383)
+\makeatletter
+\g@addto@macro\@floatboxreset{\centering}
+\makeatother
+
+
 % --- headers -------------------------------------------------------------------------------------
 
 % required: page number in upper right, nothing else
 
 \RequirePackage{fancyhdr}
 \fancypagestyle{plain}{
-	\fancyhf{}
-	\fancyhead[R]{\thepage}
-	\fancyfoot{}
+  \fancyhf{}
+  \fancyhead[R]{\thepage}
+  \fancyfoot{}
 	\renewcommand{\headrulewidth}{0pt}
 	\renewcommand{\footrulewidth}{0pt}
 }
 \pagestyle{plain}{\rhead{\thepage}}
 
-\setlength{\headheight}{11pt}
+\setlength{\headheight}{14pt}
 
 % --- text ----------------------------------------------------------------------------------------
 
@@ -119,19 +128,6 @@
 
 \newcommand{\includepython}[1]{\inputminted[bgcolor=bg]{python}{#1}}
 
-% --- tables --------------------------------------------------------------------------------------
-
-\newenvironment{dtable}
-  {
-  \clearpage
-  \begin{table}
-  \centering
-  }
-  {
-  \end{table}
-  \clearpage
-  }
-
 % --- graphics ------------------------------------------------------------------------------------
 
 \RequirePackage{graphics}
@@ -141,15 +137,8 @@
 \RequirePackage{etoc}
 \RequirePackage{tikz}
 
-\newenvironment{dfigure}
-  {
-  \clearpage
-  \begin{figure}
-  \centering
-  }
-  {
-  \end{figure}
-  \clearpage}
+\BeforeBeginEnvironment{figure}{\clearpage}
+\AfterEndEnvironment{figure}{\clearpage}
 
 % --- math ----------------------------------------------------------------------------------------
 
@@ -179,30 +168,29 @@ anchorcolor=black]{hyperref}
 
 % --- glossary ------------------------------------------------------------------------------------
 
-\RequirePackage[acronym, nopostdot, nogroupskip]{glossaries}
-\newcommand{\comma}{,\penalty \exhyphenpenalty}
-\newlength\glsnamewidth
-\setlength{\glsnamewidth}{0.3\hsize}
-\setlength{\glsdescwidth}{1\hsize}
-\newglossarystyle{myglossarystyle}{
-	\setglossarystyle{super}
-	\renewenvironment{theglossary}{
-		\tablehead{}
-		\tabletail{}
-		\begin{supertabular}{p{\glsnamewidth}p{\glsdescwidth}}}{\end{supertabular}}
-	\renewcommand{\glossentry}[2]{
-		\raggedleft
-		\glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} &
-		\glossentrydesc{##1}\glspostdescription\space ##2\tabularnewline}}
-\renewcommand{\arraystretch}{1}
-\setglossarystyle{myglossarystyle}
-\newglossary[slg]{symbolslist}{syi}{syg}{Symbols}
-\makeglossaries
-\include{glossary}
-
-\RequirePackage{tocloft}
+%\RequirePackage[acronym, nopostdot, nogroupskip]{glossaries}
+%\newcommand{\comma}{,\penalty \exhyphenpenalty}
+%\newlength\glsnamewidth
+%\setlength{\glsnamewidth}{0.3\hsize}
+%\setlength{\glsdescwidth}{1\hsize}
+%\newglossarystyle{myglossarystyle}{
+%	\setglossarystyle{super}
+%	\renewenvironment{theglossary}{
+%		\tablehead{}
+%		\tabletail{}
+%		\begin{supertabular}{p{\glsnamewidth}p{\glsdescwidth}}}{\end{supertabular}}
+%	\renewcommand{\glossentry}[2]{
+%		\raggedleft
+%		\glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} &
+%		\glossentrydesc{##1}\glspostdescription\space ##2\tabularnewline}}
+%\renewcommand{\arraystretch}{1}
+%\setglossarystyle{myglossarystyle}
+%\newglossary[slg]{symbolslist}{syi}{syg}{Symbols}
+%\makeglossaries
+
+%\RequirePackage{tocloft}
  
-\setlength\cftparskip{0pt}
-\setlength\cftbeforechapskip{-5pt}
-\setlength\cftbeforesecskip{-7pt}
-\setlength\cftbeforesubsecskip{-10pt}
\ No newline at end of file
+%\setlength\cftparskip{0pt}
+%\setlength\cftbeforechapskip{-5pt}
+%\setlength\cftbeforesecskip{-7pt}
+%\setlength\cftbeforesubsecskip{-10pt}
\ No newline at end of file
-- 
cgit v1.2.3

