[Tex/LaTex] An elaborate ‘fancy’ header (book design)

book-designbooksfancyhdrheader-footertikz-pgf

I wish to design a book with the following style of header enter image description here

The pages are to be set on A4paper with a margin of about 1 inch. I am currently using the code

     \usepackage[margin=1in]{geometry}

for margins, but I'm unsure as to whether there is a more effective option available. To achive the bullet between 'Chapter 1' and 'A chapter' I am planning on using the code

     \tikzcircle[fill=...]{3pt}

(the dots to represent the light blue colour shown in the mock-up picture).
The document class will obviously be book with 12pt font, which I have chosen to be mathptmx. However, as someone who is only a beginner on Latex, I was wondering if anyone could provide a code which produces headers as shown in the mock-up. Fancyhdr seems to be the way forward and is the most versatile tool, but the fading circles seem to be the most difficult to replicate (I've had no success at recreating these so far). If anyone could help recreate the image I'd be very grateful.

Best Answer

Here is something to start with:

\documentclass[12pt]{book}
\usepackage{tikz}
\usepackage[a4paper, margin=4cm, headheight=23pt]{geometry}
\usepackage{lipsum}
\usepackage{fancyhdr}
\pagestyle{fancy}
\newcommand{\X}{\phantom{X}} % Filler to define baseline of empty circles
\fancyhf{}
\DeclareRobustCommand{\bul}{\begin{tikzpicture}[baseline={(current bounding box.south)}]
\fill [blue!40,anchor=base,baseline] circle (1mm);
\end{tikzpicture}}
\renewcommand{\chaptermark}[1]{\markboth{Chapter \thechapter~%
\bul~#1}{}}
\renewcommand{\sectionmark}[1]{\markright{Section \thesection~%
\bul~#1}{}}
\renewcommand\headrulewidth{0pt}
\fancyhead[LO]{\leftmark}
\fancyhead[RE]{\rightmark}
\fancyhead[RO]
{\begin{tikzpicture}[baseline, every node/.style={minimum size=8mm, anchor=base}]
\path node at (0,0) [shape=circle, fill=blue!20] (0,0) {\X} 
node at (1,0) [shape=circle, fill=blue!40] (0,0) {\X} 
node at (2,0) [shape=circle, fill=blue!60] (0,0) {\thepage}; 
\end{tikzpicture}}
\fancyhead[LE]
{\begin{tikzpicture}[baseline, every node/.style={minimum size=8mm, anchor=base}]
\path node at (0,0) [shape=circle, fill=blue!60] (0,0) {\thepage} 
node at (1,0) [shape=circle, fill=blue!40] (0,0) {\X} 
node at (2,0) [shape=circle, fill=blue!20] (0,0) {\X};
\end{tikzpicture}}

\begin{document}
\chapter{Test Chapter}
\lipsum[1]
\section{Test Section}    
\lipsum[1-15]
\newpage    
\section{Test Section 2}    
\lipsum[1-15]
\end{document}
Related Question