diff options
author | Karl Berry <karl@freefriends.org> | 2022-03-04 21:50:58 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-03-04 21:50:58 +0000 |
commit | 454c26c4dfbb6db4a4f172ca916a861f51ee81fc (patch) | |
tree | 975492a535139449682c153b93e563762b5d0304 /Master/texmf-dist/tex/latex/msu-thesis/msu-thesis.cls | |
parent | d3b099a6b6a3fd79df1bfdea379069327fd1d9bf (diff) |
msu-thesis (4mar22)
git-svn-id: svn://tug.org/texlive/trunk@62407 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/msu-thesis/msu-thesis.cls')
-rw-r--r-- | Master/texmf-dist/tex/latex/msu-thesis/msu-thesis.cls | 26 |
1 files changed, 23 insertions, 3 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 8fc9939364c..9d6c314e6f7 100644 --- a/Master/texmf-dist/tex/latex/msu-thesis/msu-thesis.cls +++ b/Master/texmf-dist/tex/latex/msu-thesis/msu-thesis.cls @@ -155,11 +155,13 @@ % Added global chapter counter for proper hyperrefs to appendices % Added a formatting hook for appendix numbering. We'll see how this works in practice. % Added spacing hooks for bibliographies to make users' lives a little easier +% Version 3.0b 2021/07/14 Added msu@hchap counter for hyperref targets in appendices (unreleased) +% Version 3.1 2022/03/03 Added support for List of Algorithms plus fixes for algorithm2e and algorithmicx etc % % Report bugs/problems/questions to <amunn@msu.edu> % -\def\msu@version{3.0} -\def\msu@date{2021/06/10} +\def\msu@version{3.1} +\def\msu@date{2022/03/03} \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 @@ -256,6 +258,8 @@ \newcommand*{\msu@fieldseparator}{\textendash} % this is between the degree name and field of study \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. % make title 2in from top of page @@ -332,6 +336,21 @@ \def\msu@chapfont{\bfseries} \fi +% Support for algorithm packages added v3.1 +% If using the algorithm2e package, you must load it with the algo2e package option +% If you are using algorithmicx or its related versions you should not load +% the algorithm package, but instead load the float package and then style +% your algorithms accordingly using \floatstyle +% Importantly you MUST load float after defining any new lists since it clobbers +% the memoir float methods + + +\newlistof{listofalgorithms}{loa}{List of Algorithms} +\newfloat[chapter]{algorithm}{loa}{Algorithm} +\newlistentry{algorithm}{loa}{0} +\renewcommand*{\cftalgorithmname}{Algorithm\space} +\renewcommand*{\cftalgorithmaftersnum}{\msucaptiondelim} + % % This code technique from http://tex.stackexchange.com/q/232121/ % Makes appendices formatted as sections not chapters in the TOC @@ -663,6 +682,7 @@ \let\msucaptiondelim\@contdelim % Moved to AtBeginDocument to override apacite \@ifpackageloaded{apacite}{\@tocbibfalse}{} % added 6/22/17 +\@ifpackageloaded{algorithm2e}{\let\@chapter=\algocf@original@chapter}{}% undoes algorithm2e redefinition of chapter added v3.1 % 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} @@ -695,7 +715,7 @@ \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) -\apptocmd{\@resets@pp}{\gdef\theHchapter{\Alph{msu@hchap}}}{}{} % get hypertargets in appendices right (added v3.0) +\apptocmd{\@resets@pp}{\gdef\theHchapter{\arabic{msu@hchap}}}{}{} % get hypertargets in appendices right (added v3.0; fixed v3.0b) } % if no hyperref {\relax} |