diff options
author | Karl Berry <karl@freefriends.org> | 2014-08-11 22:57:01 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-08-11 22:57:01 +0000 |
commit | 7f08054bf5aebef2dca4f32b2d21e95a50f7e2c5 (patch) | |
tree | 531925604d7a2b8898e14bdc3d0314a18149b4d6 /Master/texmf-dist/tex/latex/msu-thesis | |
parent | 0714375ebf96ca39f502d46640f9e898c0c95233 (diff) |
msu-thesis (11aug14)
git-svn-id: svn://tug.org/texlive/trunk@34907 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/msu-thesis')
-rw-r--r-- | Master/texmf-dist/tex/latex/msu-thesis/msu-thesis.cls | 111 |
1 files changed, 92 insertions, 19 deletions
diff --git a/Master/texmf-dist/tex/latex/msu-thesis/msu-thesis.cls b/Master/texmf-dist/tex/latex/msu-thesis/msu-thesis.cls index 41ef4488da9..d2c2a85f9a2 100644 --- a/Master/texmf-dist/tex/latex/msu-thesis/msu-thesis.cls +++ b/Master/texmf-dist/tex/latex/msu-thesis/msu-thesis.cls @@ -84,8 +84,8 @@ % Version 2.1d 2012/05/27 Removed superfluous title redefinition; % Made title in abstract upper case (bug); % Updated documentation; updated degree list -% Version 2.2 2012/06/07 Made changes to case of copyright page and program name -% as per user report. Who knows if the grad school will +% Version 2.2 2012/06/07 Made changes to case of copyright page and program name +% as per user report. Who knows if the grad school will % change their mind again. What kind of people care about this? % Name on copyright page is now upper case; % Program name is now as typed. @@ -102,14 +102,25 @@ % are bold; this can be turned off with the [noboldtoc] option for a % prettier, but possibly non-compliant TOC. % Changed capitalization of 'by' to 'By' which makes things so much better... +% Version 2.5 2014/08/08 Fixed problem with bibliography cover page and appendix formatting +% Bibliography cover page is now the page that appears in the TOC +% Different TOC format for 1 or >1 appendices +% User commands simplified: \appendix = 1 appendix; \appendices = >1 +% Added three TOC options: boldtoc, plaintoc, mixedtoc replacing noboldtoc +% Improved hyperref support for Appendices and Bibliography % % Use at your own risk! % Report bugs/problems/questions to <amunn@msu.edu> % +\def\msu@version{2.5} +\def\msu@date{2014/08/08} \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{msu-thesis}[2014/08/04 Michigan State University Thesis Class version 2.4] +\ProvidesClass{msu-thesis}[\msu@date Michigan State University Thesis Class version \msu@version] \newif\ifmsu@lscape\msu@lscapefalse -\newif\ifmsu@stupid\msu@stupidtrue +\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@hyperloaded\msu@hyperloadedfalse \DeclareOption{PhD}{\gdef\@degree{Doctor of Philosophy}\gdef\@diss{DISSERTATION}} \DeclareOption{MA}{\gdef\@degree{Master of Arts}\gdef\@diss{THESIS}} \DeclareOption{MS}{\gdef\@degree{Master of Science}\gdef\@diss{THESIS}} @@ -125,7 +136,9 @@ \DeclareOption{lscape}{% \msu@lscapetrue \AtEndDocument{\ClassWarningNoLine{msu-thesis}{You have chosen the [lscape] option. You may need to run latex twice to get landscape page numbering to display correctly}}} -\DeclareOption{noboldtoc}{\msu@stupidfalse} +\DeclareOption{boldtoc}{\msu@stupidtoctrue\msu@plaintocfalse\msu@mixedtocfalse} +\DeclareOption{plaintoc}{\msu@plaintoctrue\msu@stupidtocfalse\msu@mixedtocfalse} +\DeclareOption{mixedtoc}{\msu@mixedtoctrue\msu@stupidtocfalse\msu@plaintocfalse} \ExecuteOptions{PhD} \DeclareOption*{% \PassOptionsToClass{\CurrentOption}{memoir}% @@ -172,13 +185,12 @@ % polyglossia if they are loaded since they redefine the contents title % \newcommand*\msu@contentsname{TABLE OF CONTENTS} - + \newif\ifappendices\appendicesfalse \newcommand*{\@appendixcover}{\ifappendices{APPENDICES}\else{APPENDIX}\fi} \newcommand*{\fieldofstudy}[1]{\gdef\@fieldofstudy{#1}} % removed \MakeUppercase 6/5/12 \newcommand{\dedication}[1]{\gdef\@dedication{#1}} \newcommand*{\degree}[1]{\gdef\@degree{\MakeUppercase{#1}}} -\newcommand*{\appendixcover}[1]{\gdef\@appendixcover{\MakeUppercase{#1}}} % msuabstract environment (not needed now) but included for backwards % compatibility @@ -230,15 +242,37 @@ \renewcommand*{\cfttablename}{Table\space} % Stupid option to make the TOC all bold -\ifmsu@stupid -\renewcommand*{\cftsectionfont}{\bfseries} -\renewcommand*{\cftsubsectionfont}{\bfseries} -\renewcommand*{\cftsubsubsectionfont}{\bfseries}\fi +\ifmsu@stupidtoc + \def\msu@tocfont{\bfseries} + \def\msu@chapfont{\bfseries} +\fi +\ifmsu@plaintoc + \def\msu@tocfont{\normalfont} + \def\msu@chapfont{\normalfont} + +\fi +\ifmsu@mixedtoc + \def\msu@tocfont{\normalfont} + \def\msu@chapfont{\bfseries} + +\fi + +\renewcommand*{\cftchapterfont}{\msu@chapfont} +\renewcommand*{\cftchapterpagefont}{\msu@chapfont} +\renewcommand*{\cftsectionfont}{\msu@tocfont} +\renewcommand*{\cftsubsectionfont}{\msu@tocfont} +\renewcommand*{\cftsubsubsectionfont}{\msu@tocfont} +\renewcommand*{\cftsectionpagefont}{\msu@tocfont} +\renewcommand*{\cftsubsectionpagefont}{\msu@tocfont} +\renewcommand*{\cftsubsubsectionpagefont}{\msu@tocfont} \renewcommand*{\l@chapter}[2]{% + \renewcommand{\cftchapterpagefont}{\msu@chapfont} \l@chapapp{\MakeUppercase{#1}}{#2}{\cftchaptername}} % Format chapter names \renewcommand*{\l@appendix}[2]{% - \l@chapapp{\MakeUppercase{#1}}{#2}{\cftappendixname}} % Format appendix names + \renewcommand{\cftchapterpagefont}{\msu@tocfont} + \setlength{\cftchapternumwidth}{2em} + \l@chapapp{\msu@tocfont{#1}}{#2}{\cftappendixname}} % Format appendix names \setlength{\cftchapternumwidth}{3em} \setrmarg{3.5em} % better wrapping of long titles %\setlength{\cftbeforechapterskip}{1.0em \@plus\p@} @@ -314,36 +348,75 @@ \DoubleSpacing\pagestyle{plain}\@ifstar{\@smemmain}{\@memmain}} + % make the appendices cover page -\newcommand*{\makeappendixcover}{% +% Two new commands added \appendix and \appendices +% no longer need to set switch manually +% added 8/7/14 + +\newcommand*{\@makeappendixcover}{% +\addcontentsline{toc}{chapter}{\@appendixcover} +\ifappendices + \settocdepth{chapter} + \addtocontents{toc}{% + \setlength{\cftchapterindent}{1.5em} + \setlength{\cftbeforechapterskip}{0.0em \@plus\p@} +} +\else + \settocdepth{part} +\fi \clearpage \chapter*{\ } \vspace{.35\textheight}\begin{center} \bfseries\@appendixcover -\end{center}} +\end{center} +\ifmsu@hyperloaded + \renewcommand{\theHchapter}{A\arabic{chapter}} +\fi +} +\let\orig@appendix\appendix +\let\orig@appendices\appendices +\let\orig@endappendices\endappendices +\renewcommand*{\appendix}{\appendicesfalse\@makeappendixcover\orig@appendix} +\renewcommand*{\appendices}{\appendicestrue\@makeappendixcover\orig@appendix} +\renewcommand*{\endappendices}{} % make the bibliography page +% Modified 8/7/14 to add the bibliography cover page to the TOC and not the actual bibliography page +% This should also work for biblatex even though memoir doesn't check for it +% but we'll worry about that when someone asks... \newcommand*{\makebibliographycover}{% +\ifmsu@hyperloaded + \phantomsection\label{msu@bib}\fi +\settocdepth{chapter} +\addtocontents{toc}{ + \setlength{\cftchapterindent}{0em} + \setlength{\cftbeforechapterskip}{1.0em \@plus\p@} + } +\addcontentsline{toc}{chapter}{BIBLIOGRAPHY} % put the title page in the TOC +\nobibintoc % remove the actual bib first page from the TOC \clearpage -\chapter*{\ } +\chapter*{\ } % this is a hack but it works \vspace{.35\textheight}\begin{center} \bfseries\MakeUppercase{\bibname} -\end{center}} +\end{center} +} % Do some stuff at begin document: check for hyperref % The hyperref code allows hyperref to be used. It is not guaranteed to -% work, and the thesis office presumably doesn't allow hyperlinks. +% work and has been lightly tested % If the thesis office permits them, then I may try to support this more. % Thanks to Florent Chervet for the code. \AtBeginDocument{% \@ifpackageloaded{hyperref}% -{\def\MakeLinkUppercase \hyper@linkstart #1#2#3\hyper@linkend +{\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 + \l@chapapp{\msu@tocfont#1}{#2}{\cftappendixname}}} % Format appendix names (changed 8/7/14) % if no hyperref {\relax}} \endinput
\ No newline at end of file |