This commit is contained in:
2024-10-22 11:23:29 +02:00
parent f2d80a3aa1
commit 46880354de

View File

@@ -5,32 +5,32 @@
maxbibnames=99,% Show all authors in bibliography maxbibnames=99,% Show all authors in bibliography
maxalphanames=1,% Show only one author in citations keys maxalphanames=1,% Show only one author in citations keys
maxcitenames=1,% Show only one authors in citations in text maxcitenames=1,% Show only one authors in citations in text
uniquelist=false,% Force to show only one author in citations uniquelist=false% Force to show only one author in citations
]{biblatex} ]{biblatex}
% Define citation style to be [Author, Year] % Define citation style to be [Author, Year]
% From https://tex.stackexchange.com/a/176119 % From https://tex.stackexchange.com/a/176119
\DeclareLabelalphaTemplate{ \DeclareLabelalphaTemplate{%
\labelelement{% Author \labelelement{% Author
\field[final]{shorthand} \field[final]{shorthand}%
\field{labelname} \field{labelname}%
\field{label} \field{label}%
} }%
\labelelement{% Comma \labelelement{% Comma
\literal{,\addhighpenspace} \literal{,\addhighpenspace}%
} }%
\labelelement{% Year \labelelement{% Year
\field{year} \field{year}%
} }%
} }
% Use prefix + family name for 'Author' in citation keys % Use prefix + family name for 'Author' in citation keys
\DeclareLabelalphaNameTemplate{ \DeclareLabelalphaNameTemplate{%
\namepart[use]{prefix} \namepart[use]{prefix}%
\namepart{family} \namepart{family}%
} }
\renewcommand*{\labelalphaothers}{\ et~al.} % Remove "et al." in citation keys \renewcommand*{\labelalphaothers}{\ et~al.}% Use "et al." in citation keys
% Define \textcite to be Author [Yeara] (magically defined by Copilot) % Define \textcite to be Author [Yeara] (magically defined by Copilot)
\DeclareCiteCommand{\textcite} \DeclareCiteCommand{\textcite}
@@ -46,9 +46,9 @@
% Remove some fields from bibliography % Remove some fields from bibliography
\AtEveryBibitem{ \AtEveryBibitem{
\ifentrytype{book}{}{ % Keep ISBN only for books \ifentrytype{book}{}{% Keep ISBN only for books
\clearfield{isbn}% \clearfield{isbn}%
} }%
\clearfield{day}% \clearfield{day}%
\clearfield{doi}% \clearfield{doi}%
\clearlist{editor}% \clearlist{editor}%
@@ -59,3 +59,4 @@
\clearlist{publisher}% \clearlist{publisher}%
\clearfield{url}% \clearfield{url}%
} }