[Tex/LaTex] Replace ‘and’ with ampersand in bibliography and parenthetical citations using BibLaTeX

biblatexbibliographiesbibtexciting

By default, author-year style in BibLaTeX uses the word 'and' before the last author. I would like to retain this for in-text citations, but would like to replace 'and' with an ampersand (&) in the bibliography and in parenthetical citations.

For example, I would like the following:

In-text citation: Smith and John (2013)
Parenthetical citation: (Smith & John, 2013)
Bibliography: Smith, A.B. & John, C.D. (2013)...

How can I do this? I found another answer that specified how to turn all instances of 'and' to ampersand, but I haven't been able to find out how to change only the bibliography and parenthetical citations to ampersand (not the in-text citations):

Use ampersand & in citations and bibliography in biblatex

Best Answer

Using the code in the linked answer, this is what you can do.

To replace and with & in the bibliography you can simply insert that code inside \AtBeginBibliography:

\AtBeginBibliography{%
  \renewcommand*{\finalnamedelim}{%
    \ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}%
    \addspace\&\space}%
}

The second request is a bit more complicated, in my opinion. Supposing you are using \parencite for parenthetical citations, you can redefine that command in this way:

\let\origparencite\parencite
\renewrobustcmd{\parencite}{%
  \AtNextCite{%
  \renewcommand*{\finalnamedelim}{%
    \ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}%
    \addspace\&\space}%
  }%
  \origparencite%
}

\AtNextCite ensures that and is changed to & only for the current citation command.

MWE (borrowed from the linked answer):

\documentclass{article}

\usepackage[style=authoryear]{biblatex}

\AtBeginBibliography{%
  \renewcommand*{\finalnamedelim}{%
    \ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}%
    \addspace\&\space}%
}

\let\origparencite\parencite
\renewrobustcmd{\parencite}{%
  \AtNextCite{%
  \renewcommand*{\finalnamedelim}{%
    \ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}%
    \addspace\&\space}%
  }%
  \origparencite%
}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@misc{A01,
  author = {Author, A. and Buthor, B. and Cuthor, C.},
  year = {2001},
  title = {Alpha},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}

Normal citation: \cite{A01}.

Parenthetical citation: \parencite{A01}.

Normal citation: \cite{A01}.

\printbibliography

\end{document} 

Output:

enter image description here