[texhax] tip: doc-class RefMan centered page numbers

Ron RJF Fehd ron.fehd.macro.maven at gmail.com
Fri Jun 24 16:31:48 CEST 2016


I use the Reference Manual classes
refart and refman
for writing papers for
{SAS} software user groups.

This example shows how to
center the page number for the footer
and move the left header to the left margin.


\documentclass[onside]{refart}
\title{Reference Manual class, refart\\
demo of centered pagination}
\author{R.J. Fehd}
\newcommand\HeaderL{header left}%
\newcommand\HeaderR{header right}%
\newcommand\sometext{\par This is text in a paragraph.
This is text in a paragraph.
This is text in a paragraph.
This is text in a paragraph.\par}
\usepackage{fancyhdr}\pagestyle{fancy}
\lhead{\HeaderL}
\rhead{\HeaderR}
\chead{\thepage}
\cfoot{\thepage}
\begin{document}
%\maketitle
%\newpage
\section{default}
\sometext
\begin{maxipage}
\HeaderL\hfill\thepage\hfill\HeaderR
\sometext
\end{maxipage}
\vfill
\begin{maxipage}
\sometext
\HeaderL\hfill\thepage\hfill\HeaderR
\end{maxipage}
\newpage
\lhead{\hspace{-\leftmarginwidth}\HeaderL}
\cfoot{\hspace{-\leftmarginwidth}\thepage}
\begin{maxipage}
\HeaderL\hfill\thepage\hfill\HeaderR
\sometext
\end{maxipage}
\section{centered on page}
\sometext
\vfill
\begin{maxipage}
\HeaderL\hfill\thepage\hfill\HeaderR
\end{maxipage}
\end{document}

Ron Fehd  Atlanta GA
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texhax/attachments/20160624/2c274941/attachment.html>


More information about the texhax mailing list