- #1
DrWahoo
- 53
- 0
The code below is the the main thesis style, know as muthesis.sty;
It is a style to allow Title, Signatures, Dedication, Table of Contents, Main Matter (Chapter and Sections), Biblio., and approval letter. Edit it to your liking; just make sure all the files are containted within the same folder or Latex will return an error. \NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{muthesis}[2016/01/22 v2016a Marshall University Thesis Class]
\typeout {Package: `muthesis' v2016a 2016/01/22}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Set page margins
\usepackage[letterpaper,left=1in, right=1in, top=1in, bottom=1.25in]{geometry}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Set font for chapter and section titles
% Step 1: Remove extra space from list of tables and list of figures.
% This is added by the \chapter command
% So we take the definition from book.cls
% and we remove the lines that add the extra space
\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\refstepcounter{chapter}%
\typeout{\@chapapp\space\thechapter.}%
\addcontentsline{toc}{chapter}%
{\protect\numberline{\thechapter}#1}%
\else
\addcontentsline{toc}{chapter}{#1}%
\fi
\else
\addcontentsline{toc}{chapter}{#1}%
\fi
\chaptermark{#1}%
\if@twocolumn
\@topnewpage[\@makechapterhead{#2}]%
\else
\@makechapterhead{#2}%
\@afterheading
\fi}
%% Step 2: load titlesec package
\usepackage[compact]{titlesec}
\AtBeginDocument{\titlespacing*{\chapter}{0em}{0em}{1em}}
\AtBeginDocument{\titleformat{\chapter}[block]{\centering\bfseries}{\MakeUppercase{\chaptertitlename{}} \thechapter}{0pt}{\\[0.5em]}{}}
\AtBeginDocument{\titleformat{\section}{\bfseries}{\thesection\hspace*{0.75em}}{0em}{}{}}
\AtBeginDocument{\titleformat{\subsection}{\bfseries}{\thesubsection\hskip1em}{0em}{}{}}
\def\ttl@tocsep{\addvspace{20\p@}}
\def\@makechapterhead#1{%
% \vspace*{50\p@}%
{\parindent \z@ \raggedright \normalfont
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\huge\bfseries \@chapapp\space \thechapter
\par\nobreak
\vskip 20\p@
\fi
\fi
\interlinepenalty\@M
\Huge \bfseries #1\par\nobreak
\vskip 40\p@
}}
%% Next step: load tocloft package to format table of contents
\usepackage[titles]{tocloft}
\usepackage{calc}\renewcommand{\cftchappresnum}{Chapter }
\AtBeginDocument{\addtolength\cftchapnumwidth{\widthof{\bfseries Chapter }}}
\AtBeginDocument{\setlength{\cftbeforechapskip}{0em \@plus\p@}}
%% This will be used in the appendix to cancel out a rightward shift of the lines
%% For each appendix
\newcommand{\canceltocskip}{\hskip-1.5em}
%% How far to space the dots in the leaders
\renewcommand{\cftchapdotsep}{2}
%% These are bold by default, now they are mdseries
\renewcommand{\cftchapleader}{\cftdotfill{\cftchapdotsep}}
\renewcommand{\cftsecleader}{\cftdotfill{\cftchapdotsep}}
\renewcommand{\cftsubsecleader}{\cftdotfill{\cftchapdotsep}}
\renewcommand{\cfttableader}{\cftdotfill{\cftchapdotsep}}
\renewcommand{\cftfigleader}{\cftdotfill{\cftchapdotsep}}
%%% Remove some more boldness
\renewcommand{\cftchapfont}{\mdseries}
\renewcommand{\cftchappagefont}{\mdseries}
\setlength{\cftsecindent}{2em}
\setlength{\cftsubsecindent}{4em}%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Define commands for title, author, date parameters
\newcommand{\MUthesistitle}{TITLE OF THE THESIS}
\newcommand{\thesistitle}[1]{\renewcommand{\MUthesistitle}{#1}}
\newcommand{\MUthesisauthor}{AUTHOR NAME}
\newcommand{\thesisauthor}[1]{\renewcommand{\MUthesisauthor}{#1}}
\newcommand{\MUthesisdate}{GRADUATION DATE}
\newcommand{\thesisdate}[1]{\renewcommand{\MUthesisdate}{#1}}\newcommand{\MUthesischair}{CHAIRPERSON}
\newcommand{\thesischair}[1]{\renewcommand{\MUthesischair}{#1, Committee Chairperson}}
\newcommand{\MUthesiscommittee}{}
\newcommand{\thesiscommittee}[1]{\renewcommand{\MUthesiscommittee}{#1}}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% For double spacing
\usepackage{setspace}
%\let\doublespacing\relax
%\let\singlespacing\relax
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Single page number at bottom center
\AtBeginDocument{\pagestyle{plain}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% APPENDIX
\let\MUOldAppendix\appendix
\renewcommand{\appendix}{%
\MUOldAppendix%
\clearpage%
\addtocontents{toc}{\protect \renewcommand{\protect \cftchappresnum}{Appendix }}%
\addtocontents{toc}{\protect \addtolength \protect\cftchapnumwidth{1em}}%
\setlength{\cftsecindent}{4em}
\setlength{\cftsubsecindent}{6em}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% TITLE PAGE
\newcommand{\thesistitlepage}{%
\thispagestyle{empty}
%% The next line puts the title page in the PDF outline
\pdfbookmark{TITLE PAGE}{PBtitle}
\begin{center}
%\vspace*{1in}
\textbf{\MakeUppercase{\MUthesistitle}}
%\vspace{0.5in}
\vfill
A thesis submitted to\\
the Graduate College of\\
Marshall University\\
In partial fulfillment of\\
the requirements for the degree of\\
Master of Science - Philosophical Doctorate \\
in\\
Mathematics\\
by\\
\MUthesisauthor\\
%\vspace{0.5in}
Approved by\\
\MUthesischair\\
\MUthesiscommittee
\vfill
Marshall University\\
\MUthesisdate
\end{center}
}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% SIGNATURE PAGE
\newcommand{\thesissignaturepage}[1]{%
%\clearpage\phantomsection%
%\addcontentsline{toc}{chapter}{Acknowledgements}%
\doublespacing%
\chapter*{APPROVAL OF THESIS/DISSERTATION}%
\begin{center}%
% left ?? right top
%\fbox{
\includegraphics[scale=1,trim={1.1in 1in 1.1in 2.5in},clip]{signature.pdf}%
%}% end \fbox
\end{center}%
}
\newcommand{\thesisdedication}[1]{%
%\clearpage\phantomsection%
%\addcontentsline{toc}{chapter}{Acknowledgements}%
\doublespacing%
\chapter*{DEDICATION}
\input{#1}}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ACKNOWLEDGMENTS PAGE
\newcommand{\thesisacknowledgments}[1]{%
%\clearpage\phantomsection%
%\addcontentsline{toc}{chapter}{Acknowledgements}%
\doublespacing%
\chapter*{ACKNOWLEDGEMENTS}
\input{#1}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% TABLE OF CONTENTS
\renewcommand{\contentsname}{\normalsize CONTENTS}
\let\MUoldtableofcontents\tableofcontents
\renewcommand{\tableofcontents}{%
\clearpage%
\phantomsection%
\pdfbookmark{CONTENTS}{PBcont}%
\doublespacing%
\MUoldtableofcontents}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% LIST OF FIGURES
\renewcommand\listfigurename{\normalsize LIST OF FIGURES}
\let\MUoldlistoffigures\listoffigures
\renewcommand{\listoffigures}{%
\clearpage%
\phantomsection%
\pdfbookmark{LIST OF FIGURES}{PBfigures}%
\addcontentsline{toc}{chapter}{List of Figures}%
\MUoldlistoffigures
%\chapter*{List of Figures}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% LIST OF TABLES
\renewcommand\listtablename{\normalsize LIST OF TABLES}
\let\MUoldlistoftables\listoftables
\renewcommand{\listoftables}{%
\clearpage%
\phantomsection%
\pdfbookmark{LIST OF TABLES}{PBtables}%
%\addcontentsline{toc}{chapter}{List of Tables}
\addcontentsline{toc}{chapter}{List of Tables}%
\MUoldlistoftables
}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ABSTRACT
\newcommand{\thesisabstract}[1]{%
\chapter*{ABSTRACT}
\addcontentsline{toc}{chapter}{Abstract}%
\input{#1}}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% REFERENCES
\newcommand{\thesisbibstyle}{amsplain}
\renewcommand{\bibname}{REFERENCES}
\newcommand{\thesisbibliography}[1]{%
\clearpage%
\phantomsection%
\addcontentsline{toc}{chapter}{References}%
\singlespacing
\bibliographystyle{\thesisbibstyle}
\bibliography{#1}
}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% VITA
\newcommand{\thesisvita}[1]{%
\clearpage%
\phantomsection%
\addcontentsline{toc}{chapter}{Vita}%
\singlespacing%
\input{#1}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% COPYRIGHT PAGE
\newcommand{\thesiscopyright}[1]{%
\clearpage
\mbox{}\vfill
\begin{center}
Copyright by\\[1em]
\MUthesisauthor\\[1em]
#1
\end{center}%
}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Main text is left justified
\let\OldMainMatter\mainmatter
\renewcommand{\mainmatter}{\OldMainMatter\raggedright\addtolength{\parindent}{1em}}
It is a style to allow Title, Signatures, Dedication, Table of Contents, Main Matter (Chapter and Sections), Biblio., and approval letter. Edit it to your liking; just make sure all the files are containted within the same folder or Latex will return an error. \NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{muthesis}[2016/01/22 v2016a Marshall University Thesis Class]
\typeout {Package: `muthesis' v2016a 2016/01/22}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Set page margins
\usepackage[letterpaper,left=1in, right=1in, top=1in, bottom=1.25in]{geometry}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Set font for chapter and section titles
% Step 1: Remove extra space from list of tables and list of figures.
% This is added by the \chapter command
% So we take the definition from book.cls
% and we remove the lines that add the extra space
\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\refstepcounter{chapter}%
\typeout{\@chapapp\space\thechapter.}%
\addcontentsline{toc}{chapter}%
{\protect\numberline{\thechapter}#1}%
\else
\addcontentsline{toc}{chapter}{#1}%
\fi
\else
\addcontentsline{toc}{chapter}{#1}%
\fi
\chaptermark{#1}%
\if@twocolumn
\@topnewpage[\@makechapterhead{#2}]%
\else
\@makechapterhead{#2}%
\@afterheading
\fi}
%% Step 2: load titlesec package
\usepackage[compact]{titlesec}
\AtBeginDocument{\titlespacing*{\chapter}{0em}{0em}{1em}}
\AtBeginDocument{\titleformat{\chapter}[block]{\centering\bfseries}{\MakeUppercase{\chaptertitlename{}} \thechapter}{0pt}{\\[0.5em]}{}}
\AtBeginDocument{\titleformat{\section}{\bfseries}{\thesection\hspace*{0.75em}}{0em}{}{}}
\AtBeginDocument{\titleformat{\subsection}{\bfseries}{\thesubsection\hskip1em}{0em}{}{}}
\def\ttl@tocsep{\addvspace{20\p@}}
\def\@makechapterhead#1{%
% \vspace*{50\p@}%
{\parindent \z@ \raggedright \normalfont
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\huge\bfseries \@chapapp\space \thechapter
\par\nobreak
\vskip 20\p@
\fi
\fi
\interlinepenalty\@M
\Huge \bfseries #1\par\nobreak
\vskip 40\p@
}}
%% Next step: load tocloft package to format table of contents
\usepackage[titles]{tocloft}
\usepackage{calc}\renewcommand{\cftchappresnum}{Chapter }
\AtBeginDocument{\addtolength\cftchapnumwidth{\widthof{\bfseries Chapter }}}
\AtBeginDocument{\setlength{\cftbeforechapskip}{0em \@plus\p@}}
%% This will be used in the appendix to cancel out a rightward shift of the lines
%% For each appendix
\newcommand{\canceltocskip}{\hskip-1.5em}
%% How far to space the dots in the leaders
\renewcommand{\cftchapdotsep}{2}
%% These are bold by default, now they are mdseries
\renewcommand{\cftchapleader}{\cftdotfill{\cftchapdotsep}}
\renewcommand{\cftsecleader}{\cftdotfill{\cftchapdotsep}}
\renewcommand{\cftsubsecleader}{\cftdotfill{\cftchapdotsep}}
\renewcommand{\cfttableader}{\cftdotfill{\cftchapdotsep}}
\renewcommand{\cftfigleader}{\cftdotfill{\cftchapdotsep}}
%%% Remove some more boldness
\renewcommand{\cftchapfont}{\mdseries}
\renewcommand{\cftchappagefont}{\mdseries}
\setlength{\cftsecindent}{2em}
\setlength{\cftsubsecindent}{4em}%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Define commands for title, author, date parameters
\newcommand{\MUthesistitle}{TITLE OF THE THESIS}
\newcommand{\thesistitle}[1]{\renewcommand{\MUthesistitle}{#1}}
\newcommand{\MUthesisauthor}{AUTHOR NAME}
\newcommand{\thesisauthor}[1]{\renewcommand{\MUthesisauthor}{#1}}
\newcommand{\MUthesisdate}{GRADUATION DATE}
\newcommand{\thesisdate}[1]{\renewcommand{\MUthesisdate}{#1}}\newcommand{\MUthesischair}{CHAIRPERSON}
\newcommand{\thesischair}[1]{\renewcommand{\MUthesischair}{#1, Committee Chairperson}}
\newcommand{\MUthesiscommittee}{}
\newcommand{\thesiscommittee}[1]{\renewcommand{\MUthesiscommittee}{#1}}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% For double spacing
\usepackage{setspace}
%\let\doublespacing\relax
%\let\singlespacing\relax
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Single page number at bottom center
\AtBeginDocument{\pagestyle{plain}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% APPENDIX
\let\MUOldAppendix\appendix
\renewcommand{\appendix}{%
\MUOldAppendix%
\clearpage%
\addtocontents{toc}{\protect \renewcommand{\protect \cftchappresnum}{Appendix }}%
\addtocontents{toc}{\protect \addtolength \protect\cftchapnumwidth{1em}}%
\setlength{\cftsecindent}{4em}
\setlength{\cftsubsecindent}{6em}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% TITLE PAGE
\newcommand{\thesistitlepage}{%
\thispagestyle{empty}
%% The next line puts the title page in the PDF outline
\pdfbookmark{TITLE PAGE}{PBtitle}
\begin{center}
%\vspace*{1in}
\textbf{\MakeUppercase{\MUthesistitle}}
%\vspace{0.5in}
\vfill
A thesis submitted to\\
the Graduate College of\\
Marshall University\\
In partial fulfillment of\\
the requirements for the degree of\\
Master of Science - Philosophical Doctorate \\
in\\
Mathematics\\
by\\
\MUthesisauthor\\
%\vspace{0.5in}
Approved by\\
\MUthesischair\\
\MUthesiscommittee
\vfill
Marshall University\\
\MUthesisdate
\end{center}
}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% SIGNATURE PAGE
\newcommand{\thesissignaturepage}[1]{%
%\clearpage\phantomsection%
%\addcontentsline{toc}{chapter}{Acknowledgements}%
\doublespacing%
\chapter*{APPROVAL OF THESIS/DISSERTATION}%
\begin{center}%
% left ?? right top
%\fbox{
\includegraphics[scale=1,trim={1.1in 1in 1.1in 2.5in},clip]{signature.pdf}%
%}% end \fbox
\end{center}%
}
\newcommand{\thesisdedication}[1]{%
%\clearpage\phantomsection%
%\addcontentsline{toc}{chapter}{Acknowledgements}%
\doublespacing%
\chapter*{DEDICATION}
\input{#1}}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ACKNOWLEDGMENTS PAGE
\newcommand{\thesisacknowledgments}[1]{%
%\clearpage\phantomsection%
%\addcontentsline{toc}{chapter}{Acknowledgements}%
\doublespacing%
\chapter*{ACKNOWLEDGEMENTS}
\input{#1}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% TABLE OF CONTENTS
\renewcommand{\contentsname}{\normalsize CONTENTS}
\let\MUoldtableofcontents\tableofcontents
\renewcommand{\tableofcontents}{%
\clearpage%
\phantomsection%
\pdfbookmark{CONTENTS}{PBcont}%
\doublespacing%
\MUoldtableofcontents}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% LIST OF FIGURES
\renewcommand\listfigurename{\normalsize LIST OF FIGURES}
\let\MUoldlistoffigures\listoffigures
\renewcommand{\listoffigures}{%
\clearpage%
\phantomsection%
\pdfbookmark{LIST OF FIGURES}{PBfigures}%
\addcontentsline{toc}{chapter}{List of Figures}%
\MUoldlistoffigures
%\chapter*{List of Figures}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% LIST OF TABLES
\renewcommand\listtablename{\normalsize LIST OF TABLES}
\let\MUoldlistoftables\listoftables
\renewcommand{\listoftables}{%
\clearpage%
\phantomsection%
\pdfbookmark{LIST OF TABLES}{PBtables}%
%\addcontentsline{toc}{chapter}{List of Tables}
\addcontentsline{toc}{chapter}{List of Tables}%
\MUoldlistoftables
}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ABSTRACT
\newcommand{\thesisabstract}[1]{%
\chapter*{ABSTRACT}
\addcontentsline{toc}{chapter}{Abstract}%
\input{#1}}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% REFERENCES
\newcommand{\thesisbibstyle}{amsplain}
\renewcommand{\bibname}{REFERENCES}
\newcommand{\thesisbibliography}[1]{%
\clearpage%
\phantomsection%
\addcontentsline{toc}{chapter}{References}%
\singlespacing
\bibliographystyle{\thesisbibstyle}
\bibliography{#1}
}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% VITA
\newcommand{\thesisvita}[1]{%
\clearpage%
\phantomsection%
\addcontentsline{toc}{chapter}{Vita}%
\singlespacing%
\input{#1}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% COPYRIGHT PAGE
\newcommand{\thesiscopyright}[1]{%
\clearpage
\mbox{}\vfill
\begin{center}
Copyright by\\[1em]
\MUthesisauthor\\[1em]
#1
\end{center}%
}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Main text is left justified
\let\OldMainMatter\mainmatter
\renewcommand{\mainmatter}{\OldMainMatter\raggedright\addtolength{\parindent}{1em}}