I have been struggling with the following problem below: The \parskip function only works in the frontmatter section of the document, parskip does not work in the mainmatter (even if I add include same documents in both the front- and mainmatter sections). I have attached my main file's code below, I would appreciate it if somebody could help me out with a correction to my problem? Maybe a clash in the preamble? I don't know anymore. I am using Overleaf with pdfLaTeX compiler.
\documentclass[a4paper, 11pt, oneside]{scrbook}
\usepackage[utf8x]{inputenc}
\usepackage[margin=1in]{geometry}
\usepackage[parfill]{parskip}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{epstopdf}
\DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}
\usepackage[colorlinks=true, pdfstartview=FitV, linkcolor=blue,
citecolor=blue, urlcolor=blue]{hyperref}
\pagestyle{plain}
\pagenumbering{arabic}
\newlength\longest % added for quote
% ----- Packages needed for multiple figures -----
\usepackage{caption}
\usepackage{subcaption}
\usepackage{pdflscape}
\usepackage{natbib}
\usepackage{wrapfig}
\DeclareCaptionLabelSeparator{none}{ }
\captionsetup{margin=10pt,font=small,labelfont=bf, labelsep=none}
% ----- Additional packages, user specified -----
\usepackage{authblk}
\usepackage{comment}
\usepackage[fleqn]{amsmath}
\usepackage{nccmath}
\usepackage{float}
\usepackage{physics}
\usepackage{array}
\usepackage{tabu}
\usepackage{tabularx}
\usepackage[english]{babel}
\usepackage{array}
\usepackage{xcolor}
\usepackage{colortbl}
\usepackage{rotating}
\usepackage{multirow}
\usepackage{multicol}
\usepackage{booktabs}
\usepackage[flushleft]{threeparttable}
\usepackage{makecell}
\usepackage{siunitx}
\usepackage{t1enc}
\usepackage[toc,page]{appendix}
\usepackage{tocloft}
\renewcommand{\cftpartleader}{\cftdotfill{\cftdotsep}} % for parts
\renewcommand{\cftchapleader}{\cftdotfill{\cftdotsep}} % for chapters
%----------------------------------------------
% Define flow diagram styles
\usepackage{tikz}
\usetikzlibrary{shapes.geometric}
\usetikzlibrary{shapes.arrows}
\usetikzlibrary{arrows.meta}
\tikzset{%
>={Latex[width=2mm,length=2mm]},
% Specifications for style of nodes:
base/.style = {rectangle, rounded corners, draw=black,
minimum width=4cm, minimum height=1cm,
text centered},
blank/.style = {rectangle, rounded corners, draw=white,
minimum width=4cm, minimum height=1cm,
text centered},
loop/.style = {ellipse, rounded corners, draw=black,
minimum width=1cm, minimum height=1cm,
text centered},
processData/.style = {base, fill=blue!30},
startstop/.style = {loop, fill=red!30},
activityRuns/.style = {base, fill=green!30},
process/.style = {blank, fill=white!15},
}
%----------------------------------------------
% Create nomenclature with groups and units
\usepackage{nomencl}
\makenomenclature
\usepackage{etoolbox}
\renewcommand\nomgroup[1]{%
\item[\bfseries
\ifstrequal{#1}{A}{Abbreviations}{%
\ifstrequal{#1}{V}{Variables}{%
\ifstrequal{#1}{C}{Physics Constants}{}}}%
]}
\newcommand{\nomunit}[1]{\renewcommand{\nomentryend}{\hspace*{\fill}#1}}
%----------------------------------------------
% Create column type
\newcolumntype{C}[1]{>{\centering\arraybackslash}m{#1}}
%----------------------------------------------
% Change the numbering of the figures and tables to match the chapters
\renewcommand\thefigure{\thechapter-\arabic{figure}}
\renewcommand\thetable{\thechapter-\arabic{table}}
\usepackage{scrhack}
% ------------------- Begin the document -----------------------------
\begin{document}
% ------------------- Title and Author -----------------------------
% Modify the details in the separate titlepage file
\include{Front_Matter/titlepage}
% ------------------- Rest of frontmatter -----------------------------
\frontmatter
\include{Front_Matter/abstract}\addcontentsline{toc}{chapter}{Abstract}
\include{Front_Matter/dedication}\addcontentsline{toc}{chapter}{Dedication}
\include{Front_Matter/declaration}\addcontentsline{toc}{chapter}{Declaration}
\include{Front_Matter/acknowledgements}\addcontentsline{toc}{chapter}{Acknowledgements}
\tableofcontents
\listoffigures \addcontentsline{toc}{chapter}{List of figures}
\listoftables \addcontentsline{toc}{chapter}{List of tables}
\include{Front_Matter/nomenclature}
% ------------------- Mainmatter -----------------------------
\mainmatter
\include{Body/1.Introduction}
\include{Body/2.Literature_survey}
\include{Body/3.Verification}
\include{Body/4.Validation}
% ------------------- Bibliography -----------------------------
\bibliographystyle{agsm}
\bibliography{ZoteroLibrary.bib}
% ------------------- Appendices -----------------------------
\begin{appendix}
%\addtocontents{toc}{\protect\contentsline{chapter}{Annexures}{}}
%\addtocontents{toc}{\protect\setcounter{tocdepth}{1}}
\makeatletter
\addtocontents{toc}{%
\begingroup
\let\protect\l@chapter\protect\l@section
\let\protect\l@section\protect\l@subsection
}
\makeatother
\include{Annexures/AnnexureA}
\end{appendix}
\end{document}