I am using the technique to add citations on each page as footnote as given here. It works very nicely, but I would like to tweak it such that at every new chapter it starts labeling the citations from 1 again. At the moment it keeps on numbering the citations one after the other over all the chapters, which means the last chapters have citations all in 3 digits, which look not so nice.
Is there a way to start fresh citations at each chapter?
-Thanks! Here is the code I am using:
\usepackage{manyfoot}
\AtEveryCitekey{\clearfield{title}\clearfield{note}\clearfield{volume}\clearfield{eprint}}
% \usepackage{hyperref}
\hypersetup{%
colorlinks,
linkcolor={red!0!black},
citecolor={blue!0!black},
urlcolor={blue!80!black}
}
\ExecuteBibliographyOptions{citetracker=true,sorting=none,maxcitenames=3,doi=false,url=false,isbn=false,hyperref=true,backref=false}
\DefineBibliographyStrings{ngerman}{
andothers = {\textit{et~al\adddot}}
}
% Citation footnotes: use \footnoteA
\DeclareNewFootnote{A}
% Vanilla footnotes: use \footnoteB
\DeclareNewFootnote{B}
% Number of each bibliography entry in brackets
\DeclareFieldFormat{labelnumberwidth}{\mkbibbrackets{#1}}
\newtoggle{cbx@togcite}
% Citation number superscript in brackets
\renewcommand\@makefntext[1]{%
\iftoggle{cbx@togcite}
{\@textsuperscript{\normalfont[\@thefnmark]}\enspace #1}
{\@textsuperscript{\normalfont\@thefnmark}\enspace #1}%
\global\togglefalse{cbx@togcite}}
% Citation number superscript in brackets (for babel french)
\ifdef{\@makefntextFB}{%
\renewcommand\@makefntextFB[1]{%
\iftoggle{cbx@togcite}
{\@textsuperscript{\normalfont[\@thefnmark]}\enspace #1}
{\@textsuperscript{\normalfont\@thefnmark}\enspace #1}%
\global\togglefalse{cbx@togcite}}}{}
\DeclareCiteCommand{\sfcite}[\cbx@superscript]%
{\usebibmacro{cite:init}%
\let\multicitedelim=\supercitedelim
\iffieldundef{prenote}
{}
{\BibliographyWarning{Ignoring prenote argument}}%
\iffieldundef{postnote}
{}
{\BibliographyWarning{Ignoring postnote argument}}}
{\usebibmacro{citeindex}%
\usebibmacro{sfcite}%
\usebibmacro{cite:comp}}
{}
{\usebibmacro{cite:dump}}
\newbibmacro*{sfcite}{%
\ifciteseen
{}
{\xappto\cbx@citehook{%
\global\toggletrue{cbx@togcite}%
\noexpand\footnotetextA[\thefield{labelnumber}]{%
\fullcite{\thefield{entrykey}}\addperiod}}}}
\newrobustcmd{\cbx@superscript}[1]{%
\mkbibsuperscript{\mkbibbrackets{#1}}%
\cbx@citehook%
\global\let\cbx@citehook=\empty}
\let\cbx@citehook=\empty
%---------------------------------------------------------------
\makeatother
\newbibmacro{string+doiurlisbn}[1]{%
\iffieldundef{doi}{%
\iffieldundef{url}{%
\iffieldundef{isbn}{%
\iffieldundef{issn}{%
#1%
}{%
\href{}{#1}%
}%
}{%
\href{}{#1}%
}%
}{%
\href{\thefield{url}}{#1}%
}%
}{%
\href{\thefield{doi}}{#1}%
}%
}
\DeclareFieldFormat{journaltitle}{\usebibmacro{string+doiurlisbn}{\mkbibemph{#1}}}