2

I want to achieve the following behavior using a custom footnote citation style for the second and subsequent occurrence of a citation within a document:

LaTeX:

Sample Text\footcite{foo}. Some more dummy text.\footcite{bar} Lorem ipsum\footcite{foo}.

Output:

Sample Text^1. Some more dummy text.^2 Lorem ipsum^3.

With the following footnote content:

^1 Standard output of the \cite command for entry foo as defined in the style.

^2 Standard output of the \cite command for entry bar as defined in the style.

^2 See fn. 1.

And if possible it would be great if this behavior would also apply to a \footcites command which includes a yet cited bib entry.

I hope my question became clear enough and that my research on this topic, which yielded zero hits, was comprehensive.

moewe
  • 175,683
  • Welcome to TeX.SX! Your general question is quite clear, but you are quite short on details. Do you want to modify an existing style? Would you be OK switching to a new style? What are the further requirements for your style? What do you have so far? – moewe May 06 '17 at 06:04

1 Answers1

2

biblatex already has some styles that implement a behaviour like this: verbose-note and verbose-inote.

\documentclass[british]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[backend=biber,style=verbose-note]{biblatex}
\addbibresource{biblatex-examples.bib}

\begin{document}
  Lorem\autocite{sigfridsson}
  ipsum\autocite{worman}
  dolor\autocite{cicero}       
  sit\autocite{sigfridsson}       
  amet\autocite{sigfridsson}

  \printbibliography
\end{document}

footnotes of MWE


The infrastructure needed is a macro that saves the footnote number

\newbibmacro*{footcite:save}{%
  \csxdef{cbx@f@\thefield{entrykey}}{\the\value{instcount}}%
  \label{cbx@\the\value{instcount}}}

This macro needs to be executed at the very first citation of a work (and only then).

And then a macro that utilises this, the relevant parts of footcite:note are

  \printtext{%
    \bibstring{seenote}\addnbspace
    \ref{cbx@\csuse{cbx@f@\thefield{entrykey}}}%
    \iftoggle{cbx:pageref}
      {\ifsamepage{\the\value{instcount}}
                  {\csuse{cbx@f@\thefield{entrykey}}}
         {}
         {\addcomma\space\bibstring{page}\addnbspace
          \pageref{cbx@\csuse{cbx@f@\thefield{entrykey}}}}}
      {}}

(All copied from verbose-note.cbx.)

moewe
  • 175,683
  • +1. :-) On a completely different subject: May I ask you to take a look at this posting and decide if it's possible to provide a biblatex-based solution? Thanks. – Mico May 06 '17 at 14:51
  • @Mico Seems to be more or less standard biblatex behaviour. I have attempted an answer, but I'm not sure if I overlooked something. – moewe May 06 '17 at 15:20
  • Thanks so much! Let's see if the OP weighs in with further information. :-) – Mico May 06 '17 at 15:30