0

I'm using fncychap Glenn option. My problem is that in the other pages when there is a header and footer i can change the color of the page number by using this code:

\usepackage[Glenn]{fncychap}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[LE,RO]{\color{myblue}Header}
\fancyhead[RE,LO]{}
\fancyfoot[CE,CO]{\color{myblue} \leftmark}
\fancyfoot[LE,RO]{\color{myblue} \thepage}

but in the pages where there is the chap title the page number is in the default style. So how can i change the color of page number if there is no header and footer in the page.

3
  • 1
    Welcome to TeX.SE. Please help us help you by adding a full MWE, see tex.meta.stackexchange.com/questions/1436/welcome-to-tex-sx. Commented Jul 6, 2019 at 21:52
  • Welcome, this is about header-footers, and has nothing to do with fncychap. Please correct the tags when you add an MWE to help us see how the headers and footers are produced in your document.
    – Johannes_B
    Commented Jul 7, 2019 at 5:24
  • Hello johannes, thank you for your reply i edit my post can you see it again please to know what i mean Commented Jul 7, 2019 at 7:51

1 Answer 1

1

The chapter pages are using a different page style called plain, which can be adjusted separately to include color:

\documentclass{book}

\usepackage{fancyhdr}
\usepackage{xcolor}
\usepackage[Glenn]{fncychap}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[LE,RO]{\color{blue}Header}
\fancyhead[RE,LO]{}
\fancyfoot[CE,CO]{\color{blue} \leftmark}
\fancyfoot[LE,RO]{\color{blue} \thepage}

\fancypagestyle{plain}{%
  \renewcommand{\headrulewidth}{0pt}%
  \fancyhf{}%
  \fancyfoot[C]{\color{blue} \thepage}%
}

\usepackage{lipsum}

\begin{document}
\chapter{title}

\lipsum
\end{document}
1
  • Thank you it's working!!! Commented Jul 7, 2019 at 8:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .