diff --git a/lectures/lecturecombined.cls b/lectures/lecturecombined.cls index 903319e..8f092c1 100644 --- a/lectures/lecturecombined.cls +++ b/lectures/lecturecombined.cls @@ -1,4 +1,4 @@ -\def\filedate{21 June 2012} +\def\filedate{21 July 2020} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Document class for lecture combined document. @@ -10,12 +10,13 @@ % v1.0.1 Changed package loading order to ensure that hyperref is last. % v1.1 Added nochapters option. % v1.2 Added support for configurable class types. +% v1.3 Replaced deprecated fancyhdr macros. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \NeedsTeXFormat{LaTeX2e}[2001/06/01] \ProvidesClass{lecturecombined}% - [2014/07/06 INFO lecture combined document style, v.1.2] + [2020/07/21 INFO lecture combined document style, v.1.3] % "Stream of conciousness" chapters vs. explicit individual classes. NOTE: @@ -69,16 +70,19 @@ % Set up fancy headings. -\lhead{} -\chead{\Huge\sffamily\bfseries \PaperCode, \PaperTitle, \TeachingPeriod\ \YearOffered} -\rhead{} +\fancyhf{} +\fancyhead[C]{\Huge\sffamily\bfseries \PaperCode, \PaperTitle, \TeachingPeriod\ \YearOffered} -\lfoot{\large\sffamily\bfseries \ClassType\ \thechapter: \ShortClassTitle} -\rfoot{\large\sffamily\bfseries\thepage} +\fancyfoot[L]{\large\sffamily\bfseries \ClassType\ \thechapter: \ShortClassTitle} +\fancyfoot[R]{\large\sffamily\bfseries\thepage} \renewcommand{\footrulewidth}{0mm} \renewcommand{\headrulewidth}{0mm} +% Ensure first page footer is correctly positioned. +% (see https://tex.stackexchange.com/a/442558) +\setlength{\headheight}{30pt} + \pagestyle{fancy}