I am trying to replace "&" with "and" in my bibliography and citations using the apalike2
style alongside the natbib
package. I have tried so many solutions given here on texstackexchange but could not successfully get the desired result. I need help changing the "&" with "and". My prblem and desired output is shown in the following picture:
Below is my MWE:
\documentclass[12pt,openany]{book}
\usepackage[
left=2.5cm,
right=2.5cm,
top=3cm,
bottom=3cm,
headheight = 3\baselineskip,
headsep = 5mm,
a4paper
]{geometry}
\usepackage[table]{xcolor}
\usepackage{graphicx}
\newcommand\HRule{\noindent\rule{\linewidth}{1.5pt}}
\usepackage{background}
\backgroundsetup{contents={}}
\usepackage{fancyhdr}
\usepackage{hhline}
\pagestyle{fancy}
\usepackage{natbib}
\bibliographystyle{apalike2}
\usepackage{etoolbox}
\usepackage{hyperref}
\hypersetup{
colorlinks=true,
linkcolor=blue,
citecolor=red,
urlcolor=yellow,
}
\usepackage{showframe}
\begin{document}
\chapter*{Acknowledgements}
I want this citation \cite{hapa:graphenum} to be \textcolor{red}{Harary and Palmer }\textcolor{black}{(\textcolor{red}{1973})}. I want this citation \cite{Knuth94:TheTeXbook} to be \textcolor{red}{Knuth }\textcolor{black}{(\textcolor{red}{1994})}.This text is quoted from \cite{datta2017latex} should be (\textcolor{red}{Datta\textcolor{black}{,} 2017}).
\mainmatter
\setcounter{tocdepth}{1}
\chapter{Introduction}
\backmatter
\nocite{*}
\bibliography{references}
\end{document}
Below is my references.bib file
@book{hapa:graphenum,
author = {F. Harary and E. M. Palmer},
title = {Graphical Enumeration},
publisher = {Academic Press},
pages={465--523},
year = 1973
}
@book{Knuth94:TheTeXbook,
author = {Knuth, Donald Ervin},
title = {The \TeX book},
publisher = {Addison-Wesley Publishing Company},
pages={465--523},
year = 1994,
series = {Computers \& Typesetting A},
address = {Reading, MA},
titlenote = {with illustrations by Duane Bibby}
}
@book{datta2017latex,
title={LaTeX in 24 Hours: A Practical Guide for Scientific Writing},
author={Datta, Dilip},
pages={465--523},
year={2017},
publisher={Springer}
}