diff options
Diffstat (limited to 'macros/latex/contrib/msu-thesis')
15 files changed, 482 insertions, 235 deletions
diff --git a/macros/latex/contrib/msu-thesis/README.md b/macros/latex/contrib/msu-thesis/README.md index 27fea365c8..69748901f1 100644 --- a/macros/latex/contrib/msu-thesis/README.md +++ b/macros/latex/contrib/msu-thesis/README.md @@ -1,10 +1,10 @@ -# MSU Thesis Class Version 3.5b 2022/08/19 +# MSU Thesis Class Version 4.0 2022/12/13 Copyright 2011-2022 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 (March 2020). +Submission of Master's Theses and Dissertations (September 2022). The class is based on the `memoir` document class, and therefore inherits all of the functionality of that class. @@ -50,9 +50,10 @@ Documentation files: A template file: - `MSU-thesis-template.tex` -A test file and a test bibliography: +Two test files and a test bibliography: `MSU-thesis-testfile.tex` + `MSU-thesis-chapterbib-testfile.tex` `MSU-thesis-testfile.bib` ## Problems diff --git a/macros/latex/contrib/msu-thesis/docs/msu-thesis.tex b/macros/latex/contrib/msu-thesis/docs/msu-thesis.tex index 2822bed850..8566aecacb 100644 --- a/macros/latex/contrib/msu-thesis/docs/msu-thesis.tex +++ b/macros/latex/contrib/msu-thesis/docs/msu-thesis.tex @@ -2,8 +2,8 @@ \documentclass[11pt]{article} -\def\msuversion{3.5b} -\def\msudate{2022/08/19} +\def\msuversion{4.0} +\def\msudate{2022/12/13} \title{\textbf{Using the MSU Thesis Class}} \author{\textbf{Alan Munn}\\Department of Linguistics, Languages, and Cultures\\Michigan State University\\\texttt{\href{mailto:amunn@msu.edu}{amunn@msu.edu}}} \date{Version \msuversion\\\msudate} @@ -57,9 +57,9 @@ \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}\ (March 2020) produced by the Graduate School, including requirements for margins, titlepage, page numbering, section titles, sub- and superscript sizes etc.\end{quote}} +\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}\ (September, 2022) 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 for the most part 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. +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 for the most part 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{Class Options} @@ -113,12 +113,14 @@ In addition to all the user functionality defined by \pkg{memoir}, the \pkg{msu- \begin{tabularx}{.8\textwidth}{>{\ttfamily}lX} \toprule {\bs maketitlepage} & Makes the main title page for the thesis.\\ -{\bs fieldofstudy\{\}} & Takes one argument corresponding to your field of study.\\ +{\bs fieldofstudy\{\}} & Takes one argument corresponding to your field of study. For a dual major use the \pkg{\bs dualmajor} command instead.\\ +{\bs dualmajor\{\}\{\}} & Takes two arguments, one for each of the two majors.\\ {\bs dedication\{\}} & Takes one argument (should be short), your dedication.\\ -{\{publicabstract\}} & Environment for the public abstract (unnumbered, uncounted).\\ +%{\{publicabstract\}} & Environment for the public abstract (unnumbered, uncounted).\\ {\bs makecopyrightpage} & Creates the copyright page (use \texttt{\bs makecopyrightpage*} to align the text on the left.)\\ {\bs makededicationpage} & Creates the dedication page.\\ -{\bs makebibliographypage} & Creates the bibliography cover page.\\ +%{\bs makebibliographypage} & Creates the bibliography cover page.\\ +{\{abbreviations\}} & Environment for the List of Abbreviations \\ \bottomrule \end{tabularx} \caption{Class titling commands} @@ -129,7 +131,7 @@ In addition to all the user functionality defined by \pkg{memoir}, the \pkg{msu- \begin{tabularx}{.8\textwidth}{>{\ttfamily}lX} \toprule {\bs msucaptiondelim} & Delimiter for floating elements (see section \ref{captiondelim}).\\ -{\bs setabstractnamespace} & Changes spacing after the name in the abstract (see section \ref{abstractspacing}).\\ +%{\bs setabstractnamespace} & Changes spacing after the name in the abstract (see section \ref{abstractspacing}).\\ \bottomrule \end{tabularx} \caption{Appeasement commands} @@ -138,7 +140,7 @@ In addition to all the user functionality defined by \pkg{memoir}, the \pkg{msu- \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. +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|, and |\mainmatter|. The way the thesis office now structures the document means that the |\backmatter| should not be used. 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. @@ -148,15 +150,13 @@ The basic outline of a dissertation or thesis document is shown in Table~\ref{st \item |\frontmatter| \begin{scheme} \item Titlepage - \item Public Abstract +% \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{scheme} \item |\mainmatter| @@ -165,12 +165,13 @@ The basic outline of a dissertation or thesis document is shown in Table~\ref{st \item Chapter 2 \item \ldots \item Chapter $n$ - \item{Appendices} \end{scheme} -\item |\backmatter| \begin{scheme} \item{Bibliography} \end{scheme} +\begin{scheme} + \item{Appendices} +\end{scheme} \item |\end{document}| \end{scheme} \caption{Basic structure of a thesis or dissertation}\label{structure} @@ -211,17 +212,32 @@ Your listing code here \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: +\subsection{List of Abbreviations} +Another common kind of list is a List of Abbreviations. The thesis office seems to think that these should be formatted identically to other lists, even though they are not really contents lists. Because of this I have added a built-in environment |{abbreviations}| and a helper macro to add elements to the list. The basic idea is the following: for each abbreviation/symbol you add to the list use the command |\abbrev{<abbreviation>}{<explanation>}|. This command takes two arguments, the first being the abbreviation itself, and the second the explanation of the abbreviation. For example, for a list of abbreviations containing the abbreviations MSU and MIT we would use the following code. The list is not automatically sorted, so you need to add abbreviations with |\abbrev| in exactly the order you want them to appear in the list. \begin{quote} \begin{lstlisting} -\clearpage -\chapter*{Key to Abbreviations} -\vspace{\cftparskip} -\addcontentsline{toc}{chapter}{Key to Abbreviations} -Your list of abbreviations here. +\begin{abbreviations} +\abbrev{MIT}{Massachusetts Institute of Technology} +\abbrev{MSU}{Michigan State University} +\end{abbreviation} \end{lstlisting} \end{quote} +\subsubsection{Summary of abbreviation commands} +In addition to the |\abbrev| command, there are a few other commands to change the format of the the |\listofabbreviations| as shown in Table~\ref{abbrev}. Note that the List of Abbreviations written to the auxiliary file with extension |.lob| which can be removed along with other |.aux| files if needed. + +\begin{table}[htpb] +\centering +\begin{tabularx}{.8\textwidth}{>{\ttfamily}lX} +\toprule +{\bs abbrev\{<abbreviation>\}\{<explantion>\}} & Add an abbreviation to the list.\\ +{\bs msuabbrevfont} & Format of the abbreviation itself (default is \texttt{\bs bfseries}).\\ +{\bs msuabbrevdelim\{\}} & Add a delimiter if you need (default is \texttt{\{\}}).\\ +{\bs msuabbrevwidth\{\}} & Set the width of the abbreviation column (default is \texttt{.75in}).\\ +\bottomrule +\end{tabularx} +\caption{List of abbreviation commands}\label{abbrev} +\end{table} \subsection{Algorithm packages\label{algorithms}} Because the various algorithm formatting packages such as \pkg{algorithm2e}\ and \pkg{algorithmicx}\ (or its related packages) sometimes create incompatibilities with the \pkg{memoir}\ float methods, the class provides you with floating |{algorithm}| environment and the corresponding list of algorithms, so you do not have to create your own list of algorithms. Here are some specific important points about using \pkg{algorithm2e}\ and \pkg{algorithmicx}. @@ -282,16 +298,16 @@ before the contents lists and |\microtypesetup{protrusion=true}| afterwards. Sc \microtypesetup{protrusion=true} \end{lstlisting} \end{quote} -\subsection{Abstracts} -MSU requires you to have an abstract, but you may also have a public abstract, which is weirdly unnumbered and uncounted. - -\subsubsection{Spacing after the author name in the abstract}\label{abstractspacing} -The thesis office is very inconsistent in how it determines what it thinks is a “double space”, and this especially seems to be true after the author name in the the abstract. Because of this, I’ve created a way to change the spacing within the user document so that you can appease the thesis office bureaucrats without reporting an issue to me. - -Use the command |\setabstractnamespace| to change the spacing after the author name in the abstract (and the public abstract, if present). This command takes a value typically between -1 and and 1 where 0 reduces the space to a single baselineskip, while 1 adds an extra baselineskip. The default is set to 0. Depending on their mood at the time they check your thesis, the thesis office may want more or less space here, so use this command only to satisfy their bureaucratic self-importance. - -\subsubsection{Public abstract} -If your thesis requires a public abstract, it should go immediately before the regular abstract. Use the |{publicabstract}| environment for this. Please note that you \emph{must} have an abstract even if you also have a public abstract. +%\subsection{Abstracts} +%MSU requires you to have an abstract. % but you may also have a public abstract, which is weirdly unnumbered and uncounted. +% +%\subsubsection{Spacing after the author name in the abstract}\label{abstractspacing} +%The thesis office is very inconsistent in how it determines what it thinks is a “double space”, and this especially seems to be true after the author name in the the abstract. Because of this, I’ve created a way to change the spacing within the user document so that you can appease the thesis office bureaucrats without reporting an issue to me. +% +%Use the command |\setabstractnamespace| to change the spacing after the author name in the abstract (and the public abstract, if present). This command takes a value typically between -1 and and 1 where 0 reduces the space to a single baselineskip, while 1 adds an extra baselineskip. The default is set to 0. Depending on their mood at the time they check your thesis, the thesis office may want more or less space here, so use this command only to satisfy their bureaucratic self-importance. +% +%\subsubsection{Public abstract} +%If your thesis requires a public abstract, it should go immediately before the regular abstract. Use the |{publicabstract}| environment for this. Please note that you \emph{must} have an abstract even if you also have a public abstract. \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. @@ -336,10 +352,10 @@ Appendix text goes here \end{quote} \subsubsection{Appendices per chapter} -If you need to add an appendix or appendices to a chapter, you must use the \pkg{[chapterapp]}\ class option. The code for the appendices themselves is exactly as described above. This means that the appendix itself is introduced by the |\chapter| command, \emph{not} a |\section| command (because the this seems to be how the thesis office wants things to look). Furthermore, per-chapter appendices should \emph{not} be preceded by the |\backmatter| command, which should only precede the global bibliography or appendices. +If you need to add an appendix or appendices to a chapter, you must use the \pkg{[chapterapp]}\ class option. The code for the appendices themselves is exactly as described above. This means that the appendix itself is introduced by the |\chapter| command, \emph{not} a |\section| command (because the this seems to be how the thesis office wants things to look). Furthermore, per-chapter appendices should \emph{not} be preceded by the |\backmatter| command, which should not be used at all. \subsection{Bibliographies} -The class places no constraints on how you do your bibliography. It doesn't care whether you are using the \pkg{chapterbib}\ package with \pkg{natbib}\ or the per-chapter bibliography functionality provided by \pkg{biblatex}. If you have per-chapter bibliographies, however, you \emph{must}\ use the |[chapterbib]| class option. This option lets the class know that you are using per-chapter bibliographies. Before any bibliography (whether global or per-chapter) you should use the |\makebibliographypage| command. Note that per-chapter bibliographies should \emph{not} be preceded by the |\backmatter| command, which should only precede the global bibliography or appendices. +The class places no constraints on how you do your bibliography. It doesn't care whether you are using the \pkg{chapterbib}\ package with \pkg{natbib}\ or the per-chapter bibliography functionality provided by \pkg{biblatex}. If you have per-chapter bibliographies, however, you \emph{must}\ use the |[chapterbib]| class option. This option lets the class know that you are using per-chapter bibliographies. Note that per-chapter bibliographies should \emph{not} be preceded by the |\backmatter| command, which should not be used at all. \subsubsection{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 \pkg{natbib}\ or \pkg{biblatex}\ these spacing parameters are set for you by the class. If you are using another package for your bibliography you are responsible for adjusting the relevant spacing parameters. @@ -386,10 +402,10 @@ I'm happy to answer emails about formatting issues with the class, especially wh \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{Major 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 public abstract. Version 2.9 removed subscript/superscript size restrictions, added font size options and made small spacing changes to appease the thesis office. Version 3.0 added full support for per-chapter bibliographies and appendices, and automated bibliography spacing for |natbib| and |biblatex| produced bibliographies. Version 3.1 added support for an |{algorithm}| environment and a list of algorithms to combat incompatibilities with the \pkg{algorithm}\ and \pkg{algorithm2e}\ packages. Version 3.2 fixed some lingering problems with per-chapter appendices. Version 3.3 added code to accommodate the insane inconsistencies in formatting requirements that the thesis office requires, including a new contents option which hopefully should never be used, and fixed some numbering problems with per-chapter appendices. Version 3.4 added a starred option to the |\makecopyrightpage| command after complaints about placement. The documentation has also been updated to include more information about caption formatting and removed colons from the default caption format. Version 3.5 added user level way to change the spacing after the author’s name in the abstract, to deal with thesis office inconsistency. +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 public abstract. Version 2.9 removed subscript/superscript size restrictions, added font size options and made small spacing changes to appease the thesis office. Version 3.0 added full support for per-chapter bibliographies and appendices, and automated bibliography spacing for |natbib| and |biblatex| produced bibliographies. Version 3.1 added support for an |{algorithm}| environment and a list of algorithms to combat incompatibilities with the \pkg{algorithm}\ and \pkg{algorithm2e}\ packages. Version 3.2 fixed some lingering problems with per-chapter appendices. Version 3.3 added code to accommodate the insane inconsistencies in formatting requirements that the thesis office requires, including a new contents option which hopefully should never be used, and fixed some numbering problems with per-chapter appendices. Version 3.4 added a starred option to the |\makecopyrightpage| command after complaints about placement. The documentation has also been updated to include more information about caption formatting and removed colons from the default caption format. Version 3.5 added user level way to change the spacing after the author’s name in the abstract, to deal with thesis office inconsistency. Version 3.6 added built-in support for the Key to Abbreviations. Version 3.7 added improved support for \pkg{hyperref}. Version 4.0 implements the new requirements as of September 2022, including adding a |\dualmajor| command. Various spacing changes have been made which will make your document look like you used Word, but this is what the thesis office seems to care about. \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 \pkg{hyperref}\ code. Thanks also to the following students who have reported problems over the years: Irina Agafonova, Ali Al-jiboory, Abubakr Ayesh, Julian Blank, Dmitriy Bryndin, Greg Christian, Kyle Crayne, Ciaron Hamilton, Matt Husband, Changkuk Jung, Adam Liter, Vanessa Maldonado, William Muir, Alicia Parrish, Neil ver Planck, Giacomo Romanini, William Sands, Adam Soliman, Erik Stitt, Eremey Valetov, Matthew Vincent, Michael Wojcik, Stephen Yowono, Ali Zare, 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. +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. Thanks to Florent Chervet for early \pkg{hyperref} code (up until v.3.6), and Ulrike Fischer for the current \pkg{hyperref} code. Thanks also to the following students who have reported problems over the years: Irina Agafonova, Ali Al-jiboory, Abubakr Ayesh, Julian Blank, Dmitriy Bryndin, Greg Christian, Kyle Crayne, Ciaron Hamilton, Matt Husband, Changkuk Jung, Claire Kopenhafer, Adam Liter, Vanessa Maldonado, William Muir, Alicia Parrish, Neil ver Planck, Nick Rekuski, Giacomo Romanini, William Sands, Adam Soliman, Erik Stitt, Eremey Valetov, Matthew Vincent, Michael Wojcik, Stephen Yowono, Ali Zare, 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}} @@ -438,10 +454,11 @@ Your acknowledgements here \mainmatter \chapter{Your first chapter} % -\appendix +\begin{appendix} \chapter{Your first appendix} +\end{appendix} \backmatter -\makebibliographypage + \SingleSpacing \bibliography{your-bib-file} \end{document} diff --git a/macros/latex/contrib/msu-thesis/msu-thesis.cls b/macros/latex/contrib/msu-thesis/msu-thesis.cls index fe9b7b3a14..e58b843669 100644 --- a/macros/latex/contrib/msu-thesis/msu-thesis.cls +++ b/macros/latex/contrib/msu-thesis/msu-thesis.cls @@ -24,10 +24,9 @@ % 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 +% Two test files and test bibliography: +% MSU-thesis-testfile.tex, MSU-thesis-chapterbib-testfile.tex, MSU-thesis-testfile.bib +% % % Version 1.0 2010/04/17 Initial release % Version 1.1 2010/04/20 Require etex package (fix problem with qtree) @@ -170,11 +169,21 @@ % updated documentation on algorithms and captions % Version 3.5 2022/08/15 Added \setabstractnamespace to allow user control over thesis office idiocy % Version 3.5b 2022/08/19 Changed default for \setabstractnamespace +% Version 3.6 2022/08/23 Added a \listofabbreviations plus helper macros +% \msuabbrev \msuabbrevwidth \msuabbrevfont +% to make format of the key to abbreviations match the LoF etc. +% Changed \onelinespace to match the fontsize (see v2.9) +% Added undocumented command to reinstate the memoir leading values if needed. +% Version 3.7 2022/09/04 Rewrote ToC formatting code to support hyperref better. Modifications to internal +% chapter commands are no longer required, and hyperref injection code revised. +% This requires an up-to-date LaTeX and is therefore only released as development for the +% moment. +% Version 4 2023/12/13 First version to conform to the updated requirements (September 2023) % % Report bugs/problems/questions to <amunn@msu.edu> % -\def\msu@version{3.5b} -\def\msu@date{2022/08/19} +\def\msu@version{4.0} +\def\msu@date{2023/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 @@ -183,13 +192,14 @@ \newif\ifmsu@chapterapp\msu@chapterappfalse % added v3.0 \def\msu@apptype{APP} \newif\ifmsu@singleappendix\msu@singleappendixfalse % added v3.1b -\newcommand*\msuappendixnumformat{\Alph{chapter}}% Appendices are Alpha numbered +\newcommand*\msuappendixnumformat{\ifmsu@singleappendix\else\Alph{chapter}\fi}% Appendices are Alpha numbered \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 +\newif\ifmsu@dualmajor\msu@dualmajorfalse \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}} @@ -218,9 +228,9 @@ \DeclareOption{bibassection}{\def\msu@bibsection{section}} % per-chapter bibs as sections in TOC \DeclareOption{chapterapp}{ \global\msu@chapterapptrue - \def\msu@apptype{CHAPAPP} + \def\msu@apptype{APPENDICES} % per-chapter appendices added v3.0 - \renewcommand\msuappendixnumformat{\the@ppsavesec\Alph{chapter}} % Appendix numbers per-chapter (now permitted) + \renewcommand\msuappendixnumformat{\ifmsu@singleappendix\else\Alph{chapter}\fi} % Appendix numbers per-chapter not permitted as of v4 } \DeclareOption{12pt}{\def\msu@sizeoption{12pt}} % added v2.9 \DeclareOption{11pt}{\def\msu@sizeoption{11pt}} @@ -236,6 +246,11 @@ \RequirePackage{etex} \fi \RequirePackage{etoolbox} +% textpos package added v4.0 to deal with absolute positioning of title page elements +\RequirePackage[absolute]{textpos} +\setlength{\TPHorizModule}{.5in} +\setlength{\TPVertModule}{.5in} +\textblockorigin{0in}{0in} % set up landscape page numbering % make a boolean for selecting pagestyle properly if \chapter appears in a landscape environment \newif\ifmsu@lscapemode\msu@lscapemodefalse @@ -262,6 +277,13 @@ \setlrmargins{1in}{*}{*} \setulmargins{1in}{*}{*} \setheadfoot{.5in}{.5in} % changed 5/3/2017 +\setlength{\onelineskip}{\msu@sizeoption} % changed v3.6 after more complaints about "double space" +% memoir makes the value the leading of the chosen font size (defined in memXX.clo) where XX is the +% font size. The memoir values are 12pt, 13.6pt and 14.5pt, but depending on who's measuring, they don't +% seem to like these values. Add an undocumented reset to defaults for future inconsistency. +\newcommand*\usememdefaultlineskip{ + \let\onelineskip\headheight} + % set up contents title % we use a private macro here to avoid problems with babel and @@ -271,8 +293,9 @@ \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 - +\newcommand*{\msu@fieldseparator}{\textemdash} % this is between the degree name and field of study +\newcommand*{\dualmajor}[2]{\msu@dualmajortrue\gdef\msu@fieldofstudy{#1}\gdef\msu@dualmajor{#2}} +\newcommand*{\msu@DUALMAJOR}{Dual Major} \newcounter{msu@hchap} % global counter for chapters used by hyperref % This may also be solved by using \hypersetup{hypertexnames=false} % hard to tell whether this is a better solution. @@ -286,17 +309,18 @@ % 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. % Using \onelineskip here instead of \baselineskip because thesis office doesn't know how to measure +% v4 now uses textpos to position these elements absolutely on the page \newcommand*\msu@thesistype{\ifmsu@dissertation{DISSERTATION}\else{THESIS}\fi} \pretitle{\begin{center}\MakeUppercase} -\posttitle{\\[\onelineskip]\end{center}} -\preauthor{\begin{center}By\\[\onelineskip]} -\postauthor{\end{center}} -\predate{\vfill\begin{center}\msu@titleintro\msu@thesistype\\[\onelineskip]Submitted to\\Michigan State University\\in partial fulfillment of the requirements\\for the degree of\\[\onelineskip]\msu@fieldofstudy~\msu@fieldseparator~\msu@degree\\[\onelineskip]} +\posttitle{\end{center}} +\preauthor{\begin{textblock}{6}(5.5,6.625)\begin{center}By\\[2\onelineskip]} +\postauthor{\end{center}\end{textblock}} +\predate{\begin{textblock}{6}(5.5,13.625)\begin{center}\msu@titleintro\msu@thesistype\\[\onelineskip]Submitted to\\Michigan State University\\in partial fulfillment of the requirements\\for the degree of\\[2\onelineskip]\msu@fieldofstudy\msu@fieldseparator\msu@degree\ifmsu@dualmajor\\\msu@dualmajor\msu@fieldseparator\msu@DUALMAJOR\\[\onelineskip]\else\\[2\onelineskip]\fi}\postdate{\end{center}\end{textblock}} % set up the chapter titles \chapterstyle{thatcher} \setlength{\beforechapskip}{-1sp}% changed 2020/12/17 Need negative value to suppress indentation -\setlength{\afterchapskip}{2\onelineskip} % changed 2017/05/03 because of thesis office complaints +\setlength{\afterchapskip}{0pt} % changed 2017/05/03 because of thesis office complaints; changed again for v4 since now they want "uniform" space \renewcommand*{\chapnamefont}{\centering\bfseries} \renewcommand*{\chapnumfont}{\bfseries} \renewcommand*{\chaptitlefont}{\SingleSpacing\bfseries} @@ -309,22 +333,35 @@ \renewcommand{\partnamefont}{\centering\bfseries} \renewcommand{\partnumfont}{\bfseries} \renewcommand{\parttitlefont}{\SingleSpacing\bfseries} -\renewcommand{\printpartname}{\partnamefont{\MakeUppercase{\partname}}} +\renewcommand{\printpartname}{\partnamefont{\partname}} \renewcommand{\printparttitle}[1]{\parttitlefont \MakeUppercase#1} % Set epigraph fonts to \normalsize \renewcommand{\epigraphsize}{\normalsize} % added 2/26/21 +% Set a fixed floatsep to appease 2023 idiocy +\setlength\textfloatsep{\onelineskip} % set up the section styles -\setbeforesecskip{-1sp} -\setsecheadstyle{\normalfont\SingleSpacing\large\bfseries} + +\setsecheadstyle{\normalfont\SingleSpacing\bfseries} % made uniform size v4 \setsubsecheadstyle{\normalfont\SingleSpacing\bfseries} \setsubsubsecheadstyle{\normalfont\SingleSpacing\bfseries} +% 2023 requirements seem to want "uniform" spacing even after headings, even though this +% is not stated explicitly anywhere. After skips must be positive not zero to avoid runin formatting +% Before skips can be 0 +% This is another insane decision typographically... +\setbeforesecskip{0pt} +\setbeforesubsecskip{0pt} +\setbeforesubsubsecskip{0pt} +\setaftersecskip{.1pt} +\setaftersubsecskip{.1pt} +\setaftersubsubsecskip{.1pt} % set up TOC -\maxtocdepth{subsubsection} +\settocdepth{section} \setsecnumdepth{subsubsection} +\setlength{\cftsectionindent}{.5in} \renewcommand*{\printtoctitle}[1]{\centering\bfseries\msu@contentsname} \renewcommand*{\cftchaptername}{Chapter\space} \renewcommand*{\cftappendixname}{Appendix\space} @@ -333,6 +370,8 @@ \renewcommand*{\cfttableaftersnum}{\msucaptiondelim} % per thesis office punctuation idiocy \renewcommand*{\cftfigurename}{Figure\space} \renewcommand*{\cfttablename}{Table\space} +\renewcommand*{\cftchapteraftersnum}{\msutocdelim} +\renewcommand*{\cftsectionaftersnum}{\msutocdelim} %\setlength{\cftbeforetableskip}{0pt} %\setlength{\cftbeforefigureskip}{0pt} \renewcommand{\insertchapterspace}{} @@ -367,12 +406,42 @@ % Importantly you MUST load float after defining any new lists since it clobbers % the memoir float methods - -\newlistof{listofalgorithms}{loa}{List of Algorithms} +\newcommand{\listalgorithmname}{List of Algorithms} % added v3.7 for hyperref +\newlistof{listofalgorithms}{loa}{\listalgorithmname} \newfloat[chapter]{algorithm}{loa}{Algorithm} \newlistentry{algorithm}{loa}{0} \renewcommand*{\cftalgorithmname}{Algorithm\space} \renewcommand*{\cftalgorithmaftersnum}{\msucaptiondelim} + +% After complaints about the spacing in the key to abbreviations not matching the list +% of figures, we now supply a \listofabbreviations which is formatted using regular LoF +% methods along with a helper macro \abbrev which puts an abbreviation into the list. +% The list is not sorted, so the \abbrev commands must be in the order that they will appear. +% Since the abbreviations are just listed, this list doesn't require a new float command. +% We use lob here, since loa will be used by list of algorithms. Added v3.6 +% For ease of use, the list is wrapped into an environment. +% +\newcommand{\listabbreviationsname}{List of Abbreviations} % added v3.7 for hyperref; name changed v4 +\newlistof{listofabbreviations}{lob}{\listabbreviationsname} +\newlistentry{abbrev}{lob}{0} + +\newcommand*\msuabbrevfont{\bfseries} % font for the abbreviation itself +\renewcommand*\cftabbrevleader{} % no leaders +\renewcommand*\cftabbrevformatpnum[1]{} % no page numbers +\renewcommand*{\cftabbrevafterpnum}{\cftparfillskip} % fix horrible interword spacing +\newlength{\msu@abbrevwidth} % maximum width of the abbreviations +\newcommand*\msuabbrevwidth[1]{\setlength{\msu@abbrevwidth}{#1}} % helper macro to set width +\msuabbrevwidth{.75in} % a reasonable minimum +\cftsetindents{abbrev}{0em}{\msu@abbrevwidth} % sets the indents so that the entries themselves can wrap if long +\newcommand*{\msuabbrevdelim}{} % in case you want a colon or something after each abbreviation +\newcommand{\abbrev}[2]{% +\addcontentsline{lob}{abbrev}{\makebox[\msu@abbrevwidth][l]{\msuabbrevfont#1\msuabbrevdelim}\normalfont#2}} +\newenvironment{abbreviations} +{} +{\clearpage +\listofabbreviations} + + % % This code technique from http://tex.stackexchange.com/q/232121/ % Makes appendices formatted as sections not chapters in the TOC @@ -390,16 +459,20 @@ \cftinsertcode{APP}{ \renewcommand\cftsectionfont{\msu@tocfont} % fixed 12/13/17 \renewcommand\cftchapterpagefont{\msu@tocfont} -% \renewcommand*{\cftappendixname}{APPENDIX\space} -} -% This code removes the before chapter spaces for in-chapter apps -\cftinsertcode{CHAPAPP}{ - \setlength\cftbeforechapterskip{0pt} - \renewcommand\cftsectionfont{\msu@tocfont} % fixed 12/13/17 - \renewcommand\cftchapterpagefont{\msu@tocfont} \renewcommand*{\cftappendixname}{APPENDIX\space} } +\cftinsertcode{SINGAPP}{\renewcommand{\cftchapteraftersnum}{}} +% This code removes the before chapter spaces for in-chapter apps +% removed v4 not needed +%\cftinsertcode{CHAPAPP}{ +% \setlength\cftbeforechapterskip{0pt} +% \renewcommand\cftsectionfont{\msu@tocfont} % fixed 12/13/17 +% \renewcommand\cftchapterpagefont{\msu@tocfont} +% \renewcommand\cftchapteraftersnum{\msutocdelim} +% \renewcommand*{\cftappendixname}{APPENDIX\space} +%} + % This code adds extra space in the TOC margin for the APPENDIX name, and % makes the appendices formatted like sections even though they are % chapters in the source @@ -413,30 +486,33 @@ \renewcommand\cftsectionfont{\msu@tocfont} % fixed 12/13/17 \renewcommand\cftchapterpagefont{\msu@tocfont} \renewcommand*{\cftappendixname}{APPENDIX\space} + \renewcommand\cftchapteraftersnum{\msutocdelim} + } % This code resets the TOC back to normal section spacing if appendices have been used \cftinsertcode{CHAPAPPR}{ -\cftsetindents{section}{1.5em}{2.3em} +\cftsetindents{section}{.5in}{2.3em} \setlength{\cftchapterindent}{0em} \setlength{\cftchapternumwidth}{3em} % added 6/24/2022 \setlength{\cftbeforechapterskip}{1.0em \@plus\p@} - \renewcommand\cftchapterfont{\msu@chapfont} + \renewcommand\cftchapterfont{\msu@chapfont\MakeUppercase} \renewcommand\cftchapterpagefont{\msu@chapfont} - \settocdepth{subsubsection} % added 6/24/2022 + \settocdepth{section} % added 6/24/2022 } % 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\cftchapterfont{\msu@chapfont\MakeUppercase} \renewcommand\cftchapterpagefont{\msu@chapfont} + \settocdepth{section} } \cftinsertcode{CHAPBIB}{ - \setlength\cftchapterindent{0em} + \setlength\cftchapterindent{\cftsectionindent} \setlength\cftbeforechapterskip{0pt} \renewcommand\cftsectionfont{\msu@tocfont} % fixed 12/13/17 \renewcommand\cftchapterpagefont{\msu@tocfont} @@ -444,7 +520,7 @@ % Set up all the font styles for the TOC -\renewcommand*{\cftchapterfont}{\msu@chapfont} +\renewcommand*{\cftchapterfont}{\msu@chapfont\MakeUppercase} \renewcommand*{\cftchapterpagefont}{\msu@chapfont} \renewcommand*{\cftsectionfont}{\msu@tocfont} \renewcommand*{\cftsubsectionfont}{\msu@tocfont} @@ -453,14 +529,16 @@ \renewcommand*{\cftsubsectionpagefont}{\msu@tocfont} \renewcommand*{\cftsubsubsectionpagefont}{\msu@tocfont} +% Removed v3.7 to accommodate more hyperref options +%\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 +% -\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 @@ -510,20 +588,21 @@ % set up abstract and public abstract % The thesis office is inconsistent in how they measure what they call a "double space". % Adding a fudge factor that can be changed at the user level (v3.5 8/15/2022) -% We'll set it to 0 for the moment; 0 is what should be 1 double space, +% We'll set it to 0 for the moment; 0 is what should be 1 double space, % but depending on their mood and and whether Mars is in conjunction with Jupiter they seem to want more % or less. Nothing better than random application of useless rules to waste everyone’s time. -\newcommand\setabstractnamespace[1]{\gdef\msu@abstractnamespacefactor{#1}} -\setabstractnamespace{0} % this may be too big +%\newcommand\setabstractnamespace[1]{\gdef\msu@abstractnamespacefactor{#1}} +%\setabstractnamespace{0} % this may be too big +% Changed v4, as no name required any more \renewenvironment{abstract}{% - \setlength{\afterchapskip}{\onelineskip} % changed 2020/12/14 again removed manual spacing from 2016 +% \setlength{\afterchapskip}{\onelineskip} % changed 2020/12/14 again removed manual spacing from 2016 \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{\msu@abstractnamespacefactor} % changed 2016/06/08 after complaints +% \begin{center} +% \MakeUppercase{\thetitle}\plainbreak{1}By\plainbreak{1}\theauthor +% \end{center} +% \plainbreak{\msu@abstractnamespacefactor} % changed 2016/06/08 after complaints \DoubleSpacing }{\par} % @@ -533,23 +612,25 @@ % % this just stores the current page number and replaces it at the end -\newcounter{msu@pubabspages} -\newcommand{\publicabstractname}{\abstractname} -\newenvironment{publicabstract}{% - \phantomsection% added 6/30/2022 to remove spurious warning - \ClassWarningNoLine{msu-thesis}{You have provided a public abstract. Please make sure you ALSO have a regular abstract!} - \setcounter{msu@pubabspages}{\value{page}} - \setlength{\afterchapskip}{\onelineskip} % changed 2020/12/14 again removed manual spacing from 2016 - \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 - \plainbreak{\msu@abstractnamespacefactor} % changed 2016/06/08 after complaints - \DoubleSpacing - }{\clearpage\setcounter{page}{\value{msu@pubabspages}}} +% Removed v4 (no longer needed?) + +%\newcounter{msu@pubabspages} +%\newcommand{\publicabstractname}{\abstractname} +%\newenvironment{publicabstract}{% +% \phantomsection% added 6/30/2022 to remove spurious warning +% \ClassWarningNoLine{msu-thesis}{You have provided a public abstract. Please make sure you ALSO have a regular abstract!} +% \setcounter{msu@pubabspages}{\value{page}} +% \setlength{\afterchapskip}{\onelineskip} % changed 2020/12/14 again removed manual spacing from 2016 +% \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 +% \plainbreak{\msu@abstractnamespacefactor} % changed 2016/06/08 after complaints +% \DoubleSpacing +% }{\clearpage\setcounter{page}{\value{msu@pubabspages}}} % set up captions @@ -557,6 +638,7 @@ % 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. \newcommand*\msucaptiondelim{\space} +\newcommand*\msutocdelim{:} \captiondelim{\msucaptiondelim} \pagestyle{plain} @@ -575,13 +657,15 @@ % as requiring left aligned copyright mark, even though the guide says it can be % anywhere on the page as long as the text itself is left aligned. % * version will make things left aligned. Added v3.4 6/20/2022 +% In a tour de force of bad design the 2023 requirements now have this centred vertically Added v4 \newcommand*{\makecopyrightpage}{% - \@ifstar{\def\msu@copyrightalign{}}{\def\msu@copyrightalign{\raggedleft}} + \@ifstar{\def\msu@copyrightalign{}}{\def\msu@copyrightalign{}} \pagestyle{plain} \clearpage \thispagestyle{empty} - \vspace*{7in} - {\noindent\msu@copyrightalign Copyright by\\\MakeUppercase{\theauthor}\\\thedate\\}% Author now uppercase 6/5/12 + % Author now uppercase 6/5/12 + % Use vplace to centre vertically added v4 + {\begin{vplace}\noindent\msu@copyrightalign Copyright by\\\MakeUppercase{\theauthor}\\\thedate\end{vplace}} \clearpage} % make the dedication page @@ -613,19 +697,22 @@ % Modified 2021/06/10 to deal with both in-chapter and end of document appendices % \newcommand{\msu@apppage}{% - \@setuppart +% \@setuppart \cftinserthook{toc}{\msu@apptype} % extra space or not added 2021/06/10 - \mempreaddapppagetotochook - \addappheadtotoc - \mempostaddapppagetotochook - \partmark{\appendixpagename}% - \memapppageinfo{\appendixpagename}% - \cftinserthook{toc}{APPENDICES} % reset for subappendices added 2021/06/10 - {\centering - \interlinepenalty \@M - \normalfont - \printparttitle{\appendixpagename}\par}% - \@endpart} +% \mempreaddapppagetotochook +% \addappheadtotoc +% \mempostaddapppagetotochook +% \partmark{\appendixpagename}% +% \memapppageinfo{\appendixpagename}% +% reset for subappendices added 2021/06/10 +% {\centering +% \interlinepenalty \@M +% \normalfont +% \printparttitle{\appendixpagename}\par}% +% \@endpart} +} +%\let\msu@apppage\relax + % % Code for appendix/appendices @@ -637,20 +724,20 @@ % appendices. % \renewenvironment{appendix}% - {\renewcommand{\appendixname}{Appendix} - \renewcommand{\appendixtocname}{Appendix} - \renewcommand{\appendixpagename}{Appendix} + {\renewcommand{\appendixname}{\MakeUppercase{Appendix}} + \renewcommand{\appendixtocname}{\MakeUppercase{Appendix}} + \renewcommand{\appendixpagename}{\MakeUppercase{Appendix}} % It's not clear if this should apply to per-chapter appendices also % I think it probably should, even though it leads to ambiguity. % Changing this in 3.2 2022/04/16 % \ifmsu@chapterapp\else \msu@singleappendixtrue % \fi% make sure single appendix doesn't have a number if global 3.1b (always 3.2) - \msu@apppage\settocdepth{part}\@resets@pp\anappendixtrue}% + \msu@apppage\cftinserthook{toc}{SINGAPP}\settocdepth{chapter}\@resets@pp\anappendixtrue}% {\@ppsaveapp\@pprestoresec\anappendixfalse\cftinserthook{toc}{CHAPAPPR}} % reset aded 2022/04/16 \renewenvironment{appendices}% - {\msu@apppage\settocdepth{chapter} + {\msu@singleappendixfalse\msu@apppage\ifmsu@chapterapp\cftinserthook{toc}{APPENDICES}\fi\settocdepth{chapter} \@resets@pp\anappendixtrue}% {\@ppsaveapp\@pprestoresec\anappendixfalse\cftinserthook{toc}{CHAPAPPR}} % reset added 2022/04/16 @@ -659,7 +746,7 @@ % requires them to restart from A every chapter. In case they % ever allow a saner numbering system we provide the \msuappendixnumberformat hook % for modifying the numbering scheme if allowed. -% + \renewcommand{\@resets@pp}{% \par @@ -671,7 +758,6 @@ % \restoreapp % removed 6/24/2022 } - % Don't save the appendix counters even for per-chapter appendices %\let\restoreapp\relax % removed 6/24/2022 @@ -684,18 +770,18 @@ \let\bibtocname\bibname % moved inside this page to beat apacite \let\bibpagename\bibname \cftinserthook{toc}{\msu@bibtype} - \settocdepth{subsubsection} % changed v2.7 to allow for chapter bibs - \@setuppart - \msu@preaddbibpagetotochook + \settocdepth{section} % 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 +% \msu@postaddbibpagetotochook +% \partmark{\bibpagename}% +% \msu@bibpageinfo{\bibpagename}% +% {\centering +% \interlinepenalty \@M +% \normalfont +% \printparttitle{\bibpagename}\par}% +% \@endpart \cftinserthook{toc}{BIB}} \newcommand\msu@preaddbibpagetotochook{} @@ -714,11 +800,11 @@ } % Since the bibliography page is the TOC entry we remove the bib in the TOC % when it's introduced -\nobibintoc +\nobibintoc % removed v4 as no longer neededd % 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} +\newcommand*{\makebibliographypage}{} % will be removed soon %\let\makebibliographycover\makebibliographypage No longer needed for compatibility % Informational warnings @@ -734,8 +820,9 @@ % Make bibliography spacing more automatic for biblatex and natbib users 2021/06/10 % This should cover most cases. Otherwise just set single spacing \@ifpackageloaded{biblatex} - {\renewcommand{\bibsetup}{\SingleSpacing\setlength{\bibitemsep}{\baselineskip}}} % biblatex - {\@ifpackageloaded{natbib} + {\renewcommand{\bibsetup}{\msu@bibpage\SingleSpacing\setlength{\bibitemsep}{\baselineskip}}} % biblatex + {\pretocmd{\bibliography}{\msu@bibpage}{}{} + \@ifpackageloaded{natbib} {\AtBeginEnvironment{thebibliography}{\SingleSpacing\setlength{\bibsep}{\baselineskip}}} % natbib {\AtBeginEnvironment{thebibliography}{\SingleSpacing}}} % any other bib package %\topskip=0pt % setting this because the Grad School doesn’t know how to measure -changed back 6/15/17 @@ -749,20 +836,21 @@ %\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. +% The hyperref code allows hyperref to be used. Requires a very new 2022 or > kernel +% Code here from Ulrike Fischer % 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) +\robustify \hyper@linkend +\NewCommandCopy\ori@hyper@linkstart\hyper@linkstart +\RenewExpandableDocumentCommand\hyper@linkstart{mm} + {% + \CaseSwitch% + {\ori@hyper@linkstart{#1}{#2}}% remove spurious space v4 + {\ori@hyper@linkstart{#1}{#2}}% + {\ori@hyper@linkstart{#1}{#2}}% + {\ori@hyper@linkstart{#1}{#2}}% + } \apptocmd{\@resets@pp}{\gdef\theHchapter{\arabic{msu@hchap}}}{}{} % get hypertargets in appendices right (added v3.0; fixed v3.0b) } % if no hyperref diff --git a/macros/latex/contrib/msu-thesis/msu-thesis.pdf b/macros/latex/contrib/msu-thesis/msu-thesis.pdf Binary files differindex 18ceda29d0..c48ab61034 100644 --- a/macros/latex/contrib/msu-thesis/msu-thesis.pdf +++ b/macros/latex/contrib/msu-thesis/msu-thesis.pdf diff --git a/macros/latex/contrib/msu-thesis/samples/MSU-thesis-chapterbib-testfile.pdf b/macros/latex/contrib/msu-thesis/samples/MSU-thesis-chapterbib-testfile.pdf Binary files differnew file mode 100644 index 0000000000..dffeb0b1ac --- /dev/null +++ b/macros/latex/contrib/msu-thesis/samples/MSU-thesis-chapterbib-testfile.pdf diff --git a/macros/latex/contrib/msu-thesis/samples/MSU-thesis-chapterbib-testfile.tex b/macros/latex/contrib/msu-thesis/samples/MSU-thesis-chapterbib-testfile.tex new file mode 100644 index 0000000000..9f7948b3f3 --- /dev/null +++ b/macros/latex/contrib/msu-thesis/samples/MSU-thesis-chapterbib-testfile.tex @@ -0,0 +1,51 @@ +% !TEX TS-program = pdfLaTeXmk +% Test file for per-chapter stuff using natbib+chapterbib +% +\documentclass[chapterbib,chapterapp]{msu-thesis} +\usepackage[T1]{fontenc} +\usepackage{newtxtext,newtxmath} +\usepackage[]{chapterbib} +\usepackage[]{natbib} +\usepackage{lipsum} + +\usepackage{hyperref} + + +\title{A thesis using per-chapter appendices and bibliographies} +\author{Joe Linguist} +\fieldofstudy{Linguistics} % This should be in sentence case +\date{2021} + +\begin{document} +\frontmatter +\maketitlepage +\begin{abstract} +\lipsum[1] +\end{abstract} +\clearpage +\makecopyrightpage +\clearpage +% Your Acknowledgements are formatted like a chapter, but with no number +\chapter*{Acknowledgements} +\DoubleSpacing % Acknowledgements should be double spaced + I would like to acknowledge lots of people...\lipsum +% + \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 +\mainmatter + +\include{chap1bib} +\include{chap2bib} +\include{chap3bib} +\include{chap4bib} +\chapter{Conclusions} + +\end{document} diff --git a/macros/latex/contrib/msu-thesis/samples/MSU-thesis-template.pdf b/macros/latex/contrib/msu-thesis/samples/MSU-thesis-template.pdf Binary files differnew file mode 100644 index 0000000000..6a6d87acd1 --- /dev/null +++ b/macros/latex/contrib/msu-thesis/samples/MSU-thesis-template.pdf diff --git a/macros/latex/contrib/msu-thesis/samples/MSU-thesis-template.tex b/macros/latex/contrib/msu-thesis/samples/MSU-thesis-template.tex index 268a3df64e..33580d3f0a 100644 --- a/macros/latex/contrib/msu-thesis/samples/MSU-thesis-template.tex +++ b/macros/latex/contrib/msu-thesis/samples/MSU-thesis-template.tex @@ -1,5 +1,5 @@ % This is a template for use with the MSU Thesis class -% Version 3.4 2022/06/30 +% Version 3.6 2022/08/23 % % Class options: %[PhD] Doctor of Philosophy (default) @@ -88,7 +88,7 @@ % to the right, even though that has been the format for more than a decade. % If they want the copyright mark aligned to the left, use \makecopyrightpage* instead. -\makecopyrightpage % use starred option to align on the left of the page +\makecopyrightpage % If you have a dedication page, uncomment the next command to print the dedication page % @@ -104,12 +104,22 @@ Your acknowledgements here. % 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 Key to Abbreviations/symbols you would add each abbreviation in its display order +% using as in the following examples: +\msuabbrev{ASU}{Arizona State University} +\msuabbrev{MIT}{Massachusetts Institute of Technology} +\msuabbrev{MSU}{Michigan State University} +% Then issue a \clearpage and print the list \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 +\listofabbreviations +% Comment out the code above if you have no abbreviations +% See the documentation if you need to change the width or format of the abbreviation column + % See the class documentation and the Memoir manual for how to create other lists % % If you are using an algorithm formatting package (e.g. algorithmicx or algorithm2e) @@ -138,6 +148,20 @@ Your acknowledgements here. %\pagestyle{plain} % remember to change the pagestyle back to plain % % +% Your bibliography command here +% e.g. \bibliography{your-bib-file}) if using natbib +% e.g. \printbibliography if using biblatex +% +% 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 +% These are set automatically by the class if you are using these packages +% +% If you need per-chapter bibliographies, you need to use the [chapterbib] +% class option and you would use \makebibliographypage before each +% chapter level bibliography and then the relevant bibliography command +% You should not use the \backmatter command +% % If you have appendices, they would go here. % If you only have one appendix it will look like this: (comment this out if you have no appendices) \begin{appendix} @@ -158,32 +182,6 @@ Your acknowledgements here. % Even though it is very unintuitive, per-chapter appendices are STILL \chapter commands % in your document! If you use \section it will not work properly. % -% You should not use the \backmatter command before per-chapter material! -% There should only be ONE \backmatter command in your document, -% and it should separate only the thesis from the bibliography -\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 -% -% -% Your bibliography command here -% e.g. \bibliography{your-bib-file}) if using natbib -% e.g. \printbibliography if using biblatex -% -% 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 -% These are set automatically by the class if you are using these packages -% -% If you need per-chapter bibliographies, you need to use the [chapterbib] -% class option and you would use \makebibliographypage before each -% chapter level bibliography and then the relevant bibliography command -% You should not use the \backmatter command before per-chapter material -% +% You should not use the \backmatter command \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 index 3295073e92..4c158792a4 100644 --- a/macros/latex/contrib/msu-thesis/samples/MSU-thesis-testfile.bib +++ b/macros/latex/contrib/msu-thesis/samples/MSU-thesis-testfile.bib @@ -2,26 +2,44 @@ %% http://bibdesk.sourceforge.net/ -%% Created for Alan Munn at 2017-06-23 13:07:54 -0400 +%% Created for Alan Munn at 2022-12-14 14:34:58 -0500 %% Saved with string encoding Unicode (UTF-8) +@book{Chomsky1986, + address = {Cambridge Mass.}, + author = {Noam Chomsky}, + date-added = {2022-12-14 14:34:46 -0500}, + date-modified = {2022-12-14 14:34:46 -0500}, + publisher = {{MIT} Press}, + title = {Barriers}, + year = {1986}} + +@book{Chomsky1995, + address = {Cambridge, Mass.}, + author = {Noam Chomsky}, + date-added = {2022-12-14 14:34:46 -0500}, + date-modified = {2022-12-14 14:34:46 -0500}, + publisher = {MIT Press}, + title = {The Minimalist Program}, + year = {1995}} + @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}} + 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}} + 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 Binary files differindex a2f192bdda..7ec3fc86e9 100644 --- a/macros/latex/contrib/msu-thesis/samples/MSU-thesis-testfile.pdf +++ b/macros/latex/contrib/msu-thesis/samples/MSU-thesis-testfile.pdf diff --git a/macros/latex/contrib/msu-thesis/samples/MSU-thesis-testfile.tex b/macros/latex/contrib/msu-thesis/samples/MSU-thesis-testfile.tex index 7cc0d964cc..a8fb4fdd6c 100644 --- a/macros/latex/contrib/msu-thesis/samples/MSU-thesis-testfile.tex +++ b/macros/latex/contrib/msu-thesis/samples/MSU-thesis-testfile.tex @@ -3,7 +3,7 @@ \listfiles \documentclass[lscape]{msu-thesis} -\setabstractnamespace{0} + % 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. @@ -13,21 +13,28 @@ % \usepackage{natbib} \bibliographystyle{apalike} - +\usepackage[labelfont=bf, + format=plain, + justification=raggedright, + singlelinecheck=off]{caption} % 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} +\dualmajor{Linguistics}{Computer Science} \dedication{This thesis is dedicated to someone.} \date{2021} \usepackage{listings} \lstset{language=TeX,basicstyle={\ttfamily}} \usepackage{lipsum} \usepackage{xcolor} +\usepackage{enumitem} +\usepackage[unit=in]{fgruler} \usepackage{gb4e} +\makeatletter +%\setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} -\usepackage[bookmarksopenlevel=2,bookmarks=true]{hyperref} % not needed but here for testing +\makeatother \counterwithin{exx}{chapter} \singlegloss @@ -36,18 +43,21 @@ %\patchcommand{\exe}{\SingleSpacing}{} % This code is an example of how to set up a new list of -\newlistof{listoflistings}{lol}{List of Listings} +\newcommand{\listlistingsname}{List of Listings} +\newlistof{listoflistings}{lol}{\listlistingsname} \newfloat[chapter]{listing}{lol}{Listing} \newlistentry{listing}{lol}{0} \renewcommand*{\cftlistingname}{Listing\space} \renewcommand*{\cftlistingaftersnum}{\msucaptiondelim} +\usepackage[bookmarksopenlevel=2,bookmarks=true]{hyperref} % not needed but here for testing \begin{document} \frontmatter \maketitlepage -\begin{publicabstract} -\lipsum[1] -\end{publicabstract} +% public abstract removed v4 +%\begin{publicabstract} +%\lipsum[1] +%\end{publicabstract} \begin{abstract} \lipsum[1-6] \end{abstract} @@ -62,18 +72,18 @@ \SingleSpacing \tableofcontents* % ToC will not appear in the table of contents \clearpage -\listoftables +% removed other contents lists as per recommendations v4! +%\listoftables \clearpage -\listoffigures +%\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} +%\listoflistings +% Add all the abbreviations here in their sorted order using \msuabbrev +\begin{abbreviations} +\abbrev{ASA}{A small abbreviation} +\abbrev{ABA}{An abbreviation with an explanation so long that the explanation should wrap to the next line and align properly with the previous line} +\end{abbreviations} +% Then print the list \mainmatter % The next command changes chapters in the TOC to have no dotted leader %\addtocontents{toc}{\protect\renewcommand{\protect\cftchapterdotsep}{\cftnodots}} @@ -264,23 +274,24 @@ A & B & C & D & E & F & G \\ %\begin{appendices} ... \end{appendices} % use this if you have more than one appendix \clearpage +%\backmatter +\bibliography{MSU-thesis-testfile} %\begin{appendix} ... \end{appendix} % use this if you have only one appendix -\begin{appendix} -\chapter{A single appendix} -\lipsum[11] -\end{appendix} +%\begin{appendix} +%\chapter{A single appendix} +%\lipsum[11] +%\end{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 +\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} % This command creates the cover page for the bibliography -\makebibliographypage -\bibliography{MSU-thesis-testfile} +%\makebibliographypage + \end{document} diff --git a/macros/latex/contrib/msu-thesis/samples/chap1bib.tex b/macros/latex/contrib/msu-thesis/samples/chap1bib.tex new file mode 100644 index 0000000000..71f0d1c6db --- /dev/null +++ b/macros/latex/contrib/msu-thesis/samples/chap1bib.tex @@ -0,0 +1,15 @@ +\chapter{Introduction} +Intro things \lipsum +\cite{Munn1999,Chomsky1981} +\section{A section} +\lipsum[1] +\subsection{A subsection} +\lipsum[2] + +\bibliographystyle{apalike} +\bibliography{MSU-thesis-testfile} + +\begin{appendix} +\chapter{An appendix} +This is some text +\end{appendix} diff --git a/macros/latex/contrib/msu-thesis/samples/chap2bib.tex b/macros/latex/contrib/msu-thesis/samples/chap2bib.tex new file mode 100644 index 0000000000..5f0fc7293d --- /dev/null +++ b/macros/latex/contrib/msu-thesis/samples/chap2bib.tex @@ -0,0 +1,19 @@ +\chapter{One} +\section{A section} +\lipsum \cite{Chomsky1986,Chomsky1995} +\subsection{A subsection} +\lipsum[1] +\subsection{Another subsection} +\lipsum[2] +\section{Another section} +\lipsum[3] + +\bibliographystyle{apalike} +\bibliography{MSU-thesis-testfile} +\begin{appendices} + \chapter{An appendix} + \chapter{An appendix} +\end{appendices} +% Add before bibliography call + +%\makebibliographypage diff --git a/macros/latex/contrib/msu-thesis/samples/chap3bib.tex b/macros/latex/contrib/msu-thesis/samples/chap3bib.tex new file mode 100644 index 0000000000..99788108d0 --- /dev/null +++ b/macros/latex/contrib/msu-thesis/samples/chap3bib.tex @@ -0,0 +1,13 @@ +\chapter{Two} +\section{A section} +\lipsum \cite{Chomsky1986,Chomsky1995,Munn2000} +\subsection{A subsection} +\lipsum + +\bibliographystyle{apalike} +\bibliography{MSU-thesis-testfile} +\begin{appendix} +\chapter{Tables and figures} +% \section{A subsection} % This is a problems +\end{appendix} +% Add before bibliography call diff --git a/macros/latex/contrib/msu-thesis/samples/chap4bib.tex b/macros/latex/contrib/msu-thesis/samples/chap4bib.tex new file mode 100644 index 0000000000..4c9f059c92 --- /dev/null +++ b/macros/latex/contrib/msu-thesis/samples/chap4bib.tex @@ -0,0 +1,16 @@ +\chapter{Three} +\section{A section} +\lipsum \cite{Chomsky1986,Chomsky1995} +\subsection{A subsection} +\lipsum[2] + +\bibliographystyle{apalike} +\bibliography{MSU-thesis-testfile} + +\begin{appendices} + \chapter{Tables and Figures} + \lipsum[1] + \chapter{Model Equations} +\lipsum[2] +\end{appendices} +% Add before bibliography call |