Setup
In my MWE I am trying to add a "LIST OF ALGORITHMS" into the TOC. Following some examples on here I was able to add a page, however each heading in the TOC became doubled and the name "LIST OF ALGORITHMS" is not capitalised.
MWE
\documentclass[12pt, oneside]{book}
%For Algorithms
%ALGORITHM CODE
\usepackage[linesnumbered,ruled]{algorithm2e}
\usepackage{tocbibind} %for some reason "loa" will only work with this package, however this repeates the titles in the TOC
%TABLE OF CONTENTS CODE
\renewcommand\contentsname{CONTENTS}
\renewcommand\listtablename{LIST OF TABLES}
\renewcommand\listfigurename{LIST OF FIGURES}
%WHAT IM TRYING TO ADD
\newcommand{\listofalgorithmes}{\tocfile{\listalgorithmcfname}{loa}}
%\renewcommand\listofalgorithmes{LIST OF ALGORITHMS}
\addtocontents{toc}{{\protect\noindent\bfseries Contents\hfill Page No.\bigskip\par}} %contents
\addtocontents{lot}{{\protect\noindent\bfseries No.\hfill Title\hfill\hfill Page No.\bigskip\par}} %tables
\addtocontents{lof}{{\protect\noindent\bfseries No.\hfill Title\hfill\hfill Page No.\bigskip\par}} %figuers
\addtocontents{loa}{{\protect\noindent\bfseries No.\hfill Title\hfill\hfill Page No.\bigskip\par}} %Alg
\usepackage[titles]{tocloft}
\usepackage{xpatch}
\renewcommand\cftbeforechapskip{0ex}
\renewcommand\cftchapfont{\mdseries}
\renewcommand\cftchappagefont{\mdseries}
\renewcommand\cftchappresnum{Chapter~}
\renewcommand\cftchapaftersnum{: }
\newlength\tocindent
\settowidth\tocindent{\cftchapfont\cftchappresnum9\cftchapaftersnum}
\edef\cftchapnumwidth{\the\tocindent}
\edef\cftsecindent{\the\tocindent}
\advance\tocindent2.3em
\edef\cftsubsecindent{\the\tocindent}
\advance\tocindent3.2em
\edef\cftsubsubsecindent{\the\tocindent}
\renewcommand\cftsecdotsep{\cftnodots}
\renewcommand\cftsubsecdotsep{\cftnodots}
\renewcommand\cftsubsubsecdotsep{\cftnodots}
\newcommand\tocmainmatter
{\renewcommand\cftchappagefont{\color{white}}%
}
\xapptocmd\mainmatter{\addtocontents{toc}{\protect\tocmainmatter}}{}{}
% Centring for \chapter* and TOC headers, needed - use back up code below
\newif\ifschaptertoc
\makeatletter
\renewcommand\@makeschapterhead[1]%
{{\parindent \z@ \centering
\normalfont
\interlinepenalty\@M
\Large \bfseries #1\par\nobreak
\vskip 20\p@
}%
\@mkboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}%
\ifschaptertoc
\addcontentsline{toc}{chapter}{#1}%
\fi
}
\makeatother
%dots
\renewcommand{\cftpartleader}{\cftdotfill{\cftdotsep}} %parts
\renewcommand{\cftchapleader}{\cftdotfill{\cftdotsep}} %chapters
\renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}} %sections
\renewcommand{\cftsubsecleader}{\cftdotfill{\cftdotsep}} %subsection
%----------------------------BEGIN---------------------------
\begin{document}
\frontmatter
\tableofcontents
\schaptertoctrue
\clearpage
\listofalgorithmes
\clearpage
\listoftables
\clearpage
\listoffigures
%-----------------------------To fill TOC-----------------
\mainmatter
\chapter{Chapter 1}
\section{section 1}
\begin{algorithm}[H]
\SetKwInOut{Input}{Input}
\SetKwInOut{Output}{Output}
\underline{Initialise} conditions\;
\Input{input of algorithm}
\Output{output of algorithm}
\underline{Sequence In Full:}
{
\hspace{5pt} \textbf{Start}: Start \;
}
{
\hspace{15pt} Find: \;
}
{
\hspace{15pt} Return: \vspace{-20pt}
}
{
\hspace {5pt} \textbf{End}: End
}
\caption{Algorithm 1)} \label{alg:1}
\end{algorithm} \bigskip
\end{document}
Question
How do I correct my code above to make "list of algorithms" into "LIST OF ALGORITHMS" and prevent the TOC from repeating "List of Algorithms", "LIST OF TABLES", and "LIST OF FIGURE"?


