If I color the page number with the packages fancyhdr
and xcolor
, I get the page number out of the space defined as "footskip" in the geometry
package.
I am enclosing a MWE where you can see that if the page number is colored with \color{customcolor}
, it gets misplaced (it is below the line drawn by geometry
):
\documentclass{book}
\usepackage{fancyhdr}
\usepackage{geometry}
\usepackage{xcolor}
\geometry{bottom=30pt,includeheadfoot, showframe}
\definecolor{customcolor}{RGB}{112,112,112}
\fancypagestyle{plain}{
\fancyhf{}
\fancyfoot[CO]{\color{customcolor}\thepage}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}}
\begin{document}
\pagestyle{plain}
Hello!
\end{document}
How can I avoid it?
(I am compiling this on LuaTeX)
\fancyfoot[CO]{\textcolor{customcolor}{\thepage}}
.fancyhdr
after loading/setting yourgeometry
. Seegeometry
,fancyhdr
:\fancyfoot[C]{\thepage}
is not really centered\color{.}
and\textcolor{.}
? By the way, would you write your comment as an answer so that I can mark it as correct?titleps
that I'll add.