\documentclass[a4paper,12pt,titlepage,oneside]{book}
\usepackage{times}
\usepackage[utf8]{inputenc}
\usepackage{caption}
\usepackage{lipsum}
\usepackage{amsmath,amsthm,amssymb,amsfonts}
\usepackage{comment}
\usepackage{multirow}
\usepackage{rotating, graphicx}
\usepackage{tabularx}
\usepackage{ragged2e}
\usepackage{textcomp}
\usepackage{titletoc}
\usepackage{listings}
\usepackage{setspace}
\usepackage[normalem]{ulem}
\useunder{\uline}{\ul}{}
\usepackage{hyperref}
\usepackage{xcolor}
\usepackage{titlesec}
\usepackage{fancyhdr} % To customize headers/footers
\usepackage{tocloft} % For customizing the Table of Contents
\usepackage[style=apa, sorting=nyt]{biblatex} % APA citation style
\DeclareLanguageMapping{english}{english-apa}
\addbibresource{references.bib} % Add your bibliography file here
% Page numbering customization
\pagestyle{fancy} % Apply fancy style for general headers and footers
\fancyhf{} % Clear all headers and footers
\fancyfoot[R]{\thepage} % Align page numbers to the bottom-right
\renewcommand{\headrulewidth}{0pt} % Remove header line
\renewcommand{\footrulewidth}{0pt} % Remove footer line
% Redefine the plain page style (used by ToC, LoF, LoT)
\fancypagestyle{plain}{
\fancyhf{} % Clear headers and footers
\fancyfoot[R]{\thepage} % Place page numbers on the bottom-right
\renewcommand{\headrulewidth}{0pt} % No header line
\renewcommand{\footrulewidth}{0pt} % No footer line
}
% Configure hyperref
\hypersetup{
colorlinks=true,
linkcolor=black,
filecolor=black,
urlcolor=blue,
citecolor=black,
}
% Use the same style for URLs as the text
\urlstyle{same}
% Customizing the appearance of the Table of Contents (ToC), List of Figures (LoF), and List of Tables (LoT)
\renewcommand{\cfttoctitlefont}{\bfseries\fontsize{14}{16}\selectfont} % ToC title font size
\renewcommand{\cftloftitlefont}{\bfseries\fontsize{14}{16}\selectfont} % LoF title font size
\renewcommand{\cftlottitlefont}{\bfseries\fontsize{14}{16}\selectfont} % LoT title font size
\renewcommand{\cftdotsep}{1} % Dot spacing in ToC, LoF, LoT
% Customize figures and tables in ToC
\renewcommand{\cftfigfont}{\fontsize{12}{14}\selectfont}
\renewcommand{\cfttabfont}{\fontsize{12}{14}\selectfont}
\renewcommand{\cftfigpresnum}{Figure~} % Prefix for figure numbers
\setlength{\cftfignumwidth}{3.75em} % Space for figure numbers
\renewcommand{\cftfigaftersnum}{:~} % Formatting after figure numbers
\renewcommand{\cfttabpresnum}{Table~} % Prefix for table numbers
\setlength{\cfttabnumwidth}{3.75em} % Space for table numbers
\renewcommand{\cfttabaftersnum}{:~} % Formatting after table numbers
% Adjust page margins
\usepackage[a4paper,
left=1.5in, % Left margin
right=1in, % Right margin
top=1in, % Top margin
bottom=1in % Bottom margin
]{geometry}
% Left-align captions
\captionsetup{justification=raggedright, singlelinecheck=false} % Left-align captions
% Customize indentation for subsections and sub-subsections
\setcounter{tocdepth}{3} % Include subsubsections in the Table of Contents
\setlength{\cftsubsecindent}{2.4em} % Indent subsections by 2.4em
\setlength{\cftsubsubsecindent}{3.4em} % Indent sub-subsections by 6em
\begin{document}
% Include the front matter such as Title Page, Abstract, Table of Contents, List of Figures, List of Tables, Preface, Acknowledgments, Declaration, Dedication, Acronyms, and Nomenclature
\input{front matter/title page}
\input{front matter/abstract}
\input{front matter/TOC_LOF_LOT}
\input{front matter/preface}
\input{front matter/acknowledgments}
\input{front matter/declaration}
\input{front matter/dedication}
\input{front matter/acronyms}
\input{front matter/nomenclature}
% Include Chapter 1
% All the chapters and subsection contents are stored in a separate folder (chapters)
\input{chapters/chapter 1}
\input{chapters/chapter 1.1}
\input{chapters/chapter 1.2}
\input{chapters/chapter 1.3}
\input{chapters/chapter 1.4}
\input{chapters/chapter 1.4.1}
\input{chapters/chapter 1.4.2}
\input{chapters/chapter 1.4.3}
% Include Chapter 2
\input{chapters/chapter 2}
\input{chapters/chapter 2.1}
\input{chapters/chapter 2.2}
% References Section
\newpage
\setstretch{1.5}
\fontsize{14}{16}\selectfont
\textbf{REFERENCES/BIBLIOGRAPHY}
\justify % Justify the abstract text
\phantomsection
\fontsize{12}{14}\selectfont % Set the abstract text to 12pt font size
\setlength{\parindent}{0pt}
The spacing of the list is 1.5 line spacing with an empty line between references.
You are encouraged to format the list of references once all entries have been inserted.
\\
Example in APA 7th Edition:
% Content goes here
\defbibheading{bibliography}[\refname]{
\fontsize{14}{16}\selectfont
}
\printbibliography
\label{chap:references_bibliography}
\addcontentsline{toc}{section}{{REFERENCES/ BIBLIOGRAPHY}}
\clearpage
% This thesis uses bibtex -- check the included references.bib file to see how it works.
\input{appendix}
\end{document}