44 lines
1.4 KiB
TeX
44 lines
1.4 KiB
TeX
\usepackage[
|
|
backend=biber,
|
|
style=ext-authoryear-comp,
|
|
backref=true,% Show page numbers where citations appear
|
|
maxbibnames=99,% Show all authors in bibliography
|
|
maxalphanames=1,% Show only one author in citations keys
|
|
maxcitenames=1,% Show only one authors in citations in text
|
|
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}%
|
|
}
|
|
\AtIntrocite{\DeclareFieldFormat{linkallcite}{#1}}
|
|
|
|
\letbibmacro{oldcite}{cite}
|
|
\renewbibmacro{cite}{%
|
|
\printtext[linkallcite]{\usebibmacro{oldcite}}%
|
|
}
|
|
|
|
% Remove some fields from bibliography
|
|
\AtEveryBibitem{
|
|
\ifentrytype{book}{}{ % Keep ISBN only for books
|
|
\clearfield{isbn}%
|
|
}
|
|
\clearfield{day}%
|
|
\clearlist{editor}%
|
|
\clearfield{extra}%
|
|
\clearfield{location}%
|
|
\clearfield{month}%
|
|
\clearfield{series}%
|
|
\clearlist{publisher}%
|
|
\clearfield{url}%
|
|
}
|