[Tex/LaTex] Removing page numbers from appendices

appendicesbibliographiespage-numbering

I am trying to remove all page numbers from my Appendices section.
The following fix was suggested: create an 'interlude environment' that suppresses page numbers for its contents. (source: Intervening pages that do not add to page-count?)

This works on the majority of the pages in the appendix section, however, on all pages that contain a Appendix heading, Chapter heading or Bibliography heading the numbers are still present. Presumably this is built into the commands in order to ensure they are include in the TOC, but this is not something I mind about.

\documentclass[11pt]{report}
\usepackage[utf8]{inputenc}

\usepackage[
backend=biber,
style=numeric,
sortlocale=de_DE,
natbib=true,
url=false, 
doi=true,
eprint=false
]{biblatex}
\bibliography{references}
\usepackage[toc,page]{appendix}

%create interlude environment:
\newcounter{mypagecount}% create a new counter
\setcounter{mypagecount}{0}% set it to something just in case
\newenvironment{interlude}{% create a new environment for the unnumbered section(s)
\clearpage
\setcounter{mypagecount}{\value{page}}% use the new counter we created to hold the page count at the start of the unnumbered section
\thispagestyle{empty}% we want this page to be empty (adjust to use a modified page style)
\pagestyle{empty}% use the same style for subsequent pages in the unnumbered section
}{%
\clearpage
\setcounter{page}{\value{mypagecount}}% restore the incremented value to the official tally of pages so the page numbering continues correctly
 }

\begin{document}
body of document

\begin{interlude}

\begin{appendices}
\chapter{Code Name}
\label{codename}
code

\chapter{Name of more code}
more code

\end{appendices}

\pagebreak
\printbibliography
\end{interlude}
\end{document}

A fix is suggested here by Charles Stewart for removing numbers from 'divider pages' (he edits the appendix.sty source) – indeed, using this unnumbers the appendix divider page, but I do not know how to modify this for chapter heading pages too.
https://stackoverflow.com/questions/2631973/no-page-number-for-divider-pages-in-latex

Best Answer

A suggestion, to use \thepage being emptied and a proper page style. I addition, I suspended the page counter, but this not really necessary, in my point of view.

\documentclass[11pt]{report}
\usepackage{appendix}
\usepackage[
backend=biber,
style=numeric,
sortlocale=de_DE,
natbib=true,
url=false, 
doi=true,
eprint=false
]{biblatex}

\usepackage{xassoccnt}

\usepackage{fancyhdr}

\bibliography{references}

\usepackage{blindtext}
\pagestyle{fancy}%
\begin{document}

\tableofcontents

\chapter{Regular chapter}
\blindtext[20] 

\nocite{*}
\SuspendCounters{page}
\renewcommand{\thepage}{}

\begin{appendices}
\chapter{Code Name}
\label{codename}
\blindtext[5] 

\chapter{Name of more code}
\blindtext[10] 

\end{appendices}

\pagebreak
\printbibliography

\end{document}

I used this small references.bib

@book{knuth1986texbook,
  keywords = {book},
  title={The texbook},
  author={Knuth, D.E. and Bibby, D.},
  volume={1993},
  year={1986},
  publisher={Addison-Wesley}
}
@article{knuth1977fast,
  keywords = {article},
  title={Fast pattern matching in strings},
  author={Knuth, D.E. and Morris Jr, J.H. and Pratt, V.R.},
  journal={SIAM journal on computing},
  volume={6},
  number={2},
  pages={323--350},
  year={1977},
  publisher={SIAM}
}