[Tex/LaTex] biblatex: is there a command analogous to \ifciteseen but within one page


Biblatex is loaded as


I am looking for an if-command, which would do the same job as \ifciteseen does, but only for the current page.

The idea is to test if some source has been cited already on the current page and, depending on the result, change the citation. For instance, if I want to produce a footnote only upon the first citation on the current page, I could do

{% yes, do nothing
{% no, do smth

I am aware of \iffirstonpage and \ifsamepage but cannot figure out if they can be of any help here and how.

Best Answer

The counter instcount uniquely identifies a citation or item in the bibliography/list of shorthands. The test \ifsamepage{<inst1>}{<inst2>}{<true>}{<false>} expands <true> if the two citations/items identified by the instcount values <inst1> and <inst2> are found on the same page.

In your test we need to compare the current value (\value{instcount}) with the value of instcount the last time the current entry was cited. In general this is not the value of instcount in the last citation (i.e. \value{instcount}-1). AFAIK you'll have to track the last instcount value for each entry with some additional code.

The example below demonstrates how this can be done using a citation format considered in a previous post. It relies on some commands from etoolbox and requires additional passes to get the tests right.


% Essentially verbatim from Joseph Wright (except for refinements to \ifciteseen test)
% http://www.texdev.net/2010/03/08/biblatex-numbered-citations-as-footnotes/

     {\BibliographyWarning{Ignoring prenote argument}}%
     {\BibliographyWarning{Ignoring postnote argument}}}





First citation.\superfootcite{bertram}
First citation.\superfootcite{companion}
Some recurrent citations on same page.\superfootcite{bertram,companion,augustine}
Recurrent citation on different page.\superfootcite{companion}
Recurrent on different page and first citations.\superfootcite{augustine,cicero}
Recurrent citation on same page.\superfootcite{companion}

Here are the citations from the first page:

enter image description here

And from the second:

enter image description here