From 4efeb5d9a59b329fd122a2b40cc7f1bee5374323 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 5 Jan 2014 22:58:13 +0000 Subject: ryethesis (5jan14) git-svn-id: svn://tug.org/texlive/trunk@32584 c570f23f-e606-0410-a88d-b1316a301751 --- .../source/latex/ryethesis/ryethesis.dtx | 49 +++++++++++++++++----- 1 file changed, 38 insertions(+), 11 deletions(-) (limited to 'Master/texmf-dist/source/latex/ryethesis') diff --git a/Master/texmf-dist/source/latex/ryethesis/ryethesis.dtx b/Master/texmf-dist/source/latex/ryethesis/ryethesis.dtx index 84c6c60c61c..decf6247905 100644 --- a/Master/texmf-dist/source/latex/ryethesis/ryethesis.dtx +++ b/Master/texmf-dist/source/latex/ryethesis/ryethesis.dtx @@ -39,7 +39,7 @@ % % \fi % -% \CheckSum{845} +% \CheckSum{893} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -67,6 +67,12 @@ % problems for users with List of Appendices. Fixed \\cleardoublepage % for two-sided mode to insert empty page. Fixed draft mode to be % one-sided. } +% \changes{v1.31}{2010/08/08}{Fixed small issues.} +% \changes{v1.32}{2010/09/09}{Added 'review' option for producing +% near-final version for examiners.} +% \changes{v1.33}{2010/09/14}{Added front matter to TOC} +% \changes{v1.34}{2014/01/04}{Replaced \\AtBeginDocument with etoolbox +% package and \\AfterEndPreamble. Thanks to A. Penniston.} % % \GetFileInfo{ryethesis.dtx} % @@ -264,7 +270,8 @@ % Class options to control what appears in the document -% Draft is equivalent to the book class sense of draft. +% Draft is equivalent to the book class sense of draft (figures +% replaced with placeholders \DeclareOption{draft}{ \typeout{Ryerson-Thesis Class Option: `draft'} \ExecuteOptions{10pt,oneside} @@ -272,6 +279,15 @@ \setboolean{@ryedraft}{true} } +% Review option is for producing a single-sided review copy for +% examiners. +\DeclareOption{review}{ + \typeout{Ryerson-Thesis Class Option: `review'} + \ExecuteOptions{10pt,oneside} + \PassOptionsToClass{final,oneside}{book} + \setboolean{@ryedraft}{false} +} + % Final is the opposite of draft. This is the default mode. \DeclareOption{final}{ \typeout{Ryerson-Thesis Class Option: `final'} @@ -451,7 +467,7 @@ \pagenumbering{roman} \pagestyle{plain} \maketitle - \ryethesis@insertdeclaration + \ryethesis@insertdeclaration \ryethesis@insertabstract \ryethesis@insertacknowledgements \ryethesis@insertdedication @@ -691,7 +707,9 @@ \newcommand{\ryethesis@insertdeclaration}{% \ifthenelse{\boolean{@ryedraft}} {} -{\ryethesis@clearpage\declaration} +{ +\ryethesis@clearpage\phantomsection\label{declaration}\addcontentsline{toc}{section}{\textit{\mdseries{}Declaration}}\declaration +} } % \end{macrocode} % \end{macro} @@ -704,6 +722,7 @@ \newcommand{\abstract}[1]{\ifx\empty#1\else\gdef\ryethesis@theabstract{\begin{center}\section*{Abstract}\end{center}#1}\fi} \newcommand{\ryethesis@insertabstract}{% \ryethesis@clearpage +\phantomsection\label{abstract}\addcontentsline{toc}{section}{\textit{\mdseries{}Abstract}} % A UMI/ProQuest compatible abstract \begin{spacing}{2} \begin{center} @@ -736,6 +755,7 @@ Ryerson University{\ifx\empty\ryethesis@partnerUniv\else{ and \newcommand{\ryethesis@insertacknowledgements}{% \ifx\empty\ryethesis@theacknowledgements\else{ \ryethesis@clearpage +\phantomsection\label{acknowledgements}\addcontentsline{toc}{section}{\textit{\mdseries{}Acknowledgements}} \begin{center} \section*{Acknowledgements} \end{center} @@ -748,6 +768,7 @@ Ryerson University{\ifx\empty\ryethesis@partnerUniv\else{ and \newcommand{\ryethesis@insertdedication}{% \ifx\empty\ryethesis@thededication\else{ \ryethesis@clearpage +\phantomsection\label{dedication}\addcontentsline{toc}{section}{\textit{\mdseries{}Dedication}} \begin{center} \section*{Dedication} \end{center} @@ -821,25 +842,29 @@ Ryerson University{\ifx\empty\ryethesis@partnerUniv\else{ and } \newcommand{\ryethesis@insertlot}{ -\ifthenelse{\boolean{@ryelistoftables}}{\ryethesis@clearpage\listoftables}{} +\ifthenelse{\boolean{@ryelistoftables}}{\ryethesis@clearpage\phantomsection\label{listoftab}\addcontentsline{toc}{section}{\textit{\mdseries{}List + of Tables}}\listoftables}{} } \ifthenelse{\boolean{@ryelistofplates}} {\RequirePackage{float}\newfloat{plate}{h}{lop}}{} \newcommand{\ryethesis@insertlop}{ -\ifthenelse{\boolean{@ryelistofplates}}{\ryethesis@clearpage\listof{plate}{List of Plates}}{} +\ifthenelse{\boolean{@ryelistofplates}}{\ryethesis@clearpage\phantomsection\label{listofplates}\addcontentsline{toc}{section}{\textit{\mdseries{}List + of Plates}}\listof{plate}{List of Plates}}{} } \newcommand{\ryethesis@insertlof}{ -\ifthenelse{\boolean{@ryelistoftables}}{\ryethesis@clearpage\listoffigures}{} +\ifthenelse{\boolean{@ryelistoftables}}{\ryethesis@clearpage\phantomsection\label{listoffig}\addcontentsline{toc}{section}{\textit{\mdseries{}List + of Figures}}\listoffigures}{} } \ifthenelse{\boolean{@ryelistofillustrations}} {\RequirePackage{float}\newfloat{illustration}{h}{loi}}{} \newcommand{\ryethesis@insertloi}{ -\ifthenelse{\boolean{@ryelistofillustrations}}{\ryethesis@clearpage\listof{illustration}{List of Illustrations}}{} +\ifthenelse{\boolean{@ryelistofillustrations}}{\ryethesis@clearpage\phantomsection\label{listofillustrations}\addcontentsline{toc}{section}{\textit{\mdseries{}List + of Illustrations}}\listof{illustration}{List of Illustrations}}{} } \ifthenelse{\boolean{@ryelistofappendices}} @@ -850,7 +875,8 @@ Ryerson University{\ifx\empty\ryethesis@partnerUniv\else{ and {} \newcommand{\ryethesis@insertloa}{% -\ifthenelse{\boolean{@ryelistofappendices}}{\ryethesis@clearpage\listofappendices}{} +\ifthenelse{\boolean{@ryelistofappendices}}{\ryethesis@clearpage\phantomsection\label{listofapp}\addcontentsline{toc}{section} + {\textit{\mdseries{}List of Appendices}}\listofappendices}{} } \renewcommand{\appendix}[1]{\ifx\empty#1\else\gdef\ryethesis@theappendices{#1}\fi} @@ -859,7 +885,6 @@ Ryerson University{\ifx\empty\ryethesis@partnerUniv\else{ and % If a list of appendices is requested, redirect the toc entries into a different file \ifx\empty\ryethesis@theappendices\else{ \ryethesis@clearpage -\renewcommand{\thechapter}{\Alph{chapter}} \renewcommand{\chaptername}{Appendix} \setcounter{chapter}{0} \ryethesis@theappendices @@ -985,7 +1010,9 @@ Ryerson University{\ifx\empty\ryethesis@partnerUniv\else{ and % The |\AtBeginDocument| and |\AtEndDocument| are used to insert the front, main, and back matter in the correct place for the user. This tightly controls the order of appearance of each type of content. % \begin{macrocode} % Insert front matter & mainmatter settings before user's material -\AtBeginDocument{ +% Fix for use of color package +\RequirePackage{etoolbox} +\AfterEndPreamble{ \frontmatter\mainmatter } % Insert back matter at the end -- cgit v1.2.3