Merged Evan Sultanik's December 2009 multiple-advisor drexelthesis.cls.
authorW. Trevor King <wking@drexel.edu>
Tue, 12 Jan 2010 14:38:13 +0000 (09:38 -0500)
committerW. Trevor King <wking@drexel.edu>
Tue, 12 Jan 2010 14:59:16 +0000 (09:59 -0500)
commit12ee6441cd6cc9df8822760fc49d2626470b6fcf
tree26462e2a3c649fc9cbc31cae1c1801ce1aa52aa7
parenta8eec48c3d050f7783e7065743610ea9c49e00bc
Merged Evan Sultanik's December 2009 multiple-advisor drexelthesis.cls.

Changes vs. Evan's implementation
  * use \expandafter to avoid involving \@mainaux
  * use already-defined \alph{} rather roll-your-own \@alphabet
  * many advisors case printed "A, B, and C" rather than "A, B and C".

Unrelated changes
  * \@advisor -> \@degree typo fix.
  * \@sect and \@ssect pseudocode now in |example| environment.
  * natbib's unsrt analog is unsrtnat, not plainnat.

Finally, I packaged the whole thing into \@advisor, so the compositing
logic can be used in multiple places

Evan's original patch was:

--- drexelthesis.cls-old
+++ drexelthesis.cls
@@ -1,5 +1,6 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % Drexel University Thesis LaTeX2e Class definition.
+% Modified by Evan Sultanik  December 2009
 % Modified by Jeff Abrahamson    May 2007
 % Modified by Evan Sultanik      April 2006
 % Modified by Jeff Abrahamson    May 2005
@@ -462,14 +463,16 @@
 \newcommand{\department}[1]{\ifx\empty#1\else\gdef\@department{#1}\fi}
 \newcommand{\degree}[1]{\ifx\empty#1\else\gdef\@degree{#1}\fi}
 \renewcommand{\author}[1]{\ifx\empty#1\else\gdef\@author{#1}\fi}
-\newcommand{\advisor}[1]{\ifx\empty#1\else\gdef\@advisor{#1}\fi}
+\newcommand{\advisor}[1]{\ifx\empty#1\else\refstepcounter{numadvisors}\immediate\write\@mainaux
+      {\string\gdef\string\@advisor\alph{numadvisors}{#1}}\fi}
 \renewcommand{\title}[1]{\ifx\empty#1\else\gdef\@title{#1}\fi}
 \newcommand{\gyear}[1]{\ifx\empty#1\else\gdef\@gyear{#1}\fi}

 \global\def\@department{\mbox{}}
 \global\def\@degree{\mbox{}}
 \global\def\@author{\mbox{}}
-\global\def\@advisor{\mbox{}}
+\newcounter{numadvisors}
+\setcounter{numadvisors}{0}
 \global\def\@title{\mbox{}}
 \global\def\@gyear{\number\year} % Default year is current year

@@ -655,6 +658,7 @@
   {\@latex@warning{Empty `thebibliography' environment}}%
   \endlist \clearpage}

+\def\@alphabet#1{\ifcase#1a\or a\or b\or c\or d\or e\or f\or g\else h\fi}
 \renewenvironment{abstract}{
   \clearemptydoublepage
   \phantomsection
@@ -665,7 +669,17 @@
       \vspace*{-1em}
       {\@title}\\[3mm]
       {\@author}\\
-      {\smallskip Advisor: \@advisor}\\
+      {\smallskip Advisor\ifnum\thenumadvisors>1 s\fi:
+        \begingroup
+          \newcount\adv
+          \adv=0
+          \loop
+            \ifnum\adv<\thenumadvisors
+              \advance\adv by 1
+              \ifnum\thenumadvisors>1\ifnum\adv=\thenumadvisors{\ and\ }\else\ifnum\adv>1{,\ }\fi\fi\fi
+              \csname @advisor\@alphabet{\the\adv}\endcsname\relax
+          \repeat
+        \endgroup}\\
       \vspace*{4em}
     }
   \end{singlespace}
drexel-thesis.dtx