# latex - fancyfoot - page count in box - colour not shown

I'm using the following from here: http://www-ra.phys.utas.edu.au/~jstevens/code_thesis_style.html

There are also image attachments which show exactly what the following extract of code achieves.

However, the only thing that does not show up as in the pictures in the link, is that the box is not grayed. Any ideas why?

Cheers!

%% page nums on the bottom in a nice box
%% even side pages
\fancyfoot[LE]{\psboxit{box 0.8 setgray fill}
{\framebox[10mm][c]{\rule{0cm}{4mm}\color{black}{\bfseries \thepage}}}}
%% odd side pages
\fancyfoot[RO]{\psboxit{box 1 setgray fill}
{\hspace{\textwidth}\psboxit{box 0.8 setgray fill}
{\framebox[10mm][c]{\rule{0cm}{4mm}\color{black}{\bfseries \thepage}}}}}

%% make the bottom line above the page number box
\renewcommand{\footrulewidth}{0.4pt}
\renewcommand{\footruleskip}{0mm}

%% bring the style into effect
%% (must come after all the fancyhead and fancyfoot stuff)
\pagestyle{fancy}

% now redefine the plain style pages (chapter pages, contents pages)
%% to have the same page number stuff on the bottom
\fancypagestyle{plain}{
\fancyhf{}
\fancyfoot[RO]{\psboxit{box 1 setgray fill}
{\hspace{\textwidth}\psboxit{box 0.8 setgray fill}
{\framebox[10mm][c]{\rule{0cm}{4mm}\color{black}{\bfseries \thepage}}}}}

\fancyfoot[LE]{\psboxit{box 0.8 setgray fill}
{\framebox[10mm][c]{\rule{0cm}{4mm}\color{black}{\bfseries \thepage}}}}

\renewcommand{\footrulewidth}{0.5pt}
}

-
Make sure you compile with latex and dvips, because \psboxit will be ignored by pdflatex. Failing that, please post a minimal example, i.e. a short standalone code that reproduces the problem. –  Ian Thompson Jun 17 '11 at 1:11
I'm unable to compile to dvips, because the majority of my figures are in pdf format and dvips requires eps-formatted figures but thanks for helping ;-) –  kkudi Jun 17 '11 at 12:55

If you don't mind not using the psboxit package, you can achieve the same effect replacing the code snippet you posted with the code between %start and %end in the following example:

\documentclass{book}
\usepackage{fancyhdr}
\usepackage{xcolor}
\usepackage{lipsum} % just to generate some text

%start
\newcommand\PageBox{%
\raisebox{0.5pt}{\fcolorbox{black}{gray!60}{%
\parbox[b][4mm]{10mm}{\hfil\bfseries\thepage\hfil}}}}

\fancyfoot[LE]{\PageBox}
\fancyfoot[RO]{\PageBox}
\renewcommand{\footrulewidth}{0.4pt}
\renewcommand{\footruleskip}{0mm}

\fancypagestyle{plain}{
\fancyhf{}
\fancyfoot[LE]{\PageBox}
\fancyfoot[RO]{\PageBox}
\renewcommand{\footrulewidth}{0.4pt}
}

\pagestyle{fancy}
%end

\begin{document}
\chapter{Test chapter}
\lipsum[1-40]
\end{document}


Make sure to load the xcolor package in your actual document.

-
this worked like a charm! thank you so much! :-) –  kkudi Jun 17 '11 at 12:54