The following MWE is a skeleton of the formatting I am using for the chapters, sections and appendices in my book.
\documentclass[a4paper]{book}
\usepackage{emptypage}
\usepackage[tmargin=2in, bmargin=2in, lmargin=1.5in, rmargin=1.5in]{geometry}
\usepackage[inline]{enumitem}
\usepackage{lipsum}
\usepackage{xcolor}
\usepackage[toc, page]{appendix}
\let\plainappendixpage\appendixpage
\makeatletter
\renewcommand{\appendixpage}{%
\begingroup
\let\ps@plain\ps@empty
\plainappendixpage
\endgroup}
\makeatother
%====================================================================================================
% Chapter title format
%
\setcounter{secnumdepth}{3}
\usepackage{titlesec}
\definecolor{gray75}{gray}{0.75}
\newcommand{\hsp}{\hspace{20pt}}
\titleformat{\chapter}[hang]{\filleft\Huge\bfseries}{\thechapter\hsp\textcolor{gray75}{$\mid$}\hsp}{0pt}{\Huge\bfseries}
\titlespacing*{\chapter}{0pt}{0pt}{3in}
\titleformat{\subsubsection}{\large\bfseries}{\thesubsubsection}{1em}{\large\bfseries}
\renewcommand{\thesubsubsection}{\large\bfseries{\ensuremath{\bullet}}}
%====================================================================================================
%====================================================================================================
% Section symbol in TOC and in text
%
\usepackage{tocloft}
\renewcommand\cftsecpresnum{\S}
\titleformat{\section}{\normalfont\Large\bfseries}{\S\thesection}{1em}{}
%====================================================================================================
%====================================================================================================
% Header-Footer
%
\usepackage[english]{babel}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[LE,RO]{\rightmark}
\fancyhead[LO,RE]{\leftmark}
\fancyfoot[C]{\thepage}
\renewcommand{\chaptermark}[1]{\markboth{\MakeUppercase{\thechapter.\ #1}}{}}
\renewcommand{\sectionmark}[1]{\markright{\S\thesection.\ #1}}
%====================================================================================================
%====================================================================================================
% Cross-references
%
\usepackage{varioref}
\usepackage{hyperref}
\hypersetup
{
colorlinks=true,
linktoc=all,
linkcolor=black,
citecolor=teal,
}
\usepackage{cleveref}
\begin{document}
\tableofcontents
\hypersetup{linkcolor=blue}
\chapter{First}
\lipsum\\
\vref{A1}
\section{title}
\lipsum[1]
\chapter{Second}
\lipsum
\begin{appendices}
%====================================================================================================
% Local formatting
\titleformat{\chapter}[hang]{\filleft\LARGE\bfseries}{Appendix \thechapter\hsp\textcolor{gray75}{$\mid$}\hsp}{0pt}{\LARGE\bfseries}
\fancyhead[LO,RE]{\rightmark}
\fancyhead[LE,RO]{\leftmark}
\renewcommand{\chaptermark}[1]{\markboth{Appendix \MakeUppercase{\thechapter.\ #1}}{}}
\renewcommand{\sectionmark}[1]{\markright{}}
\addtocontents{toc}{\protect\setcounter{tocdepth}{0}}
\crefname{chapter}{appendix}{appendices}
%====================================================================================================
\chapter{One}\label{A1}
\lipsum
\section{First section}
\lipsum[1]
\chapter{Two}\label{A2}
\lipsum
\end{appendices}
\end{document}
My goals are:
- The "Appendices" header in the TOC should not have a page reference.
- The separator page "Appendices" should be there (as it is there now) after the usual chapters without a page number on it.
- The
appendices
part should behave like a (partially) one-sided document. First, like an one-sided document, the first appendix chapter should start on right (odd numbered page) and the next appendix chapters should start on the next new pages (even or odd numbered page). Secondly, the chapter marks in the header of a page should behave like a two-sided document (as it is there now, with no section mark in the header).\vref
to chapters inappendices
(only) should produce the pre-string "appendix" instead of "chapter".- The formatting behaviour outside
appendices
should stay exactly how they are now.
Please help how to achieve these goals. Thanks in advance.
EDIT
PS: (getting intrigued by this plea), Please feel free to change the title of my question to a more meaningful one.