summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/msu-thesis
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-05-10 21:31:55 +0000
committerKarl Berry <karl@freefriends.org>2016-05-10 21:31:55 +0000
commit4bedf8053067f3211ee912a487ee5d03c1f43971 (patch)
tree47af90a4123b1ecf73dcc7d722f6db591f4dcefe /Master/texmf-dist/tex/latex/msu-thesis
parent880ed92665fb54066cc81173fb63170c174d0e12 (diff)
msu-thesis (10may16)
git-svn-id: svn://tug.org/texlive/trunk@41013 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/msu-thesis')
-rw-r--r--Master/texmf-dist/tex/latex/msu-thesis/msu-thesis.cls286
1 files changed, 155 insertions, 131 deletions
diff --git a/Master/texmf-dist/tex/latex/msu-thesis/msu-thesis.cls b/Master/texmf-dist/tex/latex/msu-thesis/msu-thesis.cls
index adf87ee590e..08c43df2019 100644
--- a/Master/texmf-dist/tex/latex/msu-thesis/msu-thesis.cls
+++ b/Master/texmf-dist/tex/latex/msu-thesis/msu-thesis.cls
@@ -1,9 +1,9 @@
% MSU Thesis Class
%
-% Copyright 2009,2010,2011,2012,2013 by Alan Munn <amunn@msu.edu>
+% Copyright 2009,2010,2011,2012,2013, 2014, 2015, 2016 by Alan Munn <amunn@msu.edu>
%
% This is a class file for producing dissertations and theses according to the
-% Michigan State University Graduate School Guidelines (2012)
+% Michigan State University Graduate School Guidelines
%
%
% This class may be distributed and/or modified under the
@@ -111,32 +111,38 @@
% Version 2.5b 2015/04/20 Changed spacing between top of page and titles by .06” to appease the
% the Grad School who measure to the tops of letters instead of to baselines.
% Version 2.5c 2015/07/11 Made loading etex conditional due to changes in LaTeX kernel for 2015.
-% Removed gb4e compatability code (code remains in the distributed files)
-%
+% Removed gb4e compatibility code (code remains in the distributed files)
+% Version 2.6 2016/05/09 Completely revised the stupid appendix/appendices and bibliography cover page % code using memoir internals instead of hacks.
+% This should fix numbering issues in the TOC w.r.t the cover pages and
+% also fix bookmarks in the PDF when hyperref is loaded.
+% Made default caption delimiter a space so that captions in LOT/LOF look better
+% Removed old commented out code and older backwards compatibility code.
+%
% Use at your own risk!
% Report bugs/problems/questions to <amunn@msu.edu>
%
-\def\msu@version{2.5c}
-\def\msu@date{2015/07/11}
+\def\msu@version{2.6}
+\def\msu@date{2016/05/09}
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{msu-thesis}[\msu@date\space Michigan State University Thesis Class version \msu@version]
\newif\ifmsu@lscape\msu@lscapefalse
\newif\ifmsu@stupidtoc\msu@stupidtocfalse
\newif\ifmsu@mixedtoc\msu@mixedtocfalse
\newif\ifmsu@plaintoc\msu@plaintoctrue % make this the default to see what the reaction is
+\newif\ifmsu@colonintoc\msu@colonintocfalse
\newif\ifmsu@hyperloaded\msu@hyperloadedfalse
-\DeclareOption{PhD}{\gdef\@degree{Doctor of Philosophy}\gdef\@diss{DISSERTATION}}
-\DeclareOption{MA}{\gdef\@degree{Master of Arts}\gdef\@diss{THESIS}}
-\DeclareOption{MS}{\gdef\@degree{Master of Science}\gdef\@diss{THESIS}}
-%\DeclareOption{MAT}{\gdef\@degree{Master of Arts for Teachers}\gdef\@diss{THESIS}}
-\DeclareOption{MBA}{\gdef\@degree{Master of Business Administration}\gdef\@diss{THESIS}}
-\DeclareOption{MFA}{\gdef\@degree{Master of Fine Arts}\gdef\@diss{THESIS}}
-\DeclareOption{MIPS}{\gdef\@degree{Master of International Planning Studies}\gdef\@diss{THESIS}}
-\DeclareOption{MHRL}{\gdef\@degree{Master of Human Resources and Labor Relations}\gdef\@diss{THESIS}}\DeclareOption{MMus}{\gdef\@degree{Master of Music}\gdef\@diss{THESIS}}
-%\DeclareOption{MSN}{\gdef\@degree{Master of Science in Nursing}\gdef\@diss{THESIS}}
-\DeclareOption{MPP}{\gdef\@degree{Master of Public Policy}\gdef\@diss{THESIS}}
-\DeclareOption{MSW}{\gdef\@degree{Master of Social Work}\gdef\@diss{THESIS}}
-\DeclareOption{MURP}{\gdef\@degree{Master in Urban and Regional Planning}\gdef\@diss{THESIS}}
+\DeclareOption{PhD}{\gdef\msu@degree{Doctor of Philosophy}\gdef\msu@diss{DISSERTATION}}
+\DeclareOption{MA}{\gdef\msu@degree{Master of Arts}\gdef\msu@diss{THESIS}}
+\DeclareOption{MS}{\gdef\msu@degree{Master of Science}\gdef\msu@diss{THESIS}}
+%\DeclareOption{MAT}{\gdef\msu@degree{Master of Arts for Teachers}\gdef\msu@diss{THESIS}}
+\DeclareOption{MBA}{\gdef\msu@degree{Master of Business Administration}\gdef\msu@diss{THESIS}}
+\DeclareOption{MFA}{\gdef\msu@degree{Master of Fine Arts}\gdef\msu@diss{THESIS}}
+\DeclareOption{MIPS}{\gdef\msu@degree{Master of International Planning Studies}\gdef\msu@diss{THESIS}}
+\DeclareOption{MHRL}{\gdef\msu@degree{Master of Human Resources and Labor Relations}\gdef\msu@diss{THESIS}}\DeclareOption{MMus}{\gdef\msu@degree{Master of Music}\gdef\msu@diss{THESIS}}
+%\DeclareOption{MSN}{\gdef\msu@degree{Master of Science in Nursing}\gdef\msu@diss{THESIS}}
+\DeclareOption{MPP}{\gdef\msu@degree{Master of Public Policy}\gdef\msu@diss{THESIS}}
+\DeclareOption{MSW}{\gdef\msu@degree{Master of Social Work}\gdef\msu@diss{THESIS}}
+\DeclareOption{MURP}{\gdef\msu@degree{Master in Urban and Regional Planning}\gdef\msu@diss{THESIS}}
\DeclareOption{lscape}{%
\msu@lscapetrue
\AtEndDocument{\ClassWarningNoLine{msu-thesis}{You have chosen the [lscape] option. You may need to run latex twice to get landscape page numbering to display correctly}}}
@@ -144,11 +150,12 @@
\DeclareOption{plaintoc}{\msu@plaintoctrue\msu@stupidtocfalse\msu@mixedtocfalse}
\DeclareOption{mixedtoc}{\msu@mixedtoctrue\msu@stupidtocfalse\msu@plaintocfalse}
\ExecuteOptions{PhD}
-\DeclareOption*{%
-\PassOptionsToClass{\CurrentOption}{memoir}%
+\DeclareOption*{
+\PassOptionsToClass{\CurrentOption}{memoir}
}
\ProcessOptions
\LoadClass[12pt,oneside,letterpaper]{memoir}[2008/05/27]
+% Check for older versions of the latex kernel
\ifx\e@alloc\@undefined
\RequirePackage{etex}
\fi
@@ -173,56 +180,29 @@
\setlrmargins{1in}{*}{*}
\setulmargins{1in}{*}{*}
\setheadfoot{\baselineskip}{.5in}
-\AtBeginDocument{%
-\topskip=0pt % setting this because the Grad School doesn’t know how to measure
-\checkandfixthelayout
-% set up subscript sizes so that 10 pt is the smallest
-% (MSU Requirement)
-\DeclareMathSizes{12}{12}{10}{10}
-\DeclareMathSizes{10.95}{10.95}{10}{10}
-\DeclareMathSizes{10}{10}{10}{10}
-}%
-
-% This stuff is modifications of gb4e for linguistics
-%\@ifpackageloaded{gb4e}{\input{gb4e-compat.tex}}{\relax}
-% Removed as of version 2.5c. This fix has been part of gb4e for a long time
-
-
% set up contents title
% we use a private macro here to avoid problems with babel and
% polyglossia if they are loaded since they redefine the contents title
%
\newcommand*\msu@contentsname{TABLE OF CONTENTS}
-
-\newif\ifappendices\appendicesfalse
-\newcommand*{\@appendixcover}{\ifappendices{APPENDICES}\else{APPENDIX}\fi}
-\newcommand*{\fieldofstudy}[1]{\gdef\@fieldofstudy{#1}} % removed \MakeUppercase 6/5/12
-\newcommand{\dedication}[1]{\gdef\@dedication{#1}}
-\newcommand*{\degree}[1]{\gdef\@degree{\MakeUppercase{#1}}}
-
-% msuabstract environment (not needed now) but included for backwards
-% compatibility
-%
-\newenvironment{msuabstract}{\ClassWarning{msu-thesis}{MSU Thesis: The msuabstract environment is deprecated. Please use the abstract environment}\begin{abstract}}{\end{abstract}}
-
-\newcommand*{\@titleintro}{A~} % this is the beginning to the title page phrase
+\newcommand*{\fieldofstudy}[1]{\gdef\msu@fieldofstudy{#1}} % removed \MakeUppercase 6/5/12
+\newcommand{\dedication}[1]{\gdef\msu@dedication{#1}}
+\newcommand*{\msu@titleintro}{A~} % this is the beginning to the title page phrase
\newcommand*{\msu@fieldseparator}{\textendash} % this is between the degree name and field of study
-
-
% make title 2in from top of page
% This value is crazy because the grad school doesn’t know how to measure
\setlength{\droptitle}{.425in}
% set up the title page
-% Because the title is sent to \MakeUppercase we need to \protect line
+% Because the title is set to \MakeUppercase we need to \protect line
% breaks within the title. This has now been documented in the user docs.
\pretitle{\begin{center}\MakeUppercase}
\posttitle{\\[\baselineskip]\end{center}}
\preauthor{\begin{center}By\\[\baselineskip]}
\postauthor{\end{center}}
-\predate{\vfill\begin{center}\@titleintro\@diss\\[\baselineskip]Submitted\\to Michigan State University\\in partial fulfillment of the requirements\\for the degree of\\[\baselineskip]\@fieldofstudy~\msu@fieldseparator~\@degree\\[\baselineskip]}
+\predate{\vfill\begin{center}\msu@titleintro\msu@diss\\[\baselineskip]Submitted\\to Michigan State University\\in partial fulfillment of the requirements\\for the degree of\\[\baselineskip]\msu@fieldofstudy~\msu@fieldseparator~\msu@degree\\[\baselineskip]}
% set up the chapter titles
\chapterstyle{thatcher}
@@ -235,6 +215,12 @@
\renewcommand*{\afterchapternum}{}
\renewcommand*{\printchaptername}{%
\centerline{\chapnumfont{\MakeUppercase\@chapapp\ \thechapter}}}
+\renewcommand{\partnamefont}{\centering\bfseries}
+\renewcommand{\partnumfont}{\bfseries}
+\renewcommand{\parttitlefont}{\SingleSpacing\bfseries}
+\renewcommand{\printpartname}{\partnamefont{\MakeUppercase{\partname}}}
+\renewcommand{\printparttitle}[1]{\parttitlefont \MakeUppercase#1}
+
% set up the section styles
\setsecheadstyle{\normalfont\SingleSpacing\large\bfseries}
@@ -242,12 +228,15 @@
\setsubsubsecheadstyle{\normalfont\SingleSpacing\bfseries}
% set up TOC
+
\maxtocdepth{subsubsection}
\setsecnumdepth{subsubsection}
\renewcommand*{\printtoctitle}[1]{\centering\bfseries\msu@contentsname}
\renewcommand*{\cftchaptername}{Chapter\space}
\renewcommand*{\cftappendixname}{Appendix\space}
\renewcommand*{\cftchapterdotsep}{\cftdotsep}
+\renewcommand*{\cftfigureaftersnum}{\@contdelim} % This uses the same delimiter as in the captions
+\renewcommand*{\cfttableaftersnum}{\@contdelim} % per thesis office punctuation idiocy
\renewcommand*{\cftfigurename}{Figure\space}
\renewcommand*{\cfttablename}{Table\space}
@@ -259,14 +248,36 @@
\ifmsu@plaintoc
\def\msu@tocfont{\normalfont}
\def\msu@chapfont{\normalfont}
-
\fi
\ifmsu@mixedtoc
\def\msu@tocfont{\normalfont}
\def\msu@chapfont{\bfseries}
-
\fi
+%
+% This code from http://tex.stackexchange.com/q/232121/
+% Makes appendices formatted as sections not chapters in the TOC
+% This is due to MSU idiocy, and also will make the appendix name
+% upper case (because of MSU case matching requirements in TOC/chap)
+% So the appendices are chapters in the document but formatted as
+% sections in the TOC. Code needs to be changed back for the bibliography
+\cftinsertcode{APP}{
+ \setlength\cftchapterindent{\cftsectionindent}
+ \setlength\cftbeforechapterskip{0pt}
+ \renewcommand\cftchapterfont{\msu@tocfont}
+ \renewcommand\cftchapterpagefont{\msu@tocfont}
+ \renewcommand*{\cftappendixname}{APPENDIX\space}
+}
+% This code resets the changes made in the APP code back to normal
+% so that the bibliography will appear correctly in the TOC
+\cftinsertcode{BIB}{
+\setlength{\cftchapterindent}{0em}
+\setlength{\cftbeforechapterskip}{1.0em \@plus\p@}
+ \renewcommand\cftchapterfont{\msu@chapfont}
+ \renewcommand\cftchapterpagefont{\msu@chapfont}
+}
+
+% Set up all the font styles for the TOC
\renewcommand*{\cftchapterfont}{\msu@chapfont}
\renewcommand*{\cftchapterpagefont}{\msu@chapfont}
\renewcommand*{\cftsectionfont}{\msu@tocfont}
@@ -282,10 +293,9 @@
\renewcommand*{\l@appendix}[2]{%
\renewcommand{\cftchapterpagefont}{\msu@tocfont}
\setlength{\cftchapternumwidth}{2em}
- \l@chapapp{\msu@tocfont{#1}}{#2}{\cftappendixname}} % Format appendix names
+ \l@chapapp{\msu@tocfont\MakeUppercase{#1}}{#2}{\cftappendixname}} % Format appendix names
\setlength{\cftchapternumwidth}{3em}
\setrmarg{3.5em} % better wrapping of long titles
-%\setlength{\cftbeforechapterskip}{1.0em \@plus\p@}
% MSU requires double spacing between entries in the list of tables, figures etc.
% so we add the commands to change the 'list of'
@@ -299,10 +309,6 @@
\renewcommand*{\insertchapterspace}{}
\pagestyle{plain}
}
-% The following left in for backwards compatibility with v. 1.7
-% but not mentioned in the documentation
-
-\newcommand{\maketableofcontents}{\tableofcontents*}
% set up footnotes
\footmarkstyle{\normalsize\textsuperscript{#1}} % reset size so that mark is right size
@@ -310,116 +316,133 @@
\setlength{\footmarksep}{-1.8em}
\setlength{\footparindent}{1em}
\renewcommand{\foottextfont}{\normalsize} % footnotes will be 12pt
-\feetbelowfloat
-
+\feetbelowfloat % footnotes will appear below bottom floats
\renewenvironment{abstract}{%
\chapter*{\abstractname}
\thispagestyle{empty}
\plainbreak{-1.5}
\begin{center}
- \MakeUppercase{\thetitle}\plainbreak{1}By\plainbreak{1}\theauthor
+ \MakeUppercase{\thetitle}\plainbreak{1}By\plainbreak{1}\theauthor
\end{center}
\DoubleSpacing
}{\par}
-% \makeabstract command included for backwards compatibility
-\newcommand{\makeabstract}{\ClassWarning{msu-thesis}{MSU-Thesis: The \protect\makeabstract\space command is no longer needed.}}
% set up captions
\captionstyle[\centering]{\raggedright}
+% Make the caption delimiter a space instead of colon space so that the
+% contents lists don't look so stupid. Can be changed if necessary.
+\captiondelim{\space}
\pagestyle{plain}
% make the titlepage
\newcommand{\maketitlepage}{%
-\pagestyle{empty}\thispagestyle{empty}
-\begin{titlingpage}
-\maketitle
-\end{titlingpage}
-\addtocounter{page}{1}}
+ \pagestyle{empty}
+ \thispagestyle{empty}
+ \begin{titlingpage}
+ \maketitle
+ \end{titlingpage}
+ \addtocounter{page}{1}}
% make the copyright page
\newcommand*{\makecopyrightpage}{%
-\pagestyle{plain}\clearpage\thispagestyle{empty}
-\vspace*{7in}
-{\raggedleft Copyright by\\\MakeUppercase{\theauthor}\\\thedate\\} % Author now uppercase 6/5/12
-\clearpage}
+ \pagestyle{plain}
+ \clearpage
+ \thispagestyle{empty}
+ \vspace*{7in}
+ {\raggedleft Copyright by\\\MakeUppercase{\theauthor}\\\thedate\\} % Author now uppercase 6/5/12
+ \clearpage}
% make the dedication page
\newcommand*{\makededicationpage}{%
-\clearpage\pagestyle{plain}
-\chapter*{\ }
-\vspace{.35\textheight}\begin{center}
-\@dedication
-\end{center}}
+ \clearpage
+ \pagestyle{plain}
+ \chapter*{\ }
+ \vspace{.35\textheight}\begin{center}
+ \msu@dedication
+ \end{center}}
\renewcommand{\mainmatter}{%
\DoubleSpacing\pagestyle{plain}\@ifstar{\@smemmain}{\@memmain}}
+\renewcommand{\beforepartskip}{\vspace*{.35\textheight}}
-
-% make the appendices cover page
-% Two new commands added \appendix and \appendices
-% no longer need to set switch manually
-% added 8/7/14
-
-\newcommand*{\@makeappendixcover}{%
-\addcontentsline{toc}{chapter}{\@appendixcover}
-\ifappendices
- \settocdepth{chapter}
- \addtocontents{toc}{%
- \setlength{\cftchapterindent}{1.5em}
- \setlength{\cftbeforechapterskip}{0.0em \@plus\p@}
-}
-\else
- \settocdepth{part}
-\fi
-\clearpage
-\chapter*{\ }
-\vspace{.35\textheight}\begin{center}
-\bfseries\@appendixcover
-\end{center}
-\ifmsu@hyperloaded
- \renewcommand{\theHchapter}{A\arabic{chapter}}
-\fi
-}
+% This code patches the memoir appendix code to automatically add
+% appendix cover pages with the correct label, and getting the stupid
+% TOC format that the Grad School requires correct.
+% Also, since the Grad School doesn't allow a single appendix to have a letter name
+% we remove it for the title, but not for the section headings.
+%
\let\orig@appendix\appendix
\let\orig@appendices\appendices
-\let\orig@endappendices\endappendices
-\renewcommand*{\appendix}{\appendicesfalse\@makeappendixcover\orig@appendix}
-\renewcommand*{\appendices}{\appendicestrue\@makeappendixcover\orig@appendix}
-\renewcommand*{\endappendices}{}
+\renewcommand*{\appendix}{
+ \renewcommand\appendixpagename{Appendix}
+ \renewcommand\appendixtocname{Appendix}
+ \appendixpage
+ \settocdepth{part}
+ \orig@appendix
+ \renewcommand\thechapter{}
+ \renewcommand\thesection{A.\arabic{section}}}
+\renewcommand*{\appendices}{
+ \appendixpage
+ \cftinserthook{toc}{APP}
+ \settocdepth{chapter}
+ \orig@appendices}
% make the bibliography page
+% new version modeled after memoir code for appendix page
+\def\msu@bibpage{%
+ \cftinserthook{toc}{BIB}
+ \settocdepth{chapter}
+ \@setuppart
+ \msu@preaddbibpagetotochook
+ \msu@addbibheadtotoc
+ \msu@postaddbibpagetotochook
+ \partmark{\bibpagename}%
+ \msu@bibpageinfo{\bibpagename}%
+ {\centering
+ \interlinepenalty \@M
+ \normalfont
+ \printparttitle{\bibpagename}\par}%
+ \@endpart}
+\newcommand\msu@preaddbibpagetotochook{}
+\newcommand\msu@postaddbibpagetotochook{}
+\newcommand{\msu@bibpageinfo}[1]{}
+
+\def\msu@addbibheadtotoc{%
+ \phantomsection\addcontentsline{toc}{chapter}{\bibtocname}}
+% Since the bibliography page is the TOC entry we remove the bib in the TOC
+% when it's introduced
+\nobibintoc
% Modified 8/7/14 to add the bibliography cover page to the TOC and not the actual bibliography page
% This should also work for biblatex even though memoir doesn't check for it
% but we'll worry about that when someone asks...
-\newcommand*{\makebibliographycover}{%
-\ifmsu@hyperloaded
- \phantomsection\label{msu@bib}\fi
-\settocdepth{chapter}
-\addtocontents{toc}{
- \setlength{\cftchapterindent}{0em}
- \setlength{\cftbeforechapterskip}{1.0em \@plus\p@}
- }
-\addcontentsline{toc}{chapter}{BIBLIOGRAPHY} % put the title page in the TOC
-\nobibintoc % remove the actual bib first page from the TOC
-\clearpage
-\chapter*{\ } % this is a hack but it works
-\vspace{.35\textheight}\begin{center}
-\bfseries\MakeUppercase{\bibname}
-\end{center}
-}
+\let\bibtocname\bibname
+\let\bibpagename\bibname
+\newcommand*{\makebibliographypage}{\msu@bibpage}
+\let\makebibliographycover\makebibliographypage
-% Do some stuff at begin document: check for hyperref
+% Do some stuff at begin document:
+\AtBeginDocument{%
+\let\msucaptiondelim\@contdelim
+\topskip=0pt % setting this because the Grad School doesn’t know how to measure
+\checkandfixthelayout
+%
+% set up subscript sizes so that 10 pt is the smallest
+% (MSU Requirement)
+\DeclareMathSizes{12}{12}{10}{10}
+\DeclareMathSizes{10.95}{10.95}{10}{10}
+\DeclareMathSizes{10}{10}{10}{10}
+%
+% check for hyperref
% The hyperref code allows hyperref to be used. It is not guaranteed to
-% work and has been lightly tested
-% If the thesis office permits them, then I may try to support this more.
+% work and has been lightly tested.
% Thanks to Florent Chervet for the code.
-\AtBeginDocument{%
+% Added hypersetup to remove borders around links 5/9/16
\@ifpackageloaded{hyperref}%
-{\msu@hyperloadedtrue
+{\hypersetup{pdfborder= 0 0 0}\msu@hyperloadedtrue
\def\MakeLinkUppercase \hyper@linkstart #1#2#3\hyper@linkend
{\hyper@linkstart {#1}{#2}{\MakeUppercase{#3}}\hyper@linkend }
\pdfstringdefDisableCommands{\let\MakeUppercase \@firstofone }
@@ -428,5 +451,6 @@
\renewcommand*{\l@appendix}[2]{%
\l@chapapp{\msu@tocfont#1}{#2}{\cftappendixname}}} % Format appendix names (changed 8/7/14)
% if no hyperref
-{\relax}}
+{\relax}
+}
\endinput \ No newline at end of file