2

I feel like I'm missing something simple, but I can't manage to write a macro to manually add an entrykey to the list of tracked entries in biblatex such that \ifciteseen will be true.

What am I doing wrong?

\documentclass{article}
\usepackage[style=verbose,citetracker=true]{biblatex}
\addbibresource{biblatex-examples.bib}
\makeatletter
\def\sbl@blx@trackentry@global#1{%
  \ifbool{citetracker}
    {\xifinlistcs{#1}{blx@bsee@\the\c@refsection}
       {}
       {\listcsxadd{blx@bsee@\the\c@refsection}{#1}}}
    {}}
\let\trackentry\sbl@blx@trackentry@global
\def\showtrackedentries{\csshow{blx@bsee@\the\c@refsection}}
\makeatother
\begin{document}
\trackentry{augustine}

\showtrackedentries

\cite{augustine}

\showtrackedentries

\cite{augustine}

\showtrackedentries
\end{document}
1

biblatex detokenizes entry keys, so the test fails unless the argument to \trackentry is run through \blx@xsanitizeafter. This works:

\def\sbl@blx@trackentry@global#1{%
  \ifbool{citetracker}
    {\blx@xsanitizeafter{\def\sbl@blx@tempa}{#1}%
     \xifinlistcs{\sbl@blx@tempa}{blx@bsee@\the\c@refsection}
       {}
       {\listcsxadd{blx@bsee@\the\c@refsection}{\sbl@blx@tempa}}}
    {}}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.