GeneralMoving Page Numbers Around

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
Keith Emmert
Posts: 12
Joined: Sat Nov 08, 2008 9:24 pm

Moving Page Numbers Around

Post by Keith Emmert »

Hey,

I'm using my own class file based upon report.

I would like to move the page number of the first bibliopgraphy page to the top right corner instead of the bottom center.

I've used fancyhdr to change the plain pagestyle a bit and define an overall pagestyle. (I frequently use

Code: Select all

\thispagestyle{plain}
to temporarily swap pagestyles. So I don't want to redifine the plain pagestyle.)

Code: Select all

\pagestyle{fancy}
 \renewcommand{\headrulewidth}{0pt}
 \renewcommand{\footrulewidth}{0pt}
 \fancyhf{}
 \fancyhead[R]{\thepage}
\fancypagestyle{plain}{\fancyhead{}\fancyfoot[C]{\thepage}}
I have a few questions.

1. Does the report class specify how LaTeX places bibliography page numbers?
2. Can I change the page numbers of all pages in the bibliography so that they are in the top right corner without destroying the plain pagestyle?

Thanks,

Keith

P.S. I've included the style file I'm working on in the following and the only other package used besides those listed below is ULEM.

Code: Select all

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{MathThesis}

\DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}

\ProcessOptions

\LoadClass[12pt]{report}

\RequirePackage[total={6in, 8.5in}, top=1.5in, left=1.5in, headheight=15pt, headsep=0.3in, footskip=0.5in]{geometry}
\RequirePackage[reqno]{amsmath}
\RequirePackage{amsthm}
\RequirePackage{amsfonts}
\RequirePackage[mathscr]{eucal}
\RequirePackage{setspace}
\RequirePackage{cite}
\RequirePackage{fancyhdr}
\RequirePackage{graphicx}
\RequirePackage{subfigure}
\RequirePackage[subfigure]{tocloft}
\RequirePackage{remreset}



%
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% Modifications of the base class begin here
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%


%
% Definitions for Theorems, Corollaries, etc.
%
\newtheorem{corollary}{Corollary}[section]
\newtheorem{lemma}{Lemma}[section]
\newtheorem{theorem}{Theorem}[section]
\newtheorem{proposition}{Proposition}[section]
\newtheorem{definition}{Definition}[section]


%
% Fix the page layout
%
\pagestyle{fancy}
 \renewcommand{\headrulewidth}{0pt}
 \renewcommand{\footrulewidth}{0pt}
 \fancyhf{}
 \fancyhead[R]{\thepage}
\fancypagestyle{plain}{\fancyhead{}\fancyfoot[C]{\thepage}}

\newenvironment{PlainPages}  % Used to fix the Table of Contents, etc.
{
\pagestyle{plain}%
}
{\relax} 




%
% Fix the naming and numbering schemes
%
\renewcommand{\contentsname}{TABLE OF CONTENTS}
\renewcommand{\listfigurename}{FIGURES}
\renewcommand{\listtablename}{TABLES}
\renewcommand{\bibname}{BIBLIOGRAPHY}
\renewcommand{\figurename}{FIGURE}
\renewcommand{\tablename}{TABLE}
\renewcommand{\chaptername}{CHAPTER}


%
% Table of Contents, Figures, Tables, Equations
%
\setcounter{tocdepth}{1}  % Only display chapter, section, and subsection levels

\renewcommand{\cftsecdotsep}{\cftnodots}  % Disable the dots in the leaders for sections
%\renewcommand{\cftsubsecdotsep}{\cftnodots}  % Disable the dots in the leaders for subsections
\setlength{\cftbeforetoctitleskip}{0.175in}
\setlength{\cftaftertoctitleskip}{0.5\baselineskip}
\renewcommand{\cfttoctitlefont}{\hfill\bfseries}
\renewcommand{\cftaftertoctitle}{\hfill}

\renewcommand{\cftfigdotsep}{\cftnodots} % Disable the dots in the leaders for List of Figures
\setlength{\cftbeforeloftitleskip}{0\baselineskip}
\setlength{\cftafterloftitleskip}{0.5\baselineskip}
\renewcommand{\cftloftitlefont}{\bfseries}
\cftpagenumbersoff{subfigure}        % Don't include subfigures in List of Graphics

\renewcommand{\cfttabdotsep}{\cftnodots} % Disable the dots in the leaders for List of Tables
\setlength{\cftbeforelottitleskip}{0.5\baselineskip}
\setlength{\cftafterlottitleskip}{0.5\baselineskip}
\renewcommand{\cftlottitlefont}{\bfseries}

\renewcommand{\theequation}{\Roman{chapter}.\arabic{equation}}
\@removefromreset{figure}{chapter} % Keeps \thefigure counter from resetting between chapters
\renewcommand{\thefigure}{\arabic{figure}}  % Number things the way the grad school wants
\@removefromreset{table}{chapter} % Keeps \thefigure counter from resetting between chapters
\renewcommand{\thetable}{\Roman{table}}  % Number things the way the grad school wants

\renewcommand{\textfraction}{0.15}
\renewcommand{\topfraction}{0.85}
\renewcommand{\bottomfraction}{0.65}
\renewcommand{\floatpagefraction}{0.60}

\setlength{\@fptop}{0pt} % This is the vertical spacing above the top floatpage float. 
                         % The default is 0pt plus 1.0fil  (fil is infinitely strechable = \vfill
\setlength{\@fpsep}{8pt} % This is the vertical spacing between floatpage floats. 
                         % The default is 8pt plus 2.0fil
\setlength{\@fpbot}{0pt} % This is the vertical spacing below the bottom floatpage float.
                         % The default is 0pt plus 1.0fil





%
% Fix the spacing
%
\doublespacing  % Turn on double spacing


%
% Fix the Chapter Headings
%
\renewcommand\chapter{\if@openright\cleardoublepage\else\clearpage\fi
                    \thispagestyle{plain}%
                    \global\@topnum\z@
                    \@afterindentfalse
                    \secdef\@chapter\@schapter}
\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
                         \refstepcounter{chapter}%
                         \typeout{\@chapapp\space\Roman{chapter}.}%
                         \addcontentsline{toc}{chapter}%  This adds the Chapter and Number as Chapter Heading
                                   {\protect\numberline{CHAPTER \Roman{chapter}}}%
                         \addcontentsline{toc}{section}%  This adds the Chapter Title as Section Heading
                                   {\protect\numberline{#1}}%  % Print the Chapter Title 
                    \else
                      \addcontentsline{toc}{chapter}{#1}%
                    \fi
                    \chaptermark{#1}%
                  %  \addtocontents{lof}{\protect\addvspace{10\p@}}%  This adds a 10pt space between chapters in LOF
                  %  \addtocontents{lot}{\protect\addvspace{10\p@}}%  This adds a 10pt space between chapters in LOT
                    \if@twocolumn
                      \@topnewpage[\@makechapterhead{#2}]%
                    \else
                      \@makechapterhead{#2}%
                      \@afterheading
                    \fi}
\renewcommand{\@makechapterhead}[1]{%
\vspace*{0.1in}%
{%
\ifnum \c@secnumdepth >\m@ne
	\centering\bfseries \@chapapp\space \Roman{chapter}		% Chapter number
	%\par\nobreak
	\vskip 0.75\baselineskip
\fi 
\interlinepenalty\@M
\centering  #1\par	% Chapter title
\nobreak
\vskip 0.75\baselineskip
}}


%
% Fix the Section Headings
%
\renewcommand{\section}{\@startsection
{section}%          							% Then name
{1}%                							% The "section" level
{0mm}%              							% The indentation
{0.75\baselineskip}%   							% The before skip
{0.125\baselineskip}% 							% The after skip
{\bfseries}}%		% The style


\renewcommand{\thesection}{\Roman{chapter}.\arabic{section}\quad }


%
% Fix the Sub-Section Headings
%
\renewcommand{\subsection}{\@startsection
{subsection}%          							% Then name
{2}%                							% The "section" level
{0in}%              							% The indentation
{0in}%   							% The before skip
{0.125\baselineskip}% 							% The after skip
{\bfseries}}%		% The style


\renewcommand{\thesubsection}{\Roman{chapter}.\arabic{section}.\arabic{subsection}\quad }


\renewcommand{\@seccntformat}[1]{\csname the#1\endcsname\kern2mm} % Determine the default numbering of sections, subsections, etc




%
% Fix the Bibliography
%
\renewcommand*{\bibname}{\vspace*{-1.5in}} 



%
% Basic paragraph layout commands
%
\raggedright % < ----- Graduate school wants ragged right margins
\raggedbottom % < ---- Grad school wants this
\parindent 0.5in


\endinput

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Keith Emmert
Posts: 12
Joined: Sat Nov 08, 2008 9:24 pm

Moving Page Numbers Around

Post by Keith Emmert »

Never mind...just being silly.

I just put a band-aid at the bottom of my latex file to redefine the page numbers where I wanted them....

Code: Select all

\fancypagestyle{plain}{\fancyhead[R]{\thepage}\fancyfoot{}}
Keith
senatortcj
Posts: 4
Joined: Sun Mar 01, 2009 6:53 am

Re: Moving Page Numbers Around

Post by senatortcj »

This fix seems to work on every page except for the first page of my bibliography, where it also throws a line at the top of the page. Any idea on how I can keep the page number up there but get rid of the line?
Keith Emmert
Posts: 12
Joined: Sat Nov 08, 2008 9:24 pm

Re: Moving Page Numbers Around

Post by Keith Emmert »

senatortcj:

Not sure what you mean by "throws a line at the top of the page."

Can you post the code you're compiling? (A so called "minimum-working-example")

Keith
Post Reply