Problem Description
This question is emanating from the comment provided by @egreg at Replacing "&" with "and" in apalike2 bibliography style alongside natbib package and citations who mentioned that the apalike2 bibliography style is now old. So I am interested in adopting the apalike2 bibliography style alongside the natbib package but this time using biblatex. Remarks: In other words, I wish to have this bibliography style in biblatex as suggested by Professor @egreg. Below is the MWE which is a very nice solution provided by @egreg to my question at Replacing "&" with "and" in apalike2 bibliography style alongside natbib package and citations:
\begin{filecontents*}{\jobname.bib}
@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}
}
\end{filecontents*}
\documentclass[12pt,openany]{book}
\usepackage{natbib}
\usepackage{hyperref}
\hypersetup{
colorlinks=true,
linkcolor=blue,
citecolor=red,
urlcolor=yellow,
}
\begin{document}
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 \citep{datta2017latex} should be
(\textcolor{red}{Datta\textcolor{black}{,} 2017}).
\nocite{*}
\bibliographystyle{apalike2-and}
\bibliography{\jobname}
\end{document}
where the apalike2-and bibliography is simply the apalike2 style modified at the following line numbers:
297 { " et~al." * }
298 { " \& " * t * } % changed from " and " for names -- BJR 10/5/89
299 if$
329 { " et~al." * }
330 { " \& " * t * } % changed from " and " for names -- BJR 10/5/89
331 if$
1018 { " et~al." * }
1019 { " & " * s #2 "{vv~}{ll}" format.name$ * } % " and " -- BJR 10/5/89
1020 if$
What I have tried so far
Following a comment by @Ulrike Fischer, I modified the code though the following issues have arisen (as a result of using biblatex):
- The citations are not hyperlinked which is something I do not like, and
- The Bibliography generated using
biblatexis different from the one generated usingnatbibalongsideapalike2I have attached the pictures showing my problems (as a result of usingbiblatex):

and what I am expecting to get (fromnatbibalongsideapalike2):
Below is my MWE:
\begin{filecontents*}{references.bib}
@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}
}
\end{filecontents*}
\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{etoolbox}
\usepackage{csquotes}
\usepackage[backend=biber, style=apa]{biblatex}
\addbibresource{references.bib}
\usepackage{hyperref}
\hypersetup{
colorlinks=true,
linkcolor=blue,
citecolor=red,
urlcolor=yellow,
}
\usepackage{showframe}
\begin{document}
\chapter*{Acknowledgements}
I want this citation \textcite{hapa:graphenum} to be \textcolor{red}{Harary and Palmer }\textcolor{black}{(\textcolor{red}{1973})}. I want this citation \textcite{Knuth94:TheTeXbook} to be \textcolor{red}{Knuth }\textcolor{black}{(\textcolor{red}{1994})}.This text is quoted from \parencite{datta2017latex} should be (\textcolor{red}{Datta\textcolor{black}{,} 2017}).
\mainmatter
\setcounter{tocdepth}{1}
\chapter{Introduction}
\backmatter
\nocite{*}
\printbibliography
\end{document}
\usepackage[style=apa]{biblatex}and then read the documentation how to load bib files with biblatex. – Ulrike Fischer Aug 08 '22 at 12:27apalike2andnatbibI would not be too quick to switch tobiblatex. Especially if you have very specific requirements that you cannot change and that are already satisfied by your current setup. Many things are easier withbiblatex, but it is a pain having to recreate an existing output in each small detail. If you are more flexible in what you can accept,biblatexis a great solution, though. – moewe Aug 08 '22 at 15:46natbib+apalike2bibliography style be replicated using biblatex. So far I have managed to provide my trial MWE which is under What I have done so far. So I need help modifying thebiblatexcode to produce an exact output produced byapalike2andnatbib. – itc Aug 08 '22 at 15:48apalike2+natbibcombination withbiblatex, but it is going to be extremely painful (it is possible to come up with something that looks similar enough, for some reasonably definition of "similar enough", but every single detail will be tricky). So the question is: Do you really need to usebiblatex? If you're OK with the outputapalike2gives you (and you seem to be more than that: you insist on it), then I don't really see the appeal ofbiblatexfor your use case. – moewe Aug 08 '22 at 15:51apalike2+natbib– itc Aug 08 '22 at 15:54