Revert to biblatex alphabetic style
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
\usepackage[
|
||||
backend=biber,
|
||||
style=ext-authoryear-comp,
|
||||
style=ext-alphabetic,
|
||||
backref=true,% Show page numbers where citations appear
|
||||
maxbibnames=99,% Show all authors in bibliography
|
||||
maxalphanames=1,% Show only one author in citations keys
|
||||
@@ -8,24 +8,41 @@
|
||||
uniquelist=false,% Force to show only one author in citations
|
||||
]{biblatex}
|
||||
|
||||
% Use square brackets instead of parentheses for citations (https://tex.stackexchange.com/a/499667)
|
||||
\DeclareOuterCiteDelims{cite}{\bibopenbracket}{\bibclosebracket}
|
||||
\DeclareInnerCiteDelims{textcite}{\bibopenbracket}{\bibclosebracket}
|
||||
\DeclareOuterCiteDelims{parencite}{\bibopenbracket}{\bibclosebracket}
|
||||
|
||||
\DeclareDelimFormat{nameyeardelim}{\addcomma\space} % Add comma between author and year in citations
|
||||
|
||||
% Include the author's name in the hyperlink to the reference (https://tex.stackexchange.com/a/499667)
|
||||
\DeclareFieldFormat{linkallcite}{%
|
||||
\DeclareFieldFormat{bibhyperref}{##1}%
|
||||
\bibhyperref{#1}%
|
||||
% Define citation style to be [Author, Year]
|
||||
% From https://tex.stackexchange.com/a/176119
|
||||
\DeclareLabelalphaTemplate{
|
||||
\labelelement{% Author
|
||||
\field[final]{shorthand}
|
||||
\field{labelname}
|
||||
\field{label}
|
||||
}
|
||||
\AtIntrocite{\DeclareFieldFormat{linkallcite}{#1}}
|
||||
|
||||
\letbibmacro{oldcite}{cite}
|
||||
\renewbibmacro{cite}{%
|
||||
\printtext[linkallcite]{\usebibmacro{oldcite}}%
|
||||
\labelelement{% Comma
|
||||
\literal{,\addhighpenspace}
|
||||
}
|
||||
\labelelement{% Year
|
||||
\field{year}
|
||||
}
|
||||
}
|
||||
|
||||
% Use prefix + family name for 'Author' in citation keys
|
||||
\DeclareLabelalphaNameTemplate{
|
||||
\namepart[use]{prefix}
|
||||
\namepart{family}
|
||||
}
|
||||
|
||||
\renewcommand*{\labelalphaothers}{\ et~al.} % Remove "et al." in citation keys
|
||||
|
||||
% Define \textcite to be Author [Yeara] (magically defined by Copilot)
|
||||
\DeclareCiteCommand{\textcite}
|
||||
{\usebibmacro{prenote}}
|
||||
{%
|
||||
\ifciteindex{\indexnames{labelname}}{}%
|
||||
\bibhyperref{\printnames{labelname}}% Author
|
||||
\setunit{\addspace}% Space
|
||||
\printtext[brackets]{\bibhyperref{\printdateextra}}% Year
|
||||
}
|
||||
{\multicitedelim}
|
||||
{\usebibmacro{postnote}}
|
||||
|
||||
% Remove some fields from bibliography
|
||||
\AtEveryBibitem{
|
||||
@@ -33,6 +50,7 @@
|
||||
\clearfield{isbn}%
|
||||
}
|
||||
\clearfield{day}%
|
||||
\clearfield{doi}%
|
||||
\clearlist{editor}%
|
||||
\clearfield{extra}%
|
||||
\clearfield{location}%
|
||||
|
||||
Reference in New Issue
Block a user