Fix [Author, Year] bibliography style

This commit is contained in:
2024-07-04 20:32:06 +02:00
parent a131888610
commit aecd50ef08

View File

@@ -1,18 +1,26 @@
\usepackage[ \usepackage[
backend=biber, backend=biber,
style=authoryear, style=alphabetic,
backref=true,% Show page numbers where citations appear backref=true,% Show page numbers where citations appear
maxbibnames=99,% Show all authors in bibliography maxbibnames=99,% Show all authors in bibliography
maxcitenames=1,% Show only one author in citations maxalphanames=1,% Show only one author in citations
uniquelist=false% Force maxcitenames
]{biblatex} ]{biblatex}
\DefineBibliographyStrings{english}{andothers={}} % Remove "et al." in citations \renewcommand*{\labelalphaothers}{} % Remove "et al." in citations
% Use square brackets for citations % Define citation style to be [Author, Year]
\AtEveryCite{ \DeclareLabelalphaTemplate{
\let\bibopenparen=\bibopenbracket% \labelelement{
\let\bibcloseparen=\bibclosebracket% \field[final]{shorthand}
\field{labelname}
\field{label}
}
\labelelement{
\literal{,\addhighpenspace}
}
\labelelement{
\field{year}
}
} }
% Remove some fields from bibliography % Remove some fields from bibliography