From: W. Trevor King Date: Tue, 12 Jan 2010 17:07:37 +0000 (-0500) Subject: Oops, _now_ I've fixed the page numbering. X-Git-Tag: 0.3~9 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c0649e9e8778aad83f79dae66a2713309d569866;p=drexel-thesis.git Oops, _now_ I've fixed the page numbering. Previous "solution" only changed "fancy" style. The new solution looks like my original format, with head<->foot. Also add \schaptermark so multipage chapter*s will have proper marking. --- diff --git a/drexel-thesis.dtx b/drexel-thesis.dtx index 479e6d3..b3d470d 100644 --- a/drexel-thesis.dtx +++ b/drexel-thesis.dtx @@ -823,21 +823,39 @@ % \begin{macrocode} \RequirePackage{fancyhdr} % \end{macrocode} -% Setup the standard |fancy| format. |\leftmark| is the higher level -% mark, see |\chaptermark| below. |\rightmark| is the lower level -% mark, see |\sectionmark| below. +% Setup the standard |fancy| format. % \begin{macrocode} \pagestyle{fancy} \fancyhf{} -\fancyhead[LE,RO]{\slshape\rightmark} -\fancyhead[LO,RE]{\thepage} +\renewcommand{\headrulewidth}{0pt} % \end{macrocode} -% Override the |plain| format (for chapter pages, etc.). +% 0.4 pt is \pkg{fancyhdr}'s default |\headrulewidth|, so we'll +% recycle the value. +% \begin{macrocode} +\renewcommand{\footrulewidth}{0.4pt} +% \end{macrocode} +% |\leftmark| is the higher level mark, see |\chaptermark| below. +% |\rightmark| is the lower level mark, see |\sectionmark| below. +% We put the lower level mark to the outside because it changes more +% often. Page numbers also go on the outside. +% \begin{macrocode} +\fancyfoot[RE,LO]{\slshape\leftmark} +\fancyfoot[LE,RO]{\slshape\rightmark} +\fancyhead[LE,RO]{\thepage} +% \end{macrocode} +% Override the |plain| format (for part pages, etc.). % \begin{macrocode} \fancypagestyle{plain}{ \fancyhf{} - \renewcommand{\headrulewidth}{0pt} - \fancyfoot[LE,RO]{\thepage} + \renewcommand{\footrulewidth}{0pt} + \fancyhead[LE,RO]{\thepage} +} +% \end{macrocode} +% Keep the |empty| format at its default. +% \begin{macrocode} +\fancypagestyle{empty}{ + \fancyhf{} + \renewcommand{\footrulewidth}{0pt} } % \end{macrocode} % @@ -1515,7 +1533,14 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}{\chaptermark} +% \begin{macro}{\schaptermark} +% Setup unnumbered chapter marks for \pkg{fancyhdr}. +% \begin{macrocode} +\newcommand\schaptermark[1]{\markboth{\MakeUppercase{#1}}{}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\sectionmark} % Setup space rather than period separated section marks. % (\file{classes.dtx}, L2054) % \begin{macrocode} @@ -1830,12 +1855,14 @@ % \end{macro} % % \begin{macro}{\@schapter} -% We don't have to worry about |\@schapter|, since it is very simple. -% In onecolumn mode it's just +% This macro is called when we have an unnumbered chapter. We drop +% \file{classes.dtx}'s \Lopt{twocolumn} code and set marks for +% \pkg{fancyhdr}. % (\file{classes.dtx}, L2582). % \begin{macrocode} -%\def\@schapter#1{\@makeschapterhead{#1}% -% \@afterheading} +\def\@schapter#1{\schaptermark{#1}% + \@makeschapterhead{#1}% + \@afterheading} % \end{macrocode} % \end{macro} %