I'm trying to implement a chapter of used abbreviations in my document (class report). This is working fine so far, but the following chapters are affected by this new chapter and the style of front page of a new chapter is not displayed as it is supposed to (see chapter Introduction vs References). This happens no matter where I put the abbreviation chapter.
Here is the code I've been using:
Code: Select all
%----- Packages and Formatting %------
\documentclass [a4paper, 12pt, twoside]{report}
\usepackage{graphicx}
\usepackage{setspace}
\usepackage[left=30mm,right=25mm,top=35mm,bottom=30mm]{geometry}
\usepackage{nomencl}
\makenomenclature
\usepackage{fancyhdr}
\usepackage{hyperref}
\usepackage[round]{natbib}
\usepackage{bigstrut}
\hypersetup{
colorlinks,
citecolor=black,
filecolor=black,
linkcolor=black,
urlcolor=black
}
\usepackage{titlesec}
\usepackage{glossaries}
\makeglossaries
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{color}
\usepackage{acro}
% Declare abbreviations %
\DeclareAcronym{HCC}{
short=HCC,
long=Hepatocellular Carcinoma,
}
% Defining folder of images
\graphicspath{{./img}}
\newcounter{savepage}
% Defining section style numbers:
\def\thesection{\arabic{chapter}}
% Add New Command for Header Footer Settings Title Page
\usepackage{xpatch}
\xapptocmd{\titlepage}{\thispagestyle{firstpage}}{}{}
% rest of the headers
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\fancyhf{}
\fancyhead[R]{%
% The chapter number only if it's greater than 0
\ifnum\value{chapter}>0 \chaptername\ \thechapter. \fi
% The chapter title
\leftmark}
\fancyfoot[C]{\thepage}
\fancypagestyle{plain}{
\renewcommand{\headrulewidth}{0pt}
\fancyhf{}
\fancyfoot[C]{\thepage}
}
\setlength{\headheight}{14.5pt}
% Set chapter settings
\titleformat{\chapter}
{\normalfont\huge\bfseries}{\thechapter}{1em}{}
\titlespacing*{\chapter}{0pt}{8.5ex plus 1ex minus .2ex}{5.3ex plus .2ex}
%------------------- Start document --------------%
\begin{document}
% Introduction %
\chapter*{Introduction}
\chaptermark{INTRODUCTION}
\Blindtext
Regrading primary liver cancers, hepatocellular carcinoma \acs{HCC} accounts for 80-90\% of all cases.
% Abbreviation page %
\chapter*{Abbreviations}
\renewcommand{\chapter}[2]{}
\chaptermark{Abbreviations}
\printacronyms
% References %
\chapter*{References}
\renewcommand{\chapter}[2]{}
\chaptermark{REFERENCES}
\bibliographystyle{abbrvnat}
\bibliography{library}
\end{document}
