Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- % asuthesis.cls
- % Gregory Gelfond
- % Basic Class Declaration
- \ProvidesClass{asuthesis}
- \NeedsTeXFormat{LaTeX2e}
- % Pass along arguments to the report docment class which serves
- % as a foundation for this class file.
- \DeclareOption*{\PassOptionsToClass{\CurrentOption}{memoir}}
- \ProcessOptions \relax
- % Load the memoir class
- \LoadClass[12pt,oneside,letterpaper,final]{memoir}
- % Font Settings
- % Enable Stix as a replacement for Times New Roman
- % According to the style guide, Times New Roman font is to be set at
- % 12pt in size. Babel is required so that the renaming of certain
- % sections wont conflict with certains defaults that babel takes over.
- \RequirePackage[utf8]{inputenc}
- \RequirePackage[T1]{fontenc}
- \RequirePackage{stix}
- \RequirePackage[scaled=0.85]{beramono}
- \RequirePackage[english]{babel}
- \RequirePackage[kerning,spacing,babel,final]{microtype}
- % require the etoolbox package
- \RequirePackage{etoolbox}
- % Include basic colors for editing notes
- \RequirePackage[usenames,dvipsnames,svgnames,table]{xcolor}
- % additional mandatory packages
- \RequirePackage{amsmath}
- \RequirePackage{amsthm}
- \RequirePackage{thmtools}
- \RequirePackage[final]{graphicx}
- \RequirePackage[most]{tcolorbox}
- \RequirePackage[numbers,sort]{natbib}
- % Theorem Styling
- \declaretheorem[style=definition,qed=$\diamond$,
- numberwithin=chapter]{definition}
- \declaretheorem[style=plain,qed=$\diamond$,
- sibling=definition]{example}
- \declaretheorem[style=plain,numberwithin=chapter]{theorem}
- \declaretheorem[style=plain,numberwithin=chapter]{lemma}
- % require the listings package for formatting source code
- % and define a new float environment for program listings
- \RequirePackage{listings}
- \newfloat[chapter]{listing}{lol}{Listing}
- % configure the format for program listings
- \lstset{
- basicstyle=\ttfamily\linespread{1.1}\lst@ifdisplaystyle\footnotesize\fi,
- commentstyle=\ttfamily\itshape\linespread{1.1}\lst@ifdisplaystyle\footnotesize\fi,
- mathescape=true,
- showstringspaces=false,
- keepspaces=true,
- formfeed=\newpage,
- tabsize=4,
- columns=fullflexible,
- xleftmargin=\parindent,
- captionpos=b,
- morecomment=[l]\%,
- deletekeywords={history}
- }
- % Basic Page Geometry
- % Every page of your document must meet the margin requirements of 1.25
- % inches on the left and right, and 1 inch on the top and bottom. All
- % materials including appendices, if you choose to include them, must meet
- % the margin requirements.
- % set the left and right margins as well as the textwidth
- \setlrmarginsandblock{1.25in}{1.25in}{*}
- \setulmarginsandblock{1.0in}{1.0in}{*}
- \setheaderspaces{*}{0.5\baselineskip}{*}
- \settrimmedsize{\stockheight}{\stockwidth}{*}
- \settrims{0pt}{0pt}
- \checkandfixthelayout[fixed]
- \sloppybottom
- % Line Spacing
- % All text must be double-spaced, except: block quotes, appendices,
- % table/figure captions, material in tables, footnotes, endnotes, reference
- % citations, and the optional biographical sketch. You must single-space
- % individual footnotes and reference entries, then double-space between
- % each note and entry.
- % Set the spacing throughout the text to double space, but exclude
- % individual footnotes, captions, etc.
- \DoubleSpacing
- \BeforeBeginEnvironment{quote}{\SingleSpacing}
- \AfterEndEnvironment{quote}{\vspace{-\baselineskip}\DoubleSpacing}
- \BeforeBeginEnvironment{quotation}{\SingleSpacing}
- \AfterEndEnvironment{quotation}{\vspace{-\baselineskip}\DoubleSpacing}
- \AtBeginEnvironment{thebibliography}{
- \renewcommand{\@memb@bchap}{
- \part*{\bibname}%
- \bibmark
- \addcontentsline{toc}{part}{\bibname}
- \prebibhook
- }
- }
- \AtBeginEnvironment{thebibliography}{\SingleSpacing}
- \AtEndEnvironment{thebibliography}{\DoubleSpacing}
- % Set the spacing between separate footnotes to be double spaced.
- \setlength{\footnotesep}{\baselineskip}
- % Title Page Format
- %
- % To make the definition of the title page simpler, the class
- % provides the following commands to accept arguments from
- % within the main .tex file.
- % \doctype defines the type of document (either thesis or dissertation)
- \newcommand{\doctype}[1]{\renewcommand{\@doctype}{#1}}
- \newcommand{\@doctype}{\tt$\backslash$\string doctype}
- % \degree defines the type of degree being obtained
- \newcommand{\degreetype}[1]{\renewcommand{\@degreetype}{#1}}
- \newcommand{\@degreetype}{\tt$\backslash$\string degreetype}
- % \defensemonth defines the month of the defense
- \newcommand{\defensemonth}[1]{\renewcommand{\@defensemonth}{#1}}
- \newcommand{\@defensemonth}{\tt$\backslash$\string defensemonth}
- % \defensemonth defines the year of the defense
- \newcommand{\defenseyear}[1]{\renewcommand{\@defenseyear}{#1}}
- \newcommand{\@defenseyear}{\tt$\backslash$\string defenseyear}
- % \gradmonth defines the month of graduation
- \newcommand{\gradmonth}[1]{\renewcommand{\@gradmonth}{#1}}
- \newcommand{\@gradmonth}{\tt$\backslash$\string gradmonth}
- % \gradyear defines the year of graduation
- \newcommand{\gradyear}[1]{\renewcommand{\@gradyear}{#1}}
- \newcommand{\@gradyear}{\tt$\backslash$\string gradyear}
- \newcommand{\chairlabel}{Chair}
- % define the title page format
- \renewcommand\maketitle{
- \begin{titlingpage}
- \centering
- \@title \\
- by \\
- \@author \\
- \vspace{5\baselineskip}
- \begin{SingleSpace}
- A \@doctype\ Presented in Partial Fulfillment\\
- of the Requirement for the Degree\\
- \@degreetype
- \end{SingleSpace}
- \vspace{5\baselineskip}
- \begin{SingleSpace}
- Approved \@defensemonth\ \@defenseyear\ by the\\
- Graduate Supervisory Committee:\\[\baselineskip]
- \renewcommand*{\do}[1]{##1, \chairlabel \\}
- \dolistloop{\chairperson}
- \renewcommand*{\do}[1]{##1 \\}
- \dolistloop{\committeeperson}
- \end{SingleSpace}
- \vfill
- ARIZONA STATE UNIVERSITY\\
- \@gradmonth\ \@gradyear\\
- \end{titlingpage}
- }
- % Copyright page
- \newcommand{\copyrightpage}{
- \thispagestyle{empty}
- ~\\ \vfill
- \begin{center}
- \copyright\space\@gradyear\space\@author\\
- All Rights Reserved
- \end{center}
- \clearpage
- }
- % Abstract Styling
- %
- % The abstract title must be "ABSTRACT" in all caps, set in the same
- % font as the rest of the text.
- \renewcommand{\abstractnamefont}{\normalfont}
- % Acknowledgements definition and styling
- \newenvironment{acknowledgments}{
- \renewcommand{\abstractname}{ACKNOWLEDGMENTS}\abstract
- }{
- \endabstract
- }
- % Make sections and subsections numbered
- \setsecnumdepth{all}
- % Chapter Styling
- \makechapterstyle{asu}{
- \renewcommand*{\chapterheadstart}{}
- \renewcommand*{\chapnamefont}{\normalfont}
- \renewcommand*{\chapnumfont}{\normalfont}
- \renewcommand*{\afterchapternum}{\\[\baselineskip]}
- \renewcommand*{\chaptitlefont}{\normalfont}
- \setlength{\afterchapskip}{\onelineskip}
- \renewcommand*{\printchapternum}{
- \centering \chapnumfont \thechapter
- }
- \renewcommand*{\printchaptertitle}[1]{
- \expandafter\centering
- \expandafter\chaptitlefont
- \expandafter\MakeUppercase
- \expandafter{##1}
- }
- }
- % Subsection Styling
- \newcommand{\divisionbeforeskip}{\baselineskip}
- \newcommand{\divisionindent}{0.5em}
- \newcommand{\divisionfont}{\normalfont}
- \newcommand{\divisionafterskip}{\baselineskip}
- \setbeforesecskip{\divisionbeforeskip}
- \setsecindent{\divisionindent}
- \setsecheadstyle{\divisionfont}
- \setaftersecskip{\divisionafterskip}
- \setbeforesubsecskip{\divisionbeforeskip}
- \setsubsecindent{\divisionindent}
- \setsubsecheadstyle{\divisionfont}
- \setaftersubsecskip{\divisionafterskip}
- \setbeforesubsubsecskip{\divisionbeforeskip}
- \setsubsubsecindent{\divisionindent}
- \setsubsubsecheadstyle{\divisionfont}
- \setaftersubsubsecskip{\divisionafterskip}
- \setbeforeparaskip{\divisionbeforeskip}
- \setparaindent{\divisionindent}
- \setparaheadstyle{\divisionfont}
- \setafterparaskip{\divisionafterskip}
- \setbeforesubparaskip{\divisionbeforeskip}
- \setsubparaindent{\divisionindent}
- \setsubparaheadstyle{\divisionfont}
- \setaftersubparaskip{\divisionafterskip}
- % Page style
- \makepagestyle{asu}
- \makeevenfoot{asu}{}{\thepage}{}
- \makeoddfoot{asu}{}{\thepage}{}
- % Custom Section Names
- \AtBeginDocument{
- \renewcommand{\contentsname}{TABLE OF CONTENTS}
- \renewcommand{\listtablename}{LIST OF TABLES}
- \renewcommand{\listfigurename}{LIST OF FIGURES}
- \renewcommand{\abstractname}{ABSTRACT}
- \renewcommand{\bibname}{REFERENCES}
- \renewcommand{\appendixname}{APPENDIX}
- }
- \addto\captionsenglish{
- \renewcommand{\contentsname}{TABLE OF CONTENTS}
- \renewcommand{\listtablename}{LIST OF TABLES}
- \renewcommand{\listfigurename}{LIST OF FIGURES}
- \renewcommand{\abstractname}{ABSTRACT}
- \renewcommand{\bibname}{REFERENCES}
- \renewcommand{\appendixname}{APPENDIX}
- }
- % Table of Contents
- \settocdepth{subparagraph}
- \cftpagenumbersoff{part}
- % The table of contents must use the standard font and use all
- % capital letters for chapter titles or sections headings.
- \setlength{\cftbeforepartskip}{0pt}
- \setlength{\cftbeforechapterskip}{0pt}
- \setlength{\cftbeforesectionskip}{0pt}
- \setlength{\cftbeforesubsectionskip}{0pt}
- \setlength{\cftbeforesubsubsectionskip}{0pt}
- \setlength{\cftbeforeparagraphskip}{0pt}
- \setlength{\cftbeforesubparagraphskip}{0pt}
- \setlength{\cftbeforefigureskip}{0pt}
- \setlength{\cftbeforetableskip}{0pt}
- \renewcommand{\insertchapterspace}{}
- \renewcommand{\chaptitlefont}{\normalfont}
- \renewcommand{\cftpartfont}{\normalfont\MakeUppercase}
- \renewcommand{\cftchapterfont}{\normalfont\MakeUppercase}
- \renewcommand{\cftchapterpagefont}{\normalfont}
- \renewcommand{\cftsectionpagefont}{\normalfont}
- \renewcommand{\cftsubsectionpagefont}{\normalfont}
- \renewcommand{\cftsubsubsectionpagefont}{\normalfont}
- \renewcommand{\cftsubsubsectionpagefont}{\normalfont}
- \renewcommand{\cftparagraphpagefont}{\normalfont}
- \renewcommand{\cftsubparagraphpagefont}{\normalfont}
- \renewcommand{\cftfigurepagefont}{\normalfont}
- \renewcommand{\cfttablepagefont}{\normalfont}
- % level definitions for TOC
- % Set indent to increase by the same amount for each level in the TOC;
- % don't adjust figure or table indents
- \newlength{\levelindentincrement}
- \setlength{\levelindentincrement}{2em}
- \newlength{\levelindent}
- \setlength{\levelindent}{\levelindentincrement}
- \setlength{\cftchapterindent}{\levelindent}
- \addtolength{\levelindent}{\levelindentincrement}
- \setlength{\cftsectionindent}{\levelindent}
- \addtolength{\levelindent}{\levelindentincrement}
- \setlength{\cftsubsectionindent}{\levelindent}
- \addtolength{\levelindent}{\levelindentincrement}
- \setlength{\cftsubsubsectionindent}{\levelindent}
- \addtolength{\levelindent}{\levelindentincrement}
- \setlength{\cftparagraphindent}{\levelindent}
- \addtolength{\levelindent}{\levelindentincrement}
- \setlength{\cftsubparagraphindent}{\levelindent}
- \addtolength{\levelindent}{\levelindentincrement}
- % Define the pagestyle for regular TOC pages
- \copypagestyle{asu-toc}{asu}
- \makeevenhead{asu-toc}{CHAPTER}{}{Page}
- \makeoddhead{asu-toc}{CHAPTER}{}{Page}
- % Define the pagestyle for the initial TOC page
- \copypagestyle{asu-toc-init}{asu}
- \makeevenhead{asu-toc-init}{}{\printchaptertitle{\contentsname}}{}
- \makeoddhead{asu-toc-init}{}{\printchaptertitle{\contentsname}}{}
- \renewcommand{\tocheadstart}{}
- \renewcommand{\printtoctitle}[1]{}
- \renewcommand{\aftertoctitle}{
- \thispagestyle{asu-toc-init}
- \hfill Page\par
- }
- % List of Tables
- \copypagestyle{asu-lot}{asu}
- \makeevenhead{asu-lot}{Table}{}{Page}
- \makeoddhead{asu-lot}{Table}{}{Page}
- \copypagestyle{asu-lot-init}{asu}
- \makeevenhead{asu-lot-init}{}{\printchaptertitle{\listtablename}}{}
- \makeoddhead{asu-lot-init}{}{\printchaptertitle{\listtablename}}{}
- \renewcommand{\lotheadstart}{}
- \renewcommand{\printlottitle}[1]{}
- \renewcommand{\afterlottitle}{
- \thispagestyle{asu-lot-init}
- Table\hfill Page\par
- }
- % List of Figures
- \copypagestyle{asu-lof}{asu}
- \makeevenhead{asu-lof}{Figure}{}{Page}
- \makeoddhead{asu-lof}{Figure}{}{Page}
- \copypagestyle{asu-lof-init}{asu}
- \makeevenhead{asu-lof-init}{}{\printchaptertitle{\listfigurename}}{}
- \makeoddhead{asu-lof-init}{}{\printchaptertitle{\listfigurename}}{}
- \renewcommand{\lofheadstart}{}
- \renewcommand{\printloftitle}[1]{}
- \renewcommand{\afterloftitle}{
- \thispagestyle{asu-lof-init}
- Figure\hfill Page\par
- }
- % Configure the appendices
- \BeforeBeginEnvironment{appendices}{
- \addcontentsline{toc}{part}{Appendix}
- \addtocontents{toc}{\protect\setcounter{tocdepth}{0}}
- \makeatletter
- \renewcommand{\memendofchapterhook}{
- \clearpage
- \m@mindentafterchapter
- \@afterheading
- }
- \makeatother
- }
- \AfterEndEnvironment{appendices}{
- \makeatletter
- \renewcommand{\memendofchapterhook}{
- \m@mindentafterchapter
- \@afterheading
- }
- \makeatother
- }
- % define a command asutables to automatically generate the required
- % tables (LOF, LOT, and TOC) correctly
- \newcommand{\asutables}{
- % setup the table of contents
- \clearpage
- \pagestyle{asu-toc}
- \tableofcontents*
- % setup the list of tables
- \clearpage
- \pagestyle{asu-lot}
- \listoftables
- % setup the list of figures
- \clearpage
- \pagestyle{asu-lof}
- \listoffigures
- % minor hack to get the TOC format right
- \addcontentsline{toc}{part}{Chapter}
- \clearpage
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement