From aecd50ef083cce8657b842fc612387c3e4b32431 Mon Sep 17 00:00:00 2001 From: Erwan Normand Date: Thu, 4 Jul 2024 20:32:06 +0200 Subject: [PATCH] Fix [Author, Year] bibliography style --- config/bibliography.tex | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/config/bibliography.tex b/config/bibliography.tex index 4e81c6d..d6360cf 100644 --- a/config/bibliography.tex +++ b/config/bibliography.tex @@ -1,18 +1,26 @@ \usepackage[ backend=biber, - style=authoryear, + style=alphabetic, backref=true,% Show page numbers where citations appear maxbibnames=99,% Show all authors in bibliography - maxcitenames=1,% Show only one author in citations - uniquelist=false% Force maxcitenames + maxalphanames=1,% Show only one author in citations ]{biblatex} -\DefineBibliographyStrings{english}{andothers={}} % Remove "et al." in citations +\renewcommand*{\labelalphaothers}{} % Remove "et al." in citations -% Use square brackets for citations -\AtEveryCite{ - \let\bibopenparen=\bibopenbracket% - \let\bibcloseparen=\bibclosebracket% +% Define citation style to be [Author, Year] +\DeclareLabelalphaTemplate{ + \labelelement{ + \field[final]{shorthand} + \field{labelname} + \field{label} + } + \labelelement{ + \literal{,\addhighpenspace} + } + \labelelement{ + \field{year} + } } % Remove some fields from bibliography