[texhax] page style problem
Theodore Walls
walls at uri.edu
Fri Mar 17 23:39:18 CET 2006
My current draft used the below cls file with problems for a pending NIH
submission. In order to send it to a different destination, I need top
right pagination and would prefer some bottom footers. If I use
\pagestyle{fancy}, pagination is bottom center. I have put top right
pagination in \rhead successfully, but I cannot undo the bottom center
pagination. If I switch to \pagestyle{headings}, I get top right
pagination, but loose my footers and get a few other conflicts (the top
header picks up a section head from a section where I used to renewcommand
to control the title of my references).
Does anyone know of a more flexible pagestyle option or a way of tricking
LaTex out of putting a bottom center page number in?
% vim:tabstop=4 expandtab syntax=tex:
% This is nih.cls by Alan Shields, May 2003
% email: Alan-Shields2omrf.ouhsc.edu
% Heavily based upon (read: copied almost exactly from)
% nih.sty by Bruce R. Donald and Matthew L. Fidler
%
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{nih}[2003/05/08 NIH PHS 398 as of January 2003]
% includes needed for preliminary code
\RequirePackage{ifthen}
% Preliminary code
\newcommand{\nih at kk}{~}
\newboolean{nih at blank}
\setboolean{nih at blank}{false}% not strictly necessary, but let's be clear
about it
%Options
\DeclareOption{12pt}{\AtEndOfClass{\RequirePackage{times}}}
\DeclareOption{11pt}{\AtEndOfClass{\RequirePackage{helvet}\renewcommand{\fam
ilydefault}{\sfdefault}}}
\DeclareOption{nihblank}{\setboolean{nih at blank}{true}}
\DeclareOption{kk}{\renewcommand{\nih at kk}{\small KK}}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ProcessOptions\relax
% The class we're overwriting
\LoadClassWithOptions{article}
% Begin Requirements
\RequirePackage{fullpage}
\RequirePackage{fancyhdr}
\RequirePackage{amsmath}
%%%% More code
% preamble stuff
\newcommand{\nih at PIname}{Vestigator, Paul I.}
\newcommand{\piname}[1]{\renewcommand{\nih at PIname}{#1}}
% constants
\newcommand{\nih at sillysize}{\scriptsize}
% set the page style
\pagestyle{fancy}
\chead{\fancyplain{}{%
\ifthenelse{\boolean{nih at blank}}%
{}% fi
{%
{{\sf\scriptsize Principal Investigator/Program Director%
(Last, First, middle):}}%
}% esle
}
}
\rhead{}
\rhead{\ifthenelse{\boolean{nih at blank}}%
{\thepage}% fi
{\sf\footnotesize{Page}}% esle
\ {\ \ \ {\sf\thepage}\ \ \ }%
}
\lhead{\fancyplain{}{\nih at kk}}
\lfoot{\fancyplain{}{%
\ifthenelse{\boolean{nih at blank}}%
{}% fi
{\sf\footnotesize Mentored Research Scholar Grant\\}% esle
}
}
\rfoot{\fancyplain{}%
{\sf\footnotesize{American Cancer Society - January 2006}}%
}
% page dimensions (note: assumes 8.5x11)
\setlength{\oddsidemargin}{31pt}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0.75pt}
\setlength{\textwidth}{8.5in}
\addtolength{\textheight}{0in} % 0.5in margins on both sides
\addtolength{\textwidth}{-1.1in}
\setlength{\oddsidemargin}{-1in}
\addtolength{\oddsidemargin}{0.505in}
\setlength{\evensidemargin}{\oddsidemargin}
\addtolength{\textheight}{1.0in}
\addtolength{\topmargin}{-0.2in}
\renewcommand{\baselinestretch}{.9}
\headwidth=\textwidth
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/texhax/attachments/20060317/b161c30a/attachment.htm
More information about the texhax
mailing list