summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/msu-thesis
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/msu-thesis
Initial commit
Diffstat (limited to 'macros/latex/contrib/msu-thesis')
-rw-r--r--macros/latex/contrib/msu-thesis/README46
-rw-r--r--macros/latex/contrib/msu-thesis/msu-thesis.cls558
-rw-r--r--macros/latex/contrib/msu-thesis/msu-thesis.pdfbin0 -> 226815 bytes
-rw-r--r--macros/latex/contrib/msu-thesis/msu-thesis.tex390
-rw-r--r--macros/latex/contrib/msu-thesis/samples/MSU-thesis-template.pdfbin0 -> 55385 bytes
-rw-r--r--macros/latex/contrib/msu-thesis/samples/MSU-thesis-template.tex146
-rw-r--r--macros/latex/contrib/msu-thesis/samples/MSU-thesis-testfile.bib27
-rw-r--r--macros/latex/contrib/msu-thesis/samples/MSU-thesis-testfile.pdfbin0 -> 135882 bytes
-rw-r--r--macros/latex/contrib/msu-thesis/samples/MSU-thesis-testfile.tex285
-rw-r--r--macros/latex/contrib/msu-thesis/samples/unified.bst1550
10 files changed, 3002 insertions, 0 deletions
diff --git a/macros/latex/contrib/msu-thesis/README b/macros/latex/contrib/msu-thesis/README
new file mode 100644
index 0000000000..33897dc31e
--- /dev/null
+++ b/macros/latex/contrib/msu-thesis/README
@@ -0,0 +1,46 @@
+MSU Thesis Class Version 2.8 2017/12/13
+
+Copyright 2011,2012,2013,2014,2015,2016, 2017 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 for Electronic
+Submission of Master's Theses and Dissertations (October 2017).
+
+The class is based on the memoir document class, and thefore inherits
+all of the functionality of that class.
+
+Installation:
+
+The msu-thesis class is part of both TeXLive and MikTeX, so you should either already have it or should be able to install it with your package manager.
+
+If you wish to install it locally, follow the directions below:
+
+Put msu-thesis.cls
+<local texmf>/tex/latex/msu-thesis
+
+Put msu-thesis.tex, msu-thesis.pdf and the samples folder into
+<local texmf>/doc/latex/msu-thesis
+
+The samples folder contains a thesis test-file and
+a template.
+
+This package may be distributed and/or modified under the conditions of
+the LaTeX Project Public License, either version 1.3 of this license or
+any later version. The latest version of this license is in
+http://www.latex-project.org/lppl.txt and version 1.3 or later is part
+of all distributions of LaTeX version 2005/12/01 or later.
+
+This package has the LPPL maintenance status `maintained'.
+
+The Current Maintainer of this package is Alan Munn.
+
+This package consists of the following source file:
+msu-thesis.cls,
+Documentation files:
+msu-thesis.tex and msu-thesis.pdf;
+A template file: MSU-thesis-template.tex;
+A test file, test bibliography, and the Unified Linguistics Stylesheet bst file: MSU-thesis-testfile.tex, MSU-theis-testfile.bib, unified.bst
+
+
+Use at your own risk! Report bugs/problems/questions to <amunn@msu.edu>
+
diff --git a/macros/latex/contrib/msu-thesis/msu-thesis.cls b/macros/latex/contrib/msu-thesis/msu-thesis.cls
new file mode 100644
index 0000000000..d49a2ced1e
--- /dev/null
+++ b/macros/latex/contrib/msu-thesis/msu-thesis.cls
@@ -0,0 +1,558 @@
+% MSU Thesis Class
+%
+% Copyright 2009,2010,2011,2012,2013,2014,2015,2016,2017 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
+%
+%
+% This class may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This package has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this package is Alan Munn.
+%
+% This package consists of the following source file:
+% msu-thesis.cls
+% Documentation files:
+% msu-thesis.tex and msu-thesis.pdf;
+% A template file:
+% MSU-thesis-template.tex
+% A test file and test bibliography:
+% MSU-thesis-testfile.tex, MSU-thesis-testfile.bib
+% It also contains a copy of the LSA Unified Style Sheet for linguistics:
+% unified.bst
+%
+% Version 1.0 2010/04/17 Initial release
+% Version 1.1 2010/04/20 Require etex package (fix problem with qtree)
+% Version 1.2 2010/07/01 Changed TOC depth to include subsubsections
+% Changed footmarkstyle to make footnote marker correct size
+% Changed section definitions to correct double spacing
+% problem
+% Version 1.3 2010/07/02 Fixed subscript size problem within footnotes
+% Changed TOC to have dotted leaders everywhere
+% Version 1.3b 2010/07/02 Now requires at least Memoir v1.618033 [2008/05/27]
+% Version 1.4 2010/08/23 Added options for all Masters degrees
+% Added option [final] to generate additional titlepage
+% and abstract
+% Added new command \advisor for advisor name used in
+% [final] mode
+% Added new environment {msuabstract} for the abstract text
+% Added new titling command \makeabstract which produces
+% the abstracts
+% Fixed first and additional abstract formatting problem
+% Added warning about final mode for paper submission only
+% in anticipation of electronic submission
+% Version 1.4b 2010/12/11 Fixed problems with Appendix formatting in the TOC
+% Version 1.5 2010/12/12 Removed code to format the second abstract since this
+% is no longer part of the document with electronic
+% submission. Removed \advisor command and [final] option.
+% Version 1.5b 2010/12/13 Fixed margins to new specifications; fixed page numbering
+% issue when dedication was missing.
+% Version 1.6 2010/12/16 Bug fixes that introduced another bug. Never released.
+% Version 1.7 2010/12/16 Fixed page numbering problems with TOC; Fixed abstract
+% spacing problem; fixed LOF, LOT etc. spacing problem;
+% by adding command \maketableofcontents; removed
+% environment msuabstract and \makeabstract (no longer
+% needed) (still available for backwards compatibility).
+% Moved samples folder to the doc folder.
+% Version 1.8 2010/12/17 Added spacing code for LOF, LOT etc to the
+% \mem@tableofcontents code. Removed \maketableofcontents
+% command from documentation as it is no longer needed.
+% Removed rule between Chapter and Title after irrational
+% complaints from MSU's Thesis Office. Fixed page numbering
+% problem when Copyright page was missing. Removed varioref
+% and afterpage as required packages.
+% Version 1.9b 2011/07/22 Made footnotes \normalsize (new requirement)
+% Version 2.0 2011/08/24 Added lscape pagestyle for placement of page numbers
+% on landscape pages. Implemented as a package option
+% so that people aren't forced to load lscape or tikz
+% if they don't need it. Compatible also with pdflscape
+% for those using pdflatex; fixed problem with some long
+% TOC entries
+% Version 2.1 2011/09/04 Added code to make the class compatible with hyperref
+% This is experimental, and mainly useful for drafts.
+% Version 2.1b 2012/05/18 Fixed bug with redefinition of \contentsname
+% when babel is loaded.
+% Version 2.1c 2012/05/18 Generalized babel bugfix to work with polyglossia
+% Version 2.1d 2012/05/27 Removed superfluous title redefinition;
+% Made title in abstract upper case (bug);
+% Updated documentation; updated degree list
+% Version 2.2 2012/06/07 Made changes to case of copyright page and program name
+% as per user report. Who knows if the grad school will
+% change their mind again. What kind of people care about this?
+% Name on copyright page is now upper case;
+% Program name is now as typed.
+% Chapter titles now single spaced (bug)
+% lscape option now requires the pdflscape package, since the thesis
+% office demands that the physical pages be rotated.
+% Version 2.3 2012/12/01 Added "Figure" and "Table" to the LOF and LOT entries per new Grad School
+% requirements.
+% Version 2.4 2014/08/04 Changed format of Title Page as per new Grad School requirements.
+% Field of study and Degree are now sentence case and on the same line
+% Added \msu@fieldseparator in case they object to an en-dash. Don't they
+% have better things to do with their time?
+% To comply with the new MSWord mimicry, all section elements in the TOC
+% are bold; this can be turned off with the [noboldtoc] option for a
+% prettier, but possibly non-compliant TOC.
+% Changed capitalization of 'by' to 'By' which makes things so much better...
+% Version 2.5 2014/08/08 Fixed problem with bibliography cover page and appendix formatting
+% Bibliography cover page is now the page that appears in the TOC
+% Different TOC format for 1 or >1 appendices
+% User commands simplified: \appendix = 1 appendix; \appendices = >1
+% Added three TOC options: boldtoc, plaintoc, mixedtoc replacing noboldtoc
+% Improved hyperref support for Appendices and Bibliography
+% 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 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.
+% Version 2.6b 2016/06/08 Reworked some vertical spacing after complaints from the thesis office
+% despite the fact that people successfully submitted theses in May with
+% the previous spacing. This is getting ridiculous.
+% Also updated documentation to show how to add list of abbreviations
+% Version 2.7 2017/06/22 Updated list of degree options; renamed msu@diss to \msu@thesistype and made
+% definition a conditional via \ifmsu@dissertation. Fixed problem with placement
+% of 'to' on title page. Adjusted landscape page number position and added internal
+% \msu@lsyshift for possible adjustment of landscape page numbering. Added boolean
+% to change pagestyle for \chapter within a landscape environment.
+% Fixed spacing issue after contents lists and bibliography and unnumbered chapters
+% Any list of abbreviations \chapter* will need an extra \vspace in the source.
+% Added support for apacite package which messes with bibname and TOC.
+% Removed gb4e compatibility code from distribution.
+% Version 2.8 2017/12/13 Added {publicabstract} environment and \publicabstractname for the public abstract.
+% This is an unnumbered and uncounted abstract. It’s not clear whether the title
+% should be the same as \abstractname. For the moment it is. Updated documentation to
+% include section about microtype and contents lists.
+% Changed \droptitle (again)
+% Fixed capitalization problem with Appendices
+% Use at your own risk!
+% Report bugs/problems/questions to <amunn@msu.edu>
+%
+\def\msu@version{2.8}
+\def\msu@date{2017/12/13}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesClass{msu-thesis}[\msu@date\space Michigan State University Thesis Class version \msu@version]
+\newif\ifmsu@dissertation\msu@dissertationtrue % added v2.7 boolean for \msu@thesistype
+\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\msu@degree{Doctor of Philosophy}}
+\DeclareOption{DEd}{\gdef\msu@degree{Doctor of Education}}
+\DeclareOption{DMA}{\gdef\msu@degree{Doctor of Musical Arts}}
+\DeclareOption{DNP}{\gdef\msu@degree{Doctor of Nursing Practice}}
+\DeclareOption{MA}{\gdef\msu@degree{Master of Arts}\global\msu@dissertationfalse}
+\DeclareOption{MS}{\gdef\msu@degree{Master of Science}\global\msu@dissertationfalse}
+\DeclareOption{MAT}{\gdef\msu@degree{Master of Arts for Teachers}\global\msu@dissertationfalse}
+\DeclareOption{MBA}{\gdef\msu@degree{Master of Business Administration}\global\msu@dissertationfalse}
+\DeclareOption{MFA}{\gdef\msu@degree{Master of Fine Arts}\global\msu@dissertationfalse}
+\DeclareOption{MIPS}{\gdef\msu@degree{Master of International Planning Studies}\global\msu@dissertationfalse}
+\DeclareOption{MHRL}{\gdef\msu@degree{Master of Human Resources and Labor Relations}\global\msu@dissertationfalse}
+\DeclareOption{MMus}{\gdef\msu@degree{Master of Music}\global\msu@dissertationfalse}
+%\DeclareOption{MSN}{\gdef\msu@degree{Master of Science in Nursing}\global\msu@dissertationfalse}
+\DeclareOption{MPH}{\gdef\msu@degree{Master of Public Health}\global\msu@dissertationfalse}
+\DeclareOption{MPP}{\gdef\msu@degree{Master of Public Policy}\global\msu@dissertationfalse}
+\DeclareOption{MSW}{\gdef\msu@degree{Master of Social Work}\global\msu@dissertationfalse}
+\DeclareOption{MURP}{\gdef\msu@degree{Master in Urban and Regional Planning}\global\msu@dissertationfalse}
+\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}}}
+\DeclareOption{boldtoc}{\msu@stupidtoctrue\msu@plaintocfalse\msu@mixedtocfalse}
+\DeclareOption{plaintoc}{\msu@plaintoctrue\msu@stupidtocfalse\msu@mixedtocfalse}
+\DeclareOption{mixedtoc}{\msu@mixedtoctrue\msu@stupidtocfalse\msu@plaintocfalse}
+\ExecuteOptions{PhD}
+\DeclareOption*{
+\PassOptionsToClass{\CurrentOption}{memoir}
+}
+\ProcessOptions\relax
+\LoadClass[12pt,oneside,letterpaper]{memoir}[2008/05/27]
+% Check for older versions of the latex kernel
+\ifx\e@alloc\@undefined
+ \RequirePackage{etex}
+\fi
+% set up landscape page numbering
+% make a boolean for selecting pagestyle properly if \chapter appears in a landscape environment
+\newif\ifmsu@lscapemode\msu@lscapemodefalse
+\ifmsu@lscape
+ \RequirePackage{pdflscape} % this will cause physical pages to be rotated in the PDF
+ \RequirePackage{etoolbox}
+ \AtBeginEnvironment{landscape}{\msu@lscapemodetrue} % to get chapter pagestyle correct
+ \RequirePackage{tikz}
+% adjust \msu@landscapeyshift to meet the thesis office requirements
+% positive values will move the number closer to the bottom of the table
+% 0 satisfied them for a few years and then they complained.
+ \newcommand*{\msu@landscapesyshift}{3.25} % changed 5/3/2017
+ \tikzset{msu landscape pagenum/.style={outer sep=1cm,above,rotate=90,yshift=\msu@landscapesyshift}}
+ \makepagestyle{lscape}
+ \makeevenfoot{lscape}{}{\tikz[remember picture,overlay]
+ \node[msu landscape pagenum] at (current page.east)
+ {\thepage};}{}
+ \makeoddfoot{lscape}{}{\tikz[remember picture,overlay]
+ \node[msu landscape pagenum] at (current page.east)
+ {\thepage};}{}
+\fi
+
+% set up page for MSU Thesis guidelines
+\settypeblocksize{9in}{6.5in}{*}
+\setlrmargins{1in}{*}{*}
+\setulmargins{1in}{*}{*}
+\setheadfoot{.5in}{.5in} % changed 5/3/2017
+
+% 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}
+\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}{.25in} % changed again due to topskip removal 12/13/17
+
+% set up the title page
+% 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.
+\newcommand*\msu@thesistype{\ifmsu@dissertation{DISSERTATION}\else{THESIS}\fi}
+\pretitle{\begin{center}\MakeUppercase}
+\posttitle{\\[\baselineskip]\end{center}}
+\preauthor{\begin{center}By\\[\baselineskip]}
+\postauthor{\end{center}}
+\predate{\vfill\begin{center}\msu@titleintro\msu@thesistype\\[\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}
+\setlength{\beforechapskip}{0pt}
+\setlength{\afterchapskip}{2\baselineskip} % changed 2017/05/03 because of thesis office complaints
+\renewcommand*{\chapnamefont}{\centering\bfseries}
+\renewcommand*{\chapnumfont}{\bfseries}
+\renewcommand*{\chaptitlefont}{\SingleSpacing\bfseries}
+\renewcommand*{\printchapternonum}{} % modified 3/5/2017
+\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
+\setbeforesecskip{0pt}
+\setsecheadstyle{\normalfont\SingleSpacing\large\bfseries}
+\setsubsecheadstyle{\normalfont\SingleSpacing\bfseries}
+\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}
+%\setlength{\cftbeforetableskip}{0pt}
+%\setlength{\cftbeforefigureskip}{0pt}
+\renewcommand{\insertchapterspace}{}
+\setrmarg{3.55em plus1fil} % ragged right titles added 6/15/17
+
+
+
+% Stupid option to make the TOC all bold
+\ifmsu@stupidtoc
+ \def\msu@tocfont{\bfseries}
+ \def\msu@chapfont{\bfseries}
+\fi
+\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\cftsectionfont{\msu@tocfont} % fixed 12/13/17
+ \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}
+\renewcommand*{\cftsubsectionfont}{\msu@tocfont}
+\renewcommand*{\cftsubsubsectionfont}{\msu@tocfont}
+\renewcommand*{\cftsectionpagefont}{\msu@tocfont}
+\renewcommand*{\cftsubsectionpagefont}{\msu@tocfont}
+\renewcommand*{\cftsubsubsectionpagefont}{\msu@tocfont}
+
+
+\renewcommand*{\l@chapter}[2]{%
+ \renewcommand{\cftchapterpagefont}{\msu@chapfont}
+ \l@chapapp{\MakeUppercase{#1}}{#2}{\cftchaptername}} % Format chapter names
+\renewcommand*{\l@appendix}[2]{%
+ \renewcommand{\cftchapterpagefont}{\msu@tocfont}
+ \setlength{\cftchapternumwidth}{2em}
+ \l@chapapp{\msu@tocfont\MakeUppercase{#1}}{#2}{\cftappendixname}} % Format appendix names
+\setlength{\cftchapternumwidth}{3em}
+\setrmarg{3.5em} % better wrapping of long titles
+
+% Added to make sure that chapters within landscape mode have correct pagestyle
+\renewcommand\chapter{%
+ \ifartopt\par\@nameuse{chapterblock}\else
+ \clearforchapter
+ \ifmsu@lscapemode
+ \thispagestyle{lscape}
+ \else
+ \thispagestyle{chapter}
+ \fi
+ \global\@topnum\z@
+ \fi
+ \m@mindentafterchapter
+ \@ifstar{\@m@mschapter}{\@m@mchapter}}
+
+% MSU requires double spacing between entries in the list of tables, figures etc.
+% so we add the commands to change the 'list of'
+% spacing after the ToC is formatted.
+
+\let\oldmem@tableofcontents\mem@tableofcontents
+\renewcommand\mem@tableofcontents[1]{%
+ \oldmem@tableofcontents{#1}%
+ \setlength{\cftbeforechapterskip}{0.0em \@plus\p@}
+ \setlength{\cftparskip}{\baselineskip}
+ \pagestyle{plain}
+}
+
+% set up footnotes
+\footmarkstyle{\normalsize\textsuperscript{#1}} % reset size so that mark is right size
+\setlength{\footmarkwidth}{1.8em}
+\setlength{\footmarksep}{-1.8em}
+\setlength{\footparindent}{1em}
+\renewcommand{\foottextfont}{\normalsize} % footnotes will be 12pt
+\feetbelowfloat % footnotes will appear below bottom floats
+
+% set up abstract and public abstract
+\renewenvironment{abstract}{%
+ \chapter*{\abstractname}
+ \thispagestyle{empty}
+ \plainbreak{-.5} % changed 2016/06/08 after complaints
+ \begin{center}
+ \MakeUppercase{\thetitle}\plainbreak{1}By\plainbreak{1}\theauthor
+ \end{center}
+ \plainbreak{-.5} % changed 2016/06/08 after complaints
+ \DoubleSpacing
+ }{\par}
+%
+% Public abstract is both unnumbered and uncounted (weird)
+% Added 6/24/2017 Nobody has asked yet for this yet, but
+% we’ll add this to the next release.
+%
+% this just stores the current page number and replaces it at the end
+
+\newcounter{msu@pubabspages}
+\newcommand{\publicabstractname}{\abstractname}
+\newenvironment{publicabstract}{%
+ \setcounter{msu@pubabspages}{\value{page}}
+ \chapter*{\publicabstractname}
+ \thispagestyle{empty}
+ \plainbreak{-.5} % changed 2016/06/08 after complaints
+ \begin{center}
+ \MakeUppercase{\thetitle}\plainbreak{1}By\plainbreak{1}\theauthor
+ \end{center}
+ \plainbreak{-.5} % changed 2016/06/08 after complaints
+ \DoubleSpacing
+ }{\clearpage\setcounter{page}{\value{msu@pubabspages}}}
+
+
+% 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}}
+
+% 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}
+
+% make the dedication page
+% changed 2016/06/08 for vertical centering
+% reverted back 2016/06/17
+\newcommand*{\makededicationpage}{%
+ \clearpage
+ \pagestyle{plain}
+ \@setuppart
+ {\centering
+ \normalfont
+ \interlinepenalty \@M
+ \par\msu@dedication\par
+ }\@endpart}
+
+\renewcommand{\mainmatter}{%
+ \DoubleSpacing\pagestyle{plain}\@ifstar{\@smemmain}{\@memmain}}
+
+% This should probably be changed to {\null\vfill} + \afterpartskip
+% But we'll worry about this later.
+%\renewcommand{\beforepartskip}{\vspace*{.35\textheight}}
+%\renewcommand{\beforepartskip}{\vspace*{\fill}}
+\renewcommand{\beforepartskip}{\null\vfill}
+\renewcommand{\afterpartskip}{\null\vfill\newpage}
+
+
+% 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.
+% Redefining \@apppage as well to get the spacing right 2016/06/08
+%
+\newcommand{\msu@apppage}{%
+ \@setuppart
+ \mempreaddapppagetotochook
+ \addappheadtotoc
+ \mempostaddapppagetotochook
+ \partmark{\appendixpagename}%
+ \memapppageinfo{\appendixpagename}%
+ {\centering
+ \interlinepenalty \@M
+ \normalfont
+ \printparttitle{\appendixpagename}\par}%
+ \@endpart}
+
+\let\orig@appendix\appendix
+\let\orig@appendices\appendices
+\renewcommand*{\appendix}{
+ \renewcommand\appendixpagename{Appendix}
+ \renewcommand\appendixtocname{Appendix}
+ \msu@apppage
+ \settocdepth{part}
+ \orig@appendix
+ \renewcommand\thechapter{}
+ \renewcommand\thesection{A.\arabic{section}}}
+\renewcommand*{\appendices}{
+ \msu@apppage
+ \cftinserthook{toc}{APP}
+ \settocdepth{chapter}
+ \orig@appendices}
+
+% make the bibliography page
+% new version modelled after memoir code for appendix page
+% removed extraneous \vfils
+\newcommand\msu@bibpage{%
+ \let\bibtocname\bibname % moved inside this page to beat apacite
+ \let\bibpagename\bibname
+ \cftinserthook{toc}{BIB}
+ \settocdepth{subsubsection} % changed v2.7 to allow for chapter bibs
+ \@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]{}
+\renewcommand{\prebibhook}{\vspace{\cftparskip}} % add extra space before entries to match ToC etc. 6/15/17
+
+\newcommand\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
+
+\newcommand*{\makebibliographypage}{\msu@bibpage}
+\let\makebibliographycover\makebibliographypage
+% Do some stuff at begin document:
+\AtBeginDocument{%
+\let\msucaptiondelim\@contdelim
+% Moved to AtBeginDocument to override apacite
+\@ifpackageloaded{apacite}{\@tocbibfalse}{} % added 6/22/17
+%\topskip=0pt % setting this because the Grad School doesn’t know how to measure -changed back 6/15/17
+\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.
+% Thanks to Florent Chervet for the code.
+% Added hypersetup to remove borders around links 5/9/16
+\@ifpackageloaded{hyperref}%
+{\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 }
+\renewcommand*{\l@chapter}[2]{%
+ \l@chapapp{\MakeLinkUppercase #1}{#2}{\cftchaptername}} % Format chapter names
+\renewcommand*{\l@appendix}[2]{%
+ \l@chapapp{\MakeLinkUppercase #1}{#2}{\cftappendixname}}} % Format appendix names (changed 13/12/17)
+% if no hyperref
+{\relax}
+}
+\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/msu-thesis/msu-thesis.pdf b/macros/latex/contrib/msu-thesis/msu-thesis.pdf
new file mode 100644
index 0000000000..b3fc578121
--- /dev/null
+++ b/macros/latex/contrib/msu-thesis/msu-thesis.pdf
Binary files differ
diff --git a/macros/latex/contrib/msu-thesis/msu-thesis.tex b/macros/latex/contrib/msu-thesis/msu-thesis.tex
new file mode 100644
index 0000000000..e995df49da
--- /dev/null
+++ b/macros/latex/contrib/msu-thesis/msu-thesis.tex
@@ -0,0 +1,390 @@
+% !TEX TS-program = pdflatexmk
+
+\documentclass[11pt]{article}
+
+\def\msuversion{2.8}
+\def\msudate{2017/12/13}
+\title{\textbf{Using the MSU Thesis Class}}
+\author{\textbf{Alan Munn}\\Department of Linguistics and Languages\\\texttt{\href{mailto:amunn@msu.edu}{amunn@msu.edu}}}
+\date{Version \msuversion\\\msudate}
+\usepackage[T1]{fontenc}
+\usepackage[lmargin=.75in,rmargin=.75in,tmargin=1in,bmargin=1in]{geometry}
+\usepackage{titling}
+\usepackage[utf8]{inputenc}
+\usepackage{array, booktabs, multicol, fancyhdr, xspace,tabularx}
+\usepackage{enumitem}
+\usepackage{fancyvrb,listings,url}
+\usepackage[sf]{titlesec}
+\usepackage[colorlinks=true]{hyperref}
+
+
+
+\DefineShortVerb{\|}
+\newcommand*\bs{\textbackslash}
+
+
+\IfFileExists{luximono.sty}%
+{%
+ \usepackage[scaled]{luximono}%
+}
+{%
+ \IfFileExists{beramono.sty}%
+ {%
+ \usepackage[scaled]{beramono}%
+ }{}
+}
+
+
+\lstset{%
+ basicstyle=\ttfamily\small,
+ commentstyle=\itshape\ttfamily\small,
+ showspaces=false,
+ showstringspaces=false,
+ breaklines=true,
+ breakautoindent=true,
+ frame=single
+ captionpos=t
+ language=TeX
+}
+
+\newcommand*{\pkg}[1]{\texttt{#1}\xspace}
+\setitemize[1]{label={}}
+\setitemize[2]{label={}}
+\setdescription{font={\normalfont}}
+\setlength{\droptitle}{-1in}
+
+\lhead{}
+\chead{}
+\rhead{}
+\lfoot{\emph{}}
+\cfoot{\thepage}
+\rfoot{}
+\renewcommand{\headrulewidth}{0pt}
+\renewcommand{\footrulewidth}{0pt}
+\pagestyle{fancy}
+
+
+\begin{document}
+\maketitle
+\thispagestyle{empty}
+\renewcommand{\abstractname}{\sffamily Abstract}
+
+\abstract{\noindent\begin{quote} This is a class file for MSU theses and dissertations. It is based on the \pkg{memoir} class, and therefore supports all of the functionality of that class. It should generate a document which meets all the basic formatting requirements laid out by the \href{https://grad.msu.edu/etd/formatting-guide}{Formatting Guide For Submission of Master’s Theses and Doctoral Dissertations} (October 2017) produced by the Graduate School, including requirements for margins, titlepage, page numbering, section titles, sub- and superscript sizes etc.\end{quote}}
+\section{Introduction}
+Formatting a dissertation according to a University's thesis requirements is not always a simple task in \LaTeX, especially since the requirements are generally aimed at MSWord users. Furthermore, most of the work of formatting a document is supposed to be done by the document class itself, and not by the individual user. Fortunately, Michigan State University's thesis requirements are actually sane, and fairly straightforward. The present class file is designed to further make the process easier for \LaTeX\ users, by doing all the heavy lifting for you, so that you can focus on the content and not the formatting.
+\section{Background}
+The MSU Thesis Class is based on the \pkg{memoir} document class. The \pkg{memoir} class is an extensive class that incorporates the functionality of many other packages into it. The class is extensively documented, and the documentation (\pkg{memman.pdf}) should be available with any \TeX\ distribution. I strongly recommend that you familiarize yourself with \pkg{memoir} as you use the present class.
+\section{Package Options}
+In addition to any options passed to the \pkg{memoir} class (e.g. |oldfontcommands|; see Section \ref{sec:fonts}), the \pkg{msu-thesis} takes three options: one to specify the type of degree, (see Table~\ref{degrees}), one to enable landscape page numbering and one to make small adjustments to Table of Contents. If no degree option is specified, a Ph.D. dissertation is assumed.
+\begin{table}
+\centering
+\begin{tabularx}{.8\textwidth}{>{\ttfamily}lX}
+\toprule
+\multicolumn{1}{c}{Option name} & \multicolumn{1}{l}{Description}\\
+\midrule
+{[PhD]} & Doctor of Philosophy (default)\\
+{[DEd]} & Doctor of Education\\
+{[DMA]} & Doctor of Musical Arts\\
+{[MA]} & Master of Arts\\
+{[MS]} & Master of Science\\
+{[MAT]} & Master of Arts for Teachers \\
+{[MBA]} & Master of Business Administration \\
+{[MFA]} & Master of Fine Arts \\
+{[MIPS]} & Master of International Planning Studies \\
+{[MHRL]} & Master of Human Resources and Labor Relations \\
+{[MMus]} & Master of Music \\
+%{[MSN]} & Master of Science in Nursing \\
+{[MPH]} & Master of Public Health\\
+{[MPP]} & Master of Public Policy \\
+{[MSW]} & Master of Social Work \\
+{[MURP]} & Master in Urban and Regional Planning \\
+\bottomrule
+\end{tabularx}
+\caption{Package degree options}\label{degrees}
+\end{table}
+\subsection{The \pkg{[lscape]} option}
+The Formatting Guide requires that any lansdscape pages be numbered in landscape mode (i.e. along the long edge of the page) rather than in portrait mode, and rotated in the final PDF. The |[lscape]| option enables this. The option loads both the \pkg{pdflscape} package and \pkg{tikz}, and is implemented as a class option so that you are not required to load those packages if they are not needed.
+\subsection{The contents options}
+In 2013 I received reports that the thesis office now requires all elements in the Table of Contents to have the same formatting as they are in the main document, which means that all section, subsection, and subsubsection headings need to be bold. Since this looks very ugly, I have created two options to turn it off, the |[plaintoc]| option (which makes all ToC entries plain) and |[mixedtoc]| option (which makes Chapters bold and other elements plain). I suspect that the thesis office checkers don't notice this all the time so if you want to have a prettier table of contents and are willing to have that format be corrected, you can use these options to turn off the MSWord inspired ugliness of an entirely bold Table of Contents. I've made |[plaintoc]| the default. If you are forced by the thesis office to have an entirely bold ToC, use the |[boldtoc]| option.
+
+\section{User commands}
+In addition to all the user functionality defined by \pkg{memoir}, the \pkg{msu-thesis} class defines five new titling commands.
+\begin{quote}
+\begin{description}
+\item[\texttt{\bs fieldofstudy\{\}}] Takes one argument corresponding to your field of study.
+\item[\texttt{\bs dedication\{\}}] Takes one argument (should be short), your dedication.
+\item[\texttt{\{publicabstract\}}] Environment for the public abstract (unnumbered, uncounted).
+\item[\texttt{\bs makecopyrightpage}] Creates the copyright page.
+\item[\texttt{\bs makededicationpage}] Creates the dedication page.
+\item[\texttt{\bs makebibliographypage}] Creates the bibliography cover page.
+\end{description}
+\end{quote}
+\section{Using the class}
+\subsection{Logical parts of the document}
+
+Most book-length documents are divided into three main kinds of parts: the front matter, the main matter, and the back matter. In \pkg{memoir} (and therefore \pkg{msu-thesis}) these sections are preceded by the commands |\frontmatter|, |\mainmatter|, and |\backmatter|. These commands tell the class when to change the page numbering, for example, front matter pages use lower case roman numerals, but main matter pages use arabic numerals.
+
+The basic outline of a dissertation or thesis document is shown in Table~\ref{structure}: (your thesis may not have all of these parts, but if it does, they should be in this order.) You can find an annotated copy of the basic structure in the \href{https://ctan.org/tex-archive/macros/latex/contrib/msu-thesis/samples}{\pkg{samples}} folder of the \pkg{msu-thesis} documentation.
+
+\begin{table}[ht]
+\begin{itemize}
+\item |\begin{document}|
+\item |\frontmatter|
+\begin{itemize}
+ \item Titlepage
+ \item Public Abstract
+ \item Abstract
+ \item Copyright Page
+ \item Dedication
+ \item Acknowledgements
+ \item Preface
+ \item Table of Contents
+ \item List of Tables
+ \item List of Figures
+ \item List of Abbreviations/Symbols
+\end{itemize}
+\item |\mainmatter|
+\begin{itemize}
+ \item Chapter 1
+ \item Chapter 2
+ \item \ldots
+ \item Chapter $n$
+ \item{Appendices}
+\end{itemize}
+\item |\backmatter|
+\begin{itemize}
+ \item{Bibliography}
+\end{itemize}
+\item |\end{document}|
+\end{itemize}
+\caption{Basic structure of a thesis or dissertation}\label{structure}
+\end{table}
+\subsection{What does the class file do?}
+The class itself sets up the margins, page numbering, and formatting of all of the required pieces. It doesn't put everything in the right order, so you are responsible for that. The best way to do this is to use the included sample \LaTeX\ file as a basic template for your thesis.
+\subsection{Line Spacing}
+The \pkg{memoir} class provides commands for single and double spacing (|\SingleSpacing| and |\DoubleSpacing|) most of your thesis will be double spaced, but certain parts (such as the table of contents, lists of figures/tales, bibliography) may be single spaced. This duplicates the functionality of the \pkg{setspace} package, which therefore should not be used. For bibliography spacing issues, see also Section \ref{bibspacing}.
+
+\subsection{Font changing commands}\label{sec:fonts}
+\sloppy The \pkg{memoir} class enforces the so-called ``new'' font changing commands (although they have now been in use for many years.) This means that it does not allow you to use the commands |\bf|, |\it|, |\rm|, etc. Unfortunately there are some old packages that still use these commands, and there is also some outdated information on the web that might have examples using these commands. You should generally not use these commands (see \href{http://www.tex.ac.uk/cgi-bin/texfaq2html?label=2letterfontcmd}{Two Letter Font Commands}); if you do encounter problems, you can pass the option |[oldfontcommands]| to the class.
+\subsection{Extra Packages}
+The \pkg{memoir} class replicates the functionality of many independent packages, so if you are transferring \LaTeX\ source from other documents using the \pkg{article} class, you may encounter some warnings or errors. The \pkg{memoir} documentation has substantial information about the packages it emulates, and the packages for which it provides equivalent functionality. See Chap. 18 Sec. 24 of the \pkg{memoir} manual for details. Quoting from the manual:
+\begin{quote} \pkg{memoir} emulates the following packages: {\sffamily abstract, appendix, array, booktabs, ccaption, chngcntr, crop, dcolumn, delarray, enumerate, epigraph, ifmtarg, ifpdf, index, makeidx, moreverb, needspace, newfile, nextpage, pagenote, patchcmd, parskip, setspace, shortvrb, showidx, tabularx, titleref, tocbibind, tocloft, verbatim}, and {\sffamily verse}. It also provides functions equivalent to those in the following packages, although the class does not prevent you from using them: {\sffamily fancyhdr, framed, geometry, sidecap, subfigure}, and \sffamily{titlesec}.\\\hfill{\normalfont\emph{The Memoir Class} 8th Ed. 2010, p.339}
+\end{quote}
+\subsection{Captions}
+\subsubsection{Caption delimiter}
+Because the thesis office doesn't understand anything about punctuation it requires the colon that would appear in a caption to also appear in the contents lists. Since they don't care about the colon itself, but just consistency I've removed colons from the captions entirely, since leaving it in makes the contents lists look really stupid. But in case you or your advisor want the colon in captions, you can add the colon back in by using the Memoir command |\captiondelim{:\space}| and the class will make sure the Lists of Tables and Figures match in formatting.
+\subsubsection{New lists}
+If you are using other kinds of floats such as listings, you should use the Memoir |\newlistof| command to make the relevant list. The class provides a macro |\msucaptiondelim| which can be used to make sure the formatting of the captions in the list-of-X match the setting you have for Figures and Tables. Here is an example of how you would add a listings list. The following code goes in your preamble:
+\begin{quote}
+\begin{lstlisting}
+\newlistof{listoflistings}{lol}{List of Listings}
+\newfloat[chapter]{listing}{lol}{Listing}
+\newlistentry{listing}{lol}{0}
+\renewcommand*{\cftlistingname}{Listing\space}
+\renewcommand*{\cftlistingaftersnum}{\msucaptiondelim}
+\end{lstlisting}
+\end{quote}
+
+Then in your front matter you include a |\listoflistings| in the same way you would add the |\listoffigures| or |\listoftables| (preceded by a |\clearpage|). In your actual document you would use. (Note that this code doesn't actually format a listing as code; you would further embed your favourite code listing environment inside this environment.)
+
+\begin{quote}
+\begin{lstlisting}
+\begin{listing}
+Your listing code here
+\end{listing}
+\end{lstlisting}
+\end{quote}
+
+Another common kind of list is a List of Abbreviations. The thesis office seems to want to call this “Key to Abbreviations”. To add such a list, you need to do the following:
+
+\begin{quote}
+\begin{lstlisting}
+\clearpage
+\chapter*{Key to Abbreviations}
+\vspace{\cftparskip}
+\addcontentsline{toc}{chapter}{Key to Abbreviations}
+Your list of abbreviations here.
+\end{lstlisting}
+\end{quote}
+\subsection{The \pkg{microtype} package and contents lists}
+If you use the \pkg{microtype} package with |protrusion| set, it’s best to turn it off before your contents lists. You can do this by using |\microtypesetup{protrusion=false}|
+before the contents lists and |\microtypesetup{protrusion=true}| afterwards. Schematically:
+
+\begin{quote}
+\begin{lstlisting}
+\microtypesetup{protrusion=false}
+\tableofcontents*
+\clearpage
+\listoftables
+\clearpage
+\listoffigures
+...
+\microtypesetup{protrusion=true}
+\end{lstlisting}
+\end{quote}
+
+\subsection{Public abstract}
+If your thesis requires a public abstract, it should go immediately before the regular abstract. Use the |{publicabstract}| environment for this.
+\subsection{Landscape figures and tables}
+If you have large figures and tables that must be rotated, you should use the |[lscape]| class option. This enables a pagestyle |lscape| and places the page numbers correctly on the long edge of the page. The option loads the \pkg{pdflscape} package which provides a |landscape| environment to place the landscape figure in. Before the landscape environment, you need to issue a |\clearpage| command and change the pagestyle to |lscape|, and afterwards, change it back to |plain|. Schematically, then, any landscape pages should be created in the following way.
+
+\begin{quote}
+\begin{lstlisting}
+\clearpage\pagestyle{lscape}
+\begin{landscape}
+ ... your large table(s) or figure(s) here
+\end{landscape}
+\pagestyle{plain}
+\end{lstlisting}
+
+\end{quote}
+
+The |landscape| environment makes all pages within it landscape, so if you have multiple landscape figures in a row, you can put all of them inside a single |landscape| environment. This option correctly rotates the landscape pages within the pdf document itself, which the thesis office seems to require.
+\subsection{Appendices}
+Appendices in a thesis are usually at the end of the document, but before the bibliography. MSU requires appendices to be preceded by a cover page which says either ``Appendix'' (if there is only one) or ``Appendices'' if there is more than one. Memoir deals with multiple appendices by using an |appendices| environment.
+\subsubsection{Single appendix}
+If you have a single appendix, your code should look like this:
+
+\begin{quote}
+\begin{lstlisting}
+\appendix
+\chapter{Your appendix title}
+Appendix text goes here
+\end{lstlisting}
+\end{quote}
+
+\subsubsection{Multiple appendices}
+If you have more than one appendix, your code should look like this:
+
+\begin{quote}
+\begin{lstlisting}
+\begin{appendices}
+\chapter{Your first appendix title}
+Appendix text goes here
+\chapter{Your second appendix title}
+Appendix text goes here
+\end{appendices}
+\end{lstlisting}
+\end{quote}
+
+\subsubsection{Appendices per chapter}
+If you need to add an appendix or appendices to a chapter, you should use the |subappendices| environment and use |\section| for each appendix. So your code should look like this:
+
+\begin{quote}
+\begin{lstlisting}
+\begin{subappendices}
+\section{Your first appendix title}
+Appendix text goes here
+\section{Your second appendix title}
+Appendix text goes here
+\end{subappendices}
+\end{lstlisting}
+\end{quote}
+\subsection{Bibliography spacing}\label{bibspacing}
+Please note that although bibliography entries must be single spaced, there must be a space between each entry. This parameter is set by your bibliography package and not by the class itself. If you are using |natbib| it is |\bibsep| and if you are using |biblatex| it is |\bibitemsep|. These are lengths and may be set by using |\setlength|. Depending on your bibliography style, you may need to set these to be |\baselineskip|, e.g. |\setlength{\bibitemsep}{\baselineskip}|.
+
+\subsection{Customizing the look of things}
+I have created a basic looking style for Chapter headings based on the |thatcher| style in |memoir|. If you want to change these things, you may, using the appropriate |\renewcommand| commands. More information can be found in the |memoir| documentation. The Thesis Office seems to require dotted leaders for the List of Figures/Tables in the Table of Contents, (despite the guide saying they are optional) even though they get typeset as Chapters. If you wish your Chapter headings to have no leaders, add the following command just after the |\mainmatter| command. To put the dots back for the Bibliography, repeat the same command right after the |\backmatter| command, but replace |\cftnodots| with |\cftdotsep|. The default template leaves dots everywhere, which should appease the thesis office.
+\begin{quote}
+\begin{lstlisting}
+\addtocontents{toc}{%
+ \protect\renewcommand{\protect\cftchapterdotsep}
+ {\cftnodots}}
+\end{lstlisting}
+\end{quote}
+Despite there being no explicit formatting requirements for Chapter headings (other than that they start 1 in from the top of the page), the thesis office has been known to dislike many things, so if you do decide to change things, be prepared for rejection or a frustrating fight.
+\subsection{Things to watch out for}
+\begin{itemize}[label={\textbullet}]
+\item If you are having problems with the Thesis office about non-conforming formatting, please check first whether you have a local copy of the class instead of the latest version distributed via CTAN. The log file will reflect the date of the current version number. Remember if you are using the most current and updated TeXLive or MikTeX you will automatically have the latest version already and you should not need to install a local version.
+\item If your title is long and you want to put a newline (|\\|) into it to improve the spacing, you must precede the newline with |\protect|.
+\item Make sure you pay attention to any ``Overfull hbox'' warnings when you are producing your final copy. You should make sure you eliminate all of them or else the thesis office is likely to reject your thesis. One common way to eliminate such warnings is to place the command |\sloppy| at the beginning of the paragraph that triggers the warning. You should only use this technique at the very end when you are completely done with everything. Alternatively, rewording the text may also fix things.
+\item Remember to use the |\tableofcontents*| command so that your table of contents is not listed in the table of contents.
+\item Remember to use the |appendices| environment instead of |\appendix| if you have more than one appendix.
+\item Remember to add the |\makebibliographypage| command before your bibliography.
+\end{itemize}
+
+\section{Bugs and redistribution}
+\subsection{Current version}
+The latest copy of \pkg{msu-thesis} will always be available on \href{https://ctan.org/pkg/msu-thesis?lang=en}{CTAN}. If you use MiKTeX, or a current year TeX Live then their respective package managers will update or install the latest version. If you are using a Linux-based distribution, or your TeXLive distribution is not the most recent year, you may need to install the latest copy in your local |texmf| directory. If you want others to use the class, \textsc{please} point them to CTAN, so that they can get an up-to-date version with all accompanying documentation and examples rather than passing along your copy. Please report \textsc{any} problems you have with the class to me \href{mailto:amunn@msu.edu}{amunn@msu.edu}, as this will aid in making things easier for those who follow you. The Graduate School rarely announces changes it makes to the formatting requirements, so your problem reports are extremely helpful for keeping the class in compliance with the latest standards.
+\subsection{Archiving your thesis for the future}
+Since the current version of the \pkg{msu-thesis} class satisfies the Graduate School requirements at any one time, as these requirements change, you may find that if you need to recompile your thesis after you have graduated that the formatting changes. To avoid this, I would recommend saving an archived version of the \pkg{msu-thesis.cls} file in the same folder as your thesis file. You only need to do this once you have completely finished your thesis however; there's no need to do it during the writing process.
+\subsection{Version history}
+Previous versions of \pkg{msu-thesis} (versions 1.0--1.4b) were created for non-electronic submission and should not be used. Versions 1.5--1.6 (the first electronic submission versions) contained a |\makeabstract| command and a separate |msuabstract| environment. These have been removed as of version 1.7. Users who are upgrading from earlier versions to version 1.7 do not need to change these commands however but their use will trigger a warning.) Version 2.0 implemented landscape pages; version 2.1 added support for \pkg{hyperref}. Versions 2.2--2.5 mainly accommodated to the ever changing whims of the MSU Graduate School. Version 2.6 fixed some appendix bugs introduced by the previous whim accommodation. Version 2.7 fixed various small spacing issues, fixed a bug which prevented a new chapter page to be a landscape page, added support for the \pkg{apacite} package, and updated degree options. Version 2.8 fixed some spacing and capitalization issues and added support for the the public abstract.
+\section{Acknowledgements}
+Thanks to Lars Madsen, Ulrike Fischer and Peter Wilson for help with setting up parts of the memoir code for versions 1.0--1.4 (now eliminated due to changed requirements). Thanks to Wolfgang Sternefeld for supplying the \pkg{linguex} spacing fix code, Leo Liu for the landscape page numbering code, which greatly simplified my original version, and Florent Chervet for the hyperref code. Thanks also to the following students who have reported problems over the years: Irina Agafonova, Ali Al-jiboory, Dmitriy Bryndin, Greg Christian, Kyle Crayne, Matt Husband, Changkuk Jung, Adam Liter, William Muir, Adam Soliman, Alicia Parrish, Neil ver Planck, Michael Wojcik, Eremey Valetov, Matthew Vincent and Yisu Zhou. A special thank you to Non Thongprong who graciously provided a copy of his entire thesis which allowed me to debug some especially subtle spacing inconsistencies.
+
+\appendix
+\renewcommand{\thesection}{Appendix \Alph{section}}
+\clearpage
+\section{Sample template}
+You can find a copy of this template \href{http://mirrors.ctan.org/macros/latex/contrib/msu-thesis/samples/MSU-thesis-template.tex}{here}.
+\enlargethispage{2\baselineskip}
+\begin{lstlisting}
+\documentclass[PhD]{msu-thesis}
+% Your extra packages here
+%
+% Define the title, author, field of study, date, and dedication (optional)
+%
+\title{The syntax and semantics of phonology}
+\author{Joe Linguist}
+\fieldofstudy{Linguistics} % should be in sentence case
+\dedication{This thesis is dedicated to someone.}
+\date{2014}
+%
+\begin{document}
+\frontmatter
+%
+\maketitlepage
+%
+\begin{abstract}
+Your abstract text here
+\end{abstract}
+%
+\clearpage
+\makecopyrightpage
+\makededicationpage
+%
+\clearpage
+\chapter*{Acknowledgements}
+\DoubleSpacing
+Your acknowledgements here
+%
+\clearpage
+\SingleSpacing
+\tableofcontents*
+\clearpage
+\listoftables
+\clearpage
+\listoffigures
+%
+\mainmatter
+\chapter{Your first chapter}
+%
+\appendix
+\chapter{Your first appendix}
+\backmatter
+\makebibliographypage
+\SingleSpacing
+\bibliography{your-bib-file}
+\end{document}
+
+\end{lstlisting}
+\clearpage
+\section{Linguistic Examples with \pkg{gb4e} and \pkg{linguex}}
+The \pkg{msu-thesis} class has been tested with both the \pkg{gb4e} package, and the \pkg{linguex} package. Unfortunately some versions of \pkg{gb4e} use old font commands, and so does \pkg{linguex}, so if you encounter problems with either package, load the class with the |oldfontcommands| option. Since linguistic examples are usually single spaced, even in theses, you should use the |\singlegloss| command (from the \pkg{cgloss4e} package loaded by both \pkg{gb4e} and \pkg{linguex}) to make your glosses examples singlespaced. The default mode for examples themselves is to make them doublespaced. If you want all examples to be single spaced (which looks better if the examples take up more than one line) you need to put the following code in your preamble, which redefines the |exe| environment to be single spaced. The |\patchcommand| macro is part of \pkg{memoir}. Other patching commands such as those provided by the \pkg{etoolbox} package could also be used.
+\begin{quote}
+\begin{lstlisting}
+\patchcommand{\exe}{\SingleSpacing}{}
+\end{lstlisting}
+\end{quote}
+For the \pkg{linguex} package, you can use the following code:
+\begin{quote}
+\begin{lstlisting}
+\patchcommand{\ex}{\SingleSpacing}{}
+\renewcommand{\ExEnd}{%
+ \ifnum\theExDepth=0\global\unembeddedfalse\DoubleSpacing\else%
+ \end{list}\addtocounter{ExDepth}{-1}\ExEnd\fi}
+\end{lstlisting}
+\end{quote}
+
+\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/msu-thesis/samples/MSU-thesis-template.pdf b/macros/latex/contrib/msu-thesis/samples/MSU-thesis-template.pdf
new file mode 100644
index 0000000000..93ded329af
--- /dev/null
+++ b/macros/latex/contrib/msu-thesis/samples/MSU-thesis-template.pdf
Binary files differ
diff --git a/macros/latex/contrib/msu-thesis/samples/MSU-thesis-template.tex b/macros/latex/contrib/msu-thesis/samples/MSU-thesis-template.tex
new file mode 100644
index 0000000000..c0ef1706b7
--- /dev/null
+++ b/macros/latex/contrib/msu-thesis/samples/MSU-thesis-template.tex
@@ -0,0 +1,146 @@
+% This is a template for use with the MSU Thesis class
+% Vesion 2.8 2017/12/13
+%
+% Class options:
+%[PhD] Doctor of Philosophy (default)
+%[DEd] Doctor of Education
+%[DMA] Doctor of Musical Arts
+%[MA] Master of Arts
+%[MS] Master of Science
+%[MAT] Master of Arts for Teachers
+%[MBA] Master of Business Administration
+%[MFA] Master of Fine Arts
+%[MIPS] Master of International Planning Studies
+%[MHRL] Master of Human Resources and Labor Relations
+%[MMus] Master of Music
+%[MPH] Master of Public Health
+%[MPP] Master of Public Policy
+%[MSW] Master of Social Work
+%[MURP] Master in Urban and Regional Planning
+%%
+% Default is PhD
+%
+%
+% This template has everything in the right order.
+% Just add real content and you're done!
+%
+\documentclass[]{msu-thesis}
+%
+% for a prettier, but possibly non-compliant table of contents use the [mixedtoc] option
+% for a plain table of contents use the [plaintoc] option
+% for a horrendous looking, but possibly required table of contents, use the [boldtoc] option
+%
+% If you have large tables/figures that need to be in landscape mode, add the [lscape] option
+
+% This is standard fontenc/inputenc for pdflatex
+% If you use LuaLaTeX or XeLaTeX you should replace this with the fontspec package
+\usepackage[utf8]{inputenc}
+\usepackage[T1]{fontenc}
+%
+% If the thesis office requires Times, we'll give them Times
+% You can experiment with other font packages here if you like.
+% If you are using XeLaTeX or LuaLaTeX load the Times or Times New Roman font with \setmainfont
+\usepackage{newtxtext,newtxmath}
+%
+% Load any extra packages here
+%
+% You must specify the title of your thesis, your name, the field of study (not department), and the year
+\title{The syntax and semantics of phonology}
+\author{Joe Linguist}
+\fieldofstudy{Linguistics} % This should be in sentence case
+\date{2017}
+
+% If you want a dedication page, specify the text of the dedication here and uncomment the next command.
+%
+%\dedication{This thesis is dedicated to someone.}
+%
+\begin{document}
+
+% All the stuff before your actual chapters is called the front matter
+\frontmatter
+% First make the title page
+\maketitlepage
+% Next make the abstract
+\begin{abstract}
+% Your abstract goes here. Master's 1 page max. PhD 2 page max.
+\end{abstract}
+
+% Force a newpage
+\clearpage
+% Make the copyright page. The Graduate School ridiculously prohibits you
+% from having a copyright page unless you pay ProQuest to register the copyright.
+% This should be illegal, but I didn't make up the rule.
+
+\makecopyrightpage
+
+% If you have a dedication page, uncomment the next command to print the dedication page
+%
+%\makededicationpage
+%
+\clearpage
+% Your Acknowledgements are formatted like a chapter, but with no number
+\chapter*{Acknowledgements}
+\DoubleSpacing % Acknowledgements should be double spaced
+Your acknowledgements here.
+%
+\clearpage
+% We need to turn single spacing back on for the contents/figures/tables lists
+\SingleSpacing
+\tableofcontents* % table of contents will not be listed in the TOC
+\clearpage
+\listoftables % comment this out if you have no tables
+\clearpage
+\listoffigures % comment this out if you have no figures
+%
+% If you have a list of abbreviations/symbols it would go here preceded by a \clearpage
+% See the class documentation and the Memoir manual for how to create other lists
+%
+\mainmatter
+%
+% The next line removes the dots in chapter headings in the TOC
+% May violate thesis office rules
+%\addtocontents{toc}{\protect\renewcommand{\protect\cftchapterdotsep} {\cftnodots}}
+
+\chapter{Your first chapter}
+%
+% If you have pages that must appear in landscape mode, use the [lscape] documentclass option
+% and enclose the pages in a {landscape} environment.
+%\clearpage\pagestyle{lscape} % first clear the page and change the pagestyle
+%\begin{landscape}
+%
+% your landscape table(s) or figure(s) here
+%
+%\end{landscape}
+%\pagestyle{plain} % remember to change the pagestyle back to plain
+%
+%
+% If you have appendices, they would go here.
+% Comment these lines out if you don't
+% If you have more than one appendix, you need to use
+% \begin{appendices}
+% \chapter{First appendix}
+% \chapter{Second appendix}
+% \end{appendices}
+%
+\appendix
+\chapter{Your appendix}
+%
+\backmatter
+% The next lines add the dots back into the References/Bibliography heading
+% of the TOC. Only uncomment this if you need to put the dots back in having removed them for Chapter headings.
+%
+%\addtocontents{toc}{%
+% \protect\renewcommand{\protect\cftchapterdotsep} {\cftdotsep}}
+%
+\makebibliographypage % make the bibliography cover page
+% Bibliography can be single spaced
+%
+\SingleSpacing
+%
+% Your bibliography command here (e.g. \bibliography{your-bib-file}) if using natbib
+%
+% Remember that although the bibliography is single spaced, there needs to
+% be a blank line between entries. This is set by your bibliography package
+% If you are using natbib it is \bibsep; if using biblatex it's \bibitemsep
+\end{document}
+
diff --git a/macros/latex/contrib/msu-thesis/samples/MSU-thesis-testfile.bib b/macros/latex/contrib/msu-thesis/samples/MSU-thesis-testfile.bib
new file mode 100644
index 0000000000..3295073e92
--- /dev/null
+++ b/macros/latex/contrib/msu-thesis/samples/MSU-thesis-testfile.bib
@@ -0,0 +1,27 @@
+%% This BibTeX bibliography file was created using BibDesk.
+%% http://bibdesk.sourceforge.net/
+
+
+%% Created for Alan Munn at 2017-06-23 13:07:54 -0400
+
+
+%% Saved with string encoding Unicode (UTF-8)
+
+
+
+@article{Munn1999,
+ Author = {Alan Munn},
+ Date-Modified = {2017-06-22 21:40:46 +0000},
+ Journal = {Linguistic Inquiry},
+ Pages = {643-668},
+ Title = {First Conjunct Agreement: Against a Clausal Analysis},
+ Volume = {30},
+ Year = {1999}}
+
+@article{Munn2005,
+ Author = {Alan Munn and Cristina Schmitt},
+ Journal = {Lingua},
+ Pages = {821-855},
+ Title = {Number and Indefinites},
+ Volume = {115},
+ Year = {2005}}
diff --git a/macros/latex/contrib/msu-thesis/samples/MSU-thesis-testfile.pdf b/macros/latex/contrib/msu-thesis/samples/MSU-thesis-testfile.pdf
new file mode 100644
index 0000000000..994c15adc0
--- /dev/null
+++ b/macros/latex/contrib/msu-thesis/samples/MSU-thesis-testfile.pdf
Binary files differ
diff --git a/macros/latex/contrib/msu-thesis/samples/MSU-thesis-testfile.tex b/macros/latex/contrib/msu-thesis/samples/MSU-thesis-testfile.tex
new file mode 100644
index 0000000000..fe74407b75
--- /dev/null
+++ b/macros/latex/contrib/msu-thesis/samples/MSU-thesis-testfile.tex
@@ -0,0 +1,285 @@
+% !TEX TS-program = pdflatexmk
+% v2.8 Testfile
+\listfiles
+
+\documentclass[lscape]{msu-thesis}
+% lscape option is needed for this sample file to show correct placement
+% of page numbers on landscape pages. If you don't have any landscape pages
+% in your document, you don't need to load this option.
+\usepackage[T1]{fontenc}
+\usepackage{newtxtext,newtxmath} % If they want Times we’ll give them Times
+\usepackage{amsmath}
+%
+\usepackage[]{natbib}
+\bibliographystyle{unified}
+
+
+% If you need newlines in your title, you must use \protect\\
+\title{Topics in the Syntax and Semantics of Phonology}
+\author{Joe Linguist}
+\fieldofstudy{Linguistics}
+\dedication{This thesis is dedicated to someone.}
+\date{2017}
+\usepackage{listings}
+\lstset{language=TeX,basicstyle={\ttfamily}}
+\usepackage{lipsum}
+\usepackage{xcolor}
+\usepackage{gb4e}
+
+\usepackage[bookmarksopenlevel=2,bookmarks=true]{hyperref} % not needed but here for testing
+
+\counterwithin{exx}{chapter}
+\singlegloss
+
+% Uncomment the next line for single spaced examples with gb4e
+%\patchcommand{\exe}{\SingleSpacing}{}
+
+% This code is an example of how to set up a new list of
+\newlistof{listoflistings}{lol}{List of Listings}
+\newfloat[chapter]{listing}{lol}{Listing}
+\newlistentry{listing}{lol}{0}
+\renewcommand*{\cftlistingname}{Listing\space}
+\renewcommand*{\cftlistingaftersnum}{\msucaptiondelim}
+
+\begin{document}
+\frontmatter
+\maketitlepage
+\begin{publicabstract}
+\lipsum[1]
+\end{publicabstract}
+\begin{abstract}
+\lipsum[1-6]
+\end{abstract}
+\clearpage
+\makecopyrightpage
+\makededicationpage
+\clearpage
+\chapter*{Acknowledgements}
+\DoubleSpacing
+\lipsum[1]
+\clearpage
+\SingleSpacing
+\tableofcontents* % ToC will not appear in the table of contents
+\clearpage
+\listoftables
+\clearpage
+\listoffigures
+\clearpage
+\listoflistings
+\clearpage
+\chapter{Key to Abbreviations}
+\vspace{\cftparskip} % This is needed to make the list look like the other LoF/LoT/LoL etc.
+\begin{description}
+\item[foo] This is a foo
+\item[bar] This is a bar
+\end{description}
+\mainmatter
+% The next command changes chapters in the TOC to have no dotted leader
+%\addtocontents{toc}{\protect\renewcommand{\protect\cftchapterdotsep}{\cftnodots}}
+\chapter{Introduction}
+This is some text that precedes a section.
+\section{Some section}
+\lipsum[2]
+
+\subsection{Subsection}
+\lipsum
+\subsubsection{Subsubsection}
+\begin{exe}
+\ex\label{1}
+\begin{xlist}
+\ex[]{This is a linguistic example that is very long to see how it wraps around onto the next line of the text.}
+\ex[]{This_{i} is an example_{i} with subscripts.}
+\ex[*]{This is another example.}
+\ex[]{This is a third example}
+\ex[]{\gll Une example francaise\\
+ an example french\\
+\trans A French example.}
+\end{xlist}
+\end{exe}
+
+\lipsum[1]
+\lipsum[2]\cite{Munn1999} says the following.\footnote{A footnote. This is a footnote with a subscript$_{\text{i}_{\text{j}}}$. \lipsum[9]} \lipsum[2]
+\begin{table}
+\centering
+\begin{tabular}{ccc}
+\toprule
+Men & Women & Monsters\\
+\midrule
+29 & 33 & 51\\
+\bottomrule
+\end{tabular}
+\caption{A sample table}
+\end{table}
+
+\lipsum[3]
+\section{More stuff}
+\lipsum[4]\cite{Munn2005}
+\begin{figure}
+\centering
+{\color{gray!40}\rule{2in}{3in}}
+\caption[A sample figure]{A sample figure with a figure caption that is extremely long to show single spacing in the long caption.}
+\end{figure}
+\lipsum[5]
+\lipsum[10]
+\chapter{A chapter with a really long title to see if the chapter titles wrap correctly}
+\lipsum
+\begin{figure}
+\centering
+{\color{gray!40}\rule{4in}{2in}}
+\caption{Another sample figure}
+\end{figure}
+\lipsum[6]
+\section{A section with a really long title to check that sections wrap in the right way}
+\subsection{A subsection with a really long title to check that sections wrap in the right way}
+\subsubsection{A subsubsection with a really long title to check that sections wrap in the right way}
+\begin{table}
+\centering
+\begin{tabular}{ccc}
+\toprule
+Men & Women & Monsters\\
+\midrule
+29 & 33 & 51\\
+\bottomrule
+\end{tabular}
+\caption{Another sample table.}
+\end{table}
+\lipsum[7]
+\begin{exe}
+\ex\label{2}
+\begin{xlist}
+\ex[]{This^{i^{j^{k}}} contains three superscripts of the right size.}
+\ex[]{This_{i_{j_{k}}} contains three subscripts of the right size.}
+\end{xlist}
+\end{exe}
+\begin{figure}
+\centering
+{\color{gray!40}\rule{4in}{2in}}
+\caption{Another sample figure}
+\end{figure}
+\lipsum[2]
+\begin{quote}
+\SingleSpacing
+This is a sample long quotation. \lipsum[2]
+
+\hfill{\citep{Munn1999}}
+\end{quote}
+\begin{table}
+\centering
+\begin{tabular}{ccc}
+\toprule
+Men & Women & Monsters\\
+\midrule
+29 & 33 & 51\\
+\bottomrule
+\end{tabular}
+\caption{Another sample table.}
+\end{table}
+\begin{listing}
+\begin{lstlisting}
+\begin{listing}
+This is a listing
+\end{listing}
+\end{lstlisting}
+\caption{A listing caption}
+\end{listing}
+\begin{listing}
+\begin{lstlisting}
+\begin{listing}
+This is another listing
+\end{listing}
+\end{lstlisting}
+\caption{Another listing caption}
+\end{listing}
+\lipsum[8]
+ Now sample page in landscape (need to use [lscape] option for this)
+ First clear the page. Then make the page style {lscape}
+\clearpage\pagestyle{lscape}
+% Enclose landscape pages in the {landscape} environment. Every page within
+% this environment will be landscape. There is no need to enclose each individual
+% figures/tables in the environment if they appear on a set of adjacent landscape
+% pages.
+\begin{landscape}
+\begin{table}
+\centering
+\begin{tabular}{lllllll}
+
+\toprule
+A & B & C & D & E & F & G \\
+\midrule
+821.3827119 & 661.0913922 & 106.3008156 & 474.009513 & 190.8146776 & 788.4459729 & 784.7964852 \\
+863.5891052 & 308.5023091 & 15.97055732 & 319.4531424 & 932.4330525 & 313.8826277 & 574.5100815 \\
+867.7203343 & 343.6538027 & 34.35605188 & 680.5890553 & 538.4341728 & 510.3271094 & 987.7874714 \\
+144.6465988 & 86.30176472 & 145.0166526 & 26.00087715 & 694.0117063 & 556.0943379 & 650.0605751 \\
+269.5656447 & 979.9087235 & 150.7698724 & 715.0255442 & 312.5203237 & 608.58149 & 737.0459961 \\
+361.7660545 & 38.81968682 & 7.788463243 & 789.031736 & 599.306695 & 407.9588464 & 420.3577306 \\
+22.45176377 & 631.7249181 & 266.0566897 & 81.77581697 & 399.0120086 & 460.8922885 & 341.5815705 \\
+486.3650486 & 398.9817682 & 601.8745699 & 912.7856216 & 102.7510937 & 83.25854643 & 655.1995291 \\
+306.8558515 & 672.2668801 & 582.1884719 & 607.9748493 & 126.3316726 & 672.490033 & 754.4823663 \\
+745.6384032 & 369.5763752 & 170.8671329 & 248.2581139 & 994.2369771 & 28.13615151 & 230.6094341 \\
+270.3421307 & 193.6617479 & 374.94621 & 769.6975098 & 342.6845841 & 917.8180557 & 827.1024885 \\
+360.3810025 & 780.7139757 & 415.9038887 & 846.3157501 & 96.64026956 & 954.7160727 & 21.71722262 \\
+487.6847246 & 200.8682708 & 739.9673152 & 395.1695216 & 524.7826343 & 228.4705562 & 39.95541901 \\
+207.8091332 & 300.6871609 & 627.8808013 & 740.4949976 & 128.9558068 & 176.2158891 & 296.1642661 \\
+336.7537922 & 859.907318 & 704.2503641 & 426.845866 & 773.8926695 & 883.1773631 & 64.85043069 \\
+
+\bottomrule
+\end{tabular}
+
+\caption{Some random data that takes up too much room.}
+\end{table}
+
+\chapter{A chapter in landscape}
+
+\begin{table}[htbp]
+\centering
+\begin{tabular}{lllllll}
+
+\toprule
+A & B & C & D & E & F & G \\
+\midrule
+821.3827119 & 661.0913922 & 106.3008156 & 474.009513 & 190.8146776 & 788.4459729 & 784.7964852 \\
+863.5891052 & 308.5023091 & 15.97055732 & 319.4531424 & 932.4330525 & 313.8826277 & 574.5100815 \\
+867.7203343 & 343.6538027 & 34.35605188 & 680.5890553 & 538.4341728 & 510.3271094 & 987.7874714 \\
+144.6465988 & 86.30176472 & 145.0166526 & 26.00087715 & 694.0117063 & 556.0943379 & 650.0605751 \\
+269.5656447 & 979.9087235 & 150.7698724 & 715.0255442 & 312.5203237 & 608.58149 & 737.0459961 \\
+361.7660545 & 38.81968682 & 7.788463243 & 789.031736 & 599.306695 & 407.9588464 & 420.3577306 \\
+22.45176377 & 631.7249181 & 266.0566897 & 81.77581697 & 399.0120086 & 460.8922885 & 341.5815705 \\
+486.3650486 & 398.9817682 & 601.8745699 & 912.7856216 & 102.7510937 & 83.25854643 & 655.1995291 \\
+306.8558515 & 672.2668801 & 582.1884719 & 607.9748493 & 126.3316726 & 672.490033 & 754.4823663 \\
+745.6384032 & 369.5763752 & 170.8671329 & 248.2581139 & 994.2369771 & 28.13615151 & 230.6094341 \\
+270.3421307 & 193.6617479 & 374.94621 & 769.6975098 & 342.6845841 & 917.8180557 & 827.1024885 \\
+360.3810025 & 780.7139757 & 415.9038887 & 846.3157501 & 96.64026956 & 954.7160727 & 21.71722262 \\
+487.6847246 & 200.8682708 & 739.9673152 & 395.1695216 & 524.7826343 & 228.4705562 & 39.95541901 \\
+207.8091332 & 300.6871609 & 627.8808013 & 740.4949976 & 128.9558068 & 176.2158891 & 296.1642661 \\
+336.7537922 & 859.907318 & 704.2503641 & 426.845866 & 773.8926695 & 883.1773631 & 64.85043069 \\
+
+\bottomrule
+\end{tabular}
+
+\caption{Some random data that takes up too much room.}
+\end{table}
+\end{landscape}
+%% at the end of the {landscape} environment, make the page style {plain}
+\pagestyle{plain}
+%
+
+
+%\begin{appendices} ... \end{appendices}
+% use this if you have more than one appendix
+\clearpage
+%\appendix % use this if you have only one appendix
+\begin{appendices} % use this if you have more than one appendix
+\chapter{An appendix}
+\section{An appendix section}
+\lipsum[9-15]
+\chapter{A second appendix}
+\section{An appendix section}
+\lipsum[16-17]
+\end{appendices}
+\backmatter
+\SingleSpacing
+% This command creates the cover page for the bibliography
+\makebibliographypage
+\bibliography{MSU-thesis-testfile}
+\end{document}
+
diff --git a/macros/latex/contrib/msu-thesis/samples/unified.bst b/macros/latex/contrib/msu-thesis/samples/unified.bst
new file mode 100644
index 0000000000..80d9add02d
--- /dev/null
+++ b/macros/latex/contrib/msu-thesis/samples/unified.bst
@@ -0,0 +1,1550 @@
+%%% This is unified.bst, made by Bridget Samuels. It is based on sp.bst (v1.9+)
+%%% coded by Kai von Fintel as the house style for bibliographies in the journal
+%%% Semantics and Pragmatics. The style is based on a style generated
+%%% with custom-bib/merlin.mbs, a system for customizing bibliographic styles
+%%% created by Patrick W Daly. There have been some hand-coded adjustments to that
+%%% style to get the style closer to the Unified Style Sheet for Linguistics Journals.
+%%%
+%%% Version 1.2 [6 Mar 2010] Improved handling of multiple non-numerical year items by the same author. Should now output, e.g., "To appear(a)"
+%%% Version 1.1 [2 Feb 2010] Added comma before vol.
+%%% Version 1.0 [22 Aug 2009] Changes from sp.bst include conforming to the Unified
+%%% Style Sheet format for PhD & MA theses and citing URLs for online materials (use
+%%% misc or unpublished as the category).
+%%
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ doi
+ edition
+ editor
+ eid
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ url
+ volume
+ year
+ }
+ {}
+ { label extra.label sort.label short.list }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+STRINGS { s t}
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+ { " " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+FUNCTION {add.colon}
+{ ": " * before.all 'output.state :=
+}
+
+FUNCTION {add.comma}
+{ ", " * before.all 'output.state :=
+}
+
+
+FUNCTION {date.block}
+{
+ new.block
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\emph{" swap$ * "}" * }
+ if$
+}
+FUNCTION {tie.or.space.prefix}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$
+}
+
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+
+FUNCTION {bbl.and}
+{ "\&"}
+
+FUNCTION {bbl.etal}
+{ "et~al." }
+
+FUNCTION {bbl.editors}
+{ "eds." }
+
+FUNCTION {bbl.editor}
+{ "ed." }
+
+FUNCTION {bbl.edby}
+{ "edited by" }
+
+FUNCTION {bbl.edition}
+{ "edn." }
+
+FUNCTION {bbl.volume}
+{ "vol." }
+
+FUNCTION {bbl.of}
+{ "of" }
+
+FUNCTION {bbl.number}
+{ "no." }
+
+FUNCTION {bbl.nr}
+{ "no." }
+
+FUNCTION {bbl.in}
+{ "in" }
+
+FUNCTION {bbl.pages}
+{ "" }
+
+FUNCTION {bbl.page}
+{ "" }
+
+FUNCTION {bbl.chapter}
+{ "chap." }
+
+FUNCTION {bbl.techrep}
+{ "Tech. Rep." }
+
+FUNCTION {bbl.mthesis}
+{ "MA thesis" }
+
+FUNCTION {bbl.phdthesis}
+{ "dissertation" }
+
+FUNCTION {bbl.first}
+{ "1st" }
+
+FUNCTION {bbl.second}
+{ "2nd" }
+
+FUNCTION {bbl.third}
+{ "3rd" }
+
+FUNCTION {bbl.fourth}
+{ "4th" }
+
+FUNCTION {bbl.fifth}
+{ "5th" }
+
+FUNCTION {bbl.st}
+{ "st" }
+
+FUNCTION {bbl.nd}
+{ "nd" }
+
+FUNCTION {bbl.rd}
+{ "rd" }
+
+FUNCTION {bbl.th}
+{ "th" }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"Jun."}
+
+MACRO {jul} {"Jul."}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sep."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+FUNCTION {eng.ord}
+{ duplicate$ "1" swap$ *
+ #-2 #1 substring$ "1" =
+ { bbl.th * }
+ { duplicate$ #-1 #1 substring$
+ duplicate$ "1" =
+ { pop$ bbl.st * }
+ { duplicate$ "2" =
+ { pop$ bbl.nd * }
+ { "3" =
+ { bbl.rd * }
+ { bbl.th * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {bibinfo.check}
+{ swap$
+ duplicate$ missing$
+ {
+ pop$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ pop$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {bibinfo.warn}
+{ swap$
+ duplicate$ missing$
+ {
+ swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ "empty " swap$ * " in " * cite$ * warning$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.url}
+{ url empty$
+ { "" }
+ { "\urlprefix\url{" url * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+
+STRINGS { bibinfo}
+
+FUNCTION {format.names}
+{ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ duplicate$ #1 >
+ { "{ff~}{vv~}{ll}{, jj}" }
+ { "{vv~}{ll}{, ff}{, jj}" }
+ if$
+ format.name$
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal *
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.names.ed}
+{
+ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{ff~}{vv~}{ll}{, jj}"
+ format.name$
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+
+ " " * bbl.etal *
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ } if$
+}
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+FUNCTION {format.authors}
+{ author "author" format.names
+}
+FUNCTION {get.bbl.editor}
+{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
+
+FUNCTION {format.editors}
+{ editor "editor" format.names duplicate$ empty$ 'skip$
+ {
+ " " *
+ get.bbl.editor
+ "(" swap$ * ")" *
+ *
+ }
+ if$
+}
+FUNCTION {format.doi}
+{ doi "doi" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ new.block
+ "\doi{" swap$ * "}" *
+ }
+ if$
+}
+FUNCTION {format.note}
+{
+ note empty$
+ { "" }
+ { note #1 #1 substring$
+ duplicate$ "{" =
+ 'skip$
+ { output.state mid.sentence =
+ { "l" }
+ { "u" }
+ if$
+ change.case$
+ }
+ if$
+ note #2 global.max$ substring$ * "note" bibinfo.check
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title
+ duplicate$ empty$ 'skip$
+ { "t" change.case$ }
+ if$
+ "title" bibinfo.check
+}
+FUNCTION {format.full.names}
+{'s :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+ " " * bbl.etal *
+ }
+ {
+ bbl.and
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.key.full}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.key.full}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.key.full}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.full
+ { type$ "proceedings" =
+ 'editor.key.full
+ 'author.key.full
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem[{" write$
+ label write$
+ ")" make.full.names duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ "}]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {n.dashify}
+{
+ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in}
+{ bbl.in capitalize
+ " " * }
+
+FUNCTION {format.date}
+{ year "year" bibinfo.check duplicate$ empty$
+ {
+ "empty year in " cite$ * "; set to ????" * warning$
+ pop$ "????"
+ }
+ 'skip$
+ if$
+ extra.label *
+ before.all 'output.state :=
+ after.sentence 'output.state :=
+}
+FUNCTION {format.btitle}
+{ title "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+ "t" change.case$
+ emphasize
+ }
+ if$
+}
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { add.comma bbl.volume volume tie.or.space.prefix
+ "volume" bibinfo.check * *
+ }
+ if$
+}
+FUNCTION {format.number.series}
+ { number empty$
+ { series field.or.null }
+ { series empty$
+ { number "number" bibinfo.check }
+ { add.blank "(" *
+ series "series" bibinfo.check *
+ number tie.or.space.prefix "number" bibinfo.check *
+ ")" *
+ }
+ if$
+ }
+ if$
+ }
+FUNCTION {is.num}
+{ chr.to.int$
+ duplicate$ "0" chr.to.int$ < not
+ swap$ "9" chr.to.int$ > not and
+}
+
+FUNCTION {extract.num}
+{ duplicate$ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$
+ t #2 global.max$ substring$ 't :=
+ duplicate$ is.num
+ { s swap$ * 's := }
+ { pop$ "" 't := }
+ if$
+ }
+ while$
+ s empty$
+ 'skip$
+ { pop$ s }
+ if$
+}
+
+FUNCTION {convert.edition}
+{ extract.num "l" change.case$ 's :=
+ s "first" = s "1" = or
+ { bbl.first 't := }
+ { s "second" = s "2" = or
+ { bbl.second 't := }
+ { s "third" = s "3" = or
+ { bbl.third 't := }
+ { s "fourth" = s "4" = or
+ { bbl.fourth 't := }
+ { s "fifth" = s "5" = or
+ { bbl.fifth 't := }
+ { s #1 #1 substring$ is.num
+ { s eng.ord 't := }
+ { edition 't := }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ t
+}
+
+FUNCTION {format.edition}
+{ edition duplicate$ empty$ 'skip$
+ {
+ convert.edition
+ output.state mid.sentence =
+ { "l" }
+ { "t" }
+ if$ change.case$
+ "edition" bibinfo.check
+ " " * bbl.edition *
+ }
+ if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+FUNCTION {format.pages}
+{ pages duplicate$ empty$ 'skip$
+ { duplicate$ multi.page.check
+ {
+ n.dashify
+ }
+ {
+ }
+ if$
+ "pages" bibinfo.check
+ }
+ if$
+}
+FUNCTION {format.journal.pages}
+{ pages duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$
+ { pop$ pop$ format.pages }
+ {
+ ". " *
+ swap$
+ n.dashify
+ "pages" bibinfo.check
+ *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.journal.eid}
+{ eid "eid" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$ 'skip$
+ {
+ ". " *
+ }
+ if$
+ swap$ *
+ }
+ if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ duplicate$ empty$ 'skip$
+ {
+ "volume" bibinfo.check
+ }
+ if$
+ number "number" bibinfo.check duplicate$ empty$ 'skip$
+ {
+ swap$ duplicate$ empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ swap$
+ "(" swap$ * ")" *
+ }
+ if$ *
+ eid empty$
+ { format.journal.pages }
+ { format.journal.eid }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$
+ "type" bibinfo.check
+ }
+ if$
+ chapter tie.or.space.prefix
+ "chapter" bibinfo.check
+ * *
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.booktitle}
+{
+ booktitle "booktitle" bibinfo.check
+ "t" change.case$
+ emphasize
+}
+FUNCTION {format.in.ed.booktitle}
+{ format.booktitle duplicate$ empty$ 'skip$
+ {
+ editor "editor" format.names.ed duplicate$ empty$ 'pop$
+ {
+ " " *
+ get.bbl.editor
+ "(" swap$ * "), " *
+ * swap$
+ * }
+ if$
+ word.in swap$ *
+ }
+ if$
+}
+FUNCTION {format.thesis.type}
+{ type duplicate$ empty$
+ 'pop$
+ { swap$ pop$
+ "t" change.case$ "type" bibinfo.check
+ }
+ if$
+}
+FUNCTION {format.tr.number}
+{ number "number" bibinfo.check
+ type duplicate$ empty$
+ { pop$ bbl.techrep }
+ 'skip$
+ if$
+ "type" bibinfo.check
+ swap$ duplicate$ empty$
+ { pop$ "t" change.case$ }
+ { tie.or.space.prefix * * }
+ if$
+}
+FUNCTION {format.article.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.book.crossref}
+{ volume duplicate$ empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ pop$ word.in
+ }
+ { bbl.volume
+ capitalize
+ swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
+ }
+ if$
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{
+ word.in
+ " \cite{" * crossref * "}" *
+}
+FUNCTION {format.org.or.pub}
+{ 't :=
+ ""
+ address empty$ t empty$ and
+ 'skip$
+ {
+ address "address" bibinfo.check *
+ t empty$
+ 'skip$
+ { address empty$
+ 'skip$
+ { ": " * }
+ if$
+ t *
+ }
+ if$
+ }
+ if$
+}
+FUNCTION {format.publisher.address}
+{ publisher "publisher" bibinfo.warn format.org.or.pub
+}
+
+FUNCTION {format.organization.address}
+{ organization "organization" bibinfo.check format.org.or.pub
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ {
+ journal
+ "journal" bibinfo.check
+ emphasize
+ "journal" output.check
+ add.blank
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.doi output
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+ format.number.series output
+ new.block
+ new.sentence
+ format.publisher.address output
+ }
+ {
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.doi output
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ howpublished "howpublished" bibinfo.check output
+ address "address" bibinfo.check output
+ format.doi output
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+ editor format.key output
+ }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ crossref missing$
+ {
+ format.bvolume output
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ new.sentence
+ format.number.series output
+ format.publisher.address output
+ }
+ {
+ format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.edition output
+ format.doi output
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ add.comma
+ format.chapter.pages output
+ new.sentence
+ format.publisher.address output
+ format.edition output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+ format.doi output
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ add.comma
+ format.pages output
+ new.sentence
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.doi output
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ organization address new.block.checkb
+ organization "organization" bibinfo.check output
+ address "address" bibinfo.check output
+ format.edition output
+ format.doi output
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle
+ "title" output.check
+ new.block
+ address "address" bibinfo.check output
+ school "school" bibinfo.warn output
+ bbl.mthesis format.thesis.type output.nonnull
+ format.doi output
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title output
+ new.block
+ howpublished "howpublished" bibinfo.check output
+ format.doi output
+ new.block
+ format.note output
+ new.block
+ format.url output
+ fin.entry
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle
+ "title" output.check
+ new.block
+ address "address" bibinfo.check output
+ add.colon
+ school "school" bibinfo.warn output
+ bbl.phdthesis format.thesis.type output.nonnull
+ format.doi output
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output
+ format.date "year" output.check
+ date.block
+ format.btitle "title" output.check
+ format.bvolume output
+ new.sentence
+ format.number.series output
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ format.doi output
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title
+ "title" output.check
+ new.block
+ format.tr.number output.nonnull
+ institution "institution" bibinfo.warn output
+ address "address" bibinfo.check output
+ format.doi output
+ new.block
+ format.url output
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ author format.key output
+ format.date "year" output.check
+ date.block
+ format.title "title" output.check
+ format.doi output
+ new.block
+ format.note "note" output.check
+ new.block
+ format.url output
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+READ
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+FUNCTION {format.lab.names}
+{ 's :=
+ "" 't :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$
+ " " * bbl.etal *
+ }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ {
+ " " * bbl.etal *
+ }
+ { bbl.and space.word * s #2 "{vv~}{ll}" format.name$
+ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label
+ 'author.key.label
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ "("
+ *
+ year duplicate$ empty$
+ short.list key field.or.null = or
+ { pop$ "" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{ll{ }}{ ff{ }}{ jj{ }}"
+ format.name$ 't :=
+ nameptr #1 >
+ {
+ " " *
+ namesleft #1 = t "others" = and
+ { "zzzzz" * }
+ { t sortify * }
+ if$
+ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$
+ 'sort.label :=
+ sort.label
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+
+ITERATE {presort}
+SORT
+STRINGS { last.label next.extra }
+INTEGERS { last.extra.num number.label }
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+ #0 'number.label :=
+}
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+ duplicate$ empty$
+ 'skip$
+ { year field.or.null #-1 #1 substring$ chr.to.int$ #65 <
+ { "{\natexlab{" swap$ * "}}" * }
+ { "{(\natexlab{" swap$ * "})}" * }
+ if$ }
+ if$
+ 'extra.label :=
+ label extra.label * 'label :=
+}
+EXECUTE {initialize.extra.label.stuff}
+ITERATE {forward.pass}
+REVERSE {reverse.pass}
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+ year field.or.null sortify
+ *
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+ITERATE {bib.sort.order}
+SORT
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+ write$ newline$
+ "\providecommand{\natexlab}[1]{#1}"
+ write$ newline$
+ "\providecommand{\url}[1]{#1}"
+ write$ newline$
+ "\providecommand{\urlprefix}{}"
+ write$ newline$
+ "\expandafter\ifx\csname urlstyle\endcsname\relax"
+ write$ newline$
+ " \providecommand{\doi}[1]{doi:\discretionary{}{}{}#1}\else"
+ write$ newline$
+ " \providecommand{\doi}{doi:\discretionary{}{}{}\begingroup \urlstyle{rm}\Url}\fi"
+ write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}