0

I hope all of you are doing well. I am using a Harvard style reference system; in my work, I am trying to display only the last names in citations, but currently, the citations include first names or initials (as in "(I. Alamen, Radkov, and Al-Hadhrami, 2019)"). I want it to display just "(Alamen, Radkov, and Al-Hadhrami, 2019)", please.

I am using the following code

\usepackage[style=authoryear, backend=biber, natbib=true]{biblatex}
\addbibresource{references.bib}

\DeclareNameFormat{family}{%
  \usebibmacro{name:family}
    {\namepartfamily}
    {\namepartgiveni}
    {\namepartprefix}
    {\namepartsuffix}%
  \usebibmacro{name:andothers}}
\DeclareNameAlias{sortname}{family}
\DeclareNameAlias{default}{family}

\DeclareFieldFormat[article]{title}{#1} % Title in regular font
\DeclareFieldFormat[article]{journaltitle}{\mkbibemph{#1}} % Journal name in italics
\DeclareFieldFormat[article]{volume}{\mkbibbold{#1}} % Volume in bold

Please I need your help to solve this issue as soon as possible please. Thank you for your understanding

2
  • Hello, how does this relate to overleaf?
    – wipet
    Commented Nov 19, 2023 at 17:06
  • It's hard to say without a proper example document, but I would say the most likely explanation is the uniquename feature: tex.stackexchange.com/q/134535/35864
    – moewe
    Commented Dec 19, 2023 at 20:42

1 Answer 1

0

Remove given names

{\namepartgiveni}

This command represents the initials of the given names (first name, middle name, etc.) of a person.

1
  • 1
    It would be nice if this answer explained how to use this knowledge to achieve OP's goal. Is it saying to change {\namepartgiveni} to {} in the (non-working) example?
    – Teepeemm
    Commented May 17 at 21:19

Not the answer you're looking for? Browse other questions tagged .