3

This question is building from the solution that was meticulously crafted by Ronny that can be found here.

I wanted to remove the header and footer from just the first page of the chapter but keep the chapter thumb untouched also on the fist page of the chapter:enter image description here

Here is Ronny's code:

\documentclass{book}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{lipsum}
\usepackage{xcolor,etoolbox,fancyhdr}
\patchcmd{\chapter}{\thispagestyle{plain}}{\thispagestyle{fancy}}{}{}
\usepackage{fourier}
\usepackage{titlesec}
\definecolor{lightblue}{RGB}{199,232,250}
\definecolor{darkblue}{RGB}{59,134,215}
\usetikzlibrary{calc}
% Define just chapter start pages
\pagestyle{fancy}
\fancyhf[LE]{Author's Name}\fancyhead[LE,RO]{}
\fancyhead[LO]{%\textcolor{mybluei} \rightmark%
\begin{tikzpicture}[overlay,remember picture]
    % Box
    \draw[fill=lightblue,draw=none] ($(current page.north east) - (1cm,0)$) -- (current page.north east) -- (current page.south east) -- ++ (-1cm,0) -- cycle;
    % Chapter Number
    \node[scale=3,darkblue] at ($(current page.north east) + (-1cm,-4cm)$)  {\thechapter};
    % Chapter
    \node[rotate=90, anchor=east] at ($(current page.north east) + (-.5cm,-4cm)$) {\leftmark{}};
    % Circle for page number
    \draw[fill=darkblue,draw=none] ($(current page.south east) + (-1cm,3cm)$) circle (3mm);
    % Page number
    \node at ($(current page.south east) + (-1cm,3cm)$)  {\textcolor{white}\thepage};
  \end{tikzpicture}}
\fancyhead[RE]{
\begin{tikzpicture}[overlay,remember picture]
    \draw[fill=lightblue,draw=none] ($(current page.north west) + (1cm,0)$) -- (current page.north west) -- (current page.south west) -- ++ (1cm,0) -- cycle;
    \node[rotate=90,anchor=east] at ($(current page.north west) + (.5cm,-4cm)$) {\rightmark};
    \node[scale=3,darkblue] at ($(current page.north west) + (1cm,-4cm)$) {\thechapter};
    \draw[fill=darkblue,draw=none] ($(current page.south west) + (1cm,3cm)$) circle (3mm);
    \node at ($(current page.south west) + (1cm,3cm)$)  {\textcolor{white}\thepage};
  \end{tikzpicture}}

\renewcommand{\chaptermark}[1]{%
\markboth{#1}{}}
\begin{document}
\chapter{My first Chapter: Problems}
\section{Problem 1}
\subsection{Problem 1}
\lipsum[1]
\subsection{Solution 1}
\lipsum[1-7]
\newpage
\section{Problem 2}
\subsection{Problem 2}
\lipsum[1]
\subsection{Solution 2}
\lipsum[1-4]

\chapter{A second Chapter Title}
\section{Problem 1}
\subsection{Problem 1}
\lipsum[1]
\newpage
\subsection{Solution 1}
\lipsum[1]
\newpage
\section{Problem 2}
\subsection{Problem 2}
\lipsum[1]
\subsection{Solution 2}
\lipsum[1]

\end{document}
1
  • Can you please edit something in your question? I clicked to downvote instead upvote by mistake (my mouse went off battery and started pointing like crazy) and now and can't upvote back unless the Q is edited. Tx.
    – alwaysask
    Commented Jul 9, 2016 at 16:49

1 Answer 1

4

You can define a custom page style and use that for the first page of the chapter:

\fancypagestyle{myfancy}{%
    \renewcommand*\headrulewidth{0pt}
    \fancyfoot[c]{}
    }
\patchcmd{\chapter}{\thispagestyle{plain}}{\thispagestyle{myfancy}}{}{}

Result:

enter image description here

You must log in to answer this question.

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