Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm writing a document where I'm using biblatex (with BibTeX as back-end). In my document I would like to have citations as footnotes, "normal" footnotes containing text and at the end a consolidated bibliography of the references my document contains.

There is only one, quite small, issue. I would like the final bibliography to also display the footnote number associated with the citation. How do I accomplish that?

The references at the end should then appear as:

(footnote number) (author) (title) (year)

Here's a simple example of my problem:

Generated document: http://fuskbugg.se/dl/ySqEUE/test.pdf

\documentclass[a4paper,12pt]{article}

\usepackage[style=verbose]{biblatex}

\usepackage{filecontents}

\begin{filecontents}{test.bib}
    @book{Foo,
        title={Book title1},
        author={Author1},
        year= {Year1},
    }
    @book{Bar,
        title={Book title2},
        author={Author2},
        year= {Year2},
    }
\end{filecontents}

\addbibresource{test.bib}

\begin{document}

This is some text\footcite{Foo}, with\footnote{"Normal" footnotes also appear.} footnotes.\footcite{Bar}

\newpage

How can I make the footnote number associated with the reference be printed along with the reference? (First entry should be numbered 1 and second numbered 3.)

\printbibliography

\end{document}
share|improve this question
    
Welcome to TeX.sx! Is there a special reason why you are using BibTeX instead of Biber? It appears you are using an outdated version of biblatex. The newer version of biblatex (2.x) has the default option backend=biber. To help you more effective I recommend that you have a updated LaTeX distribution. –  Marco Daniel Sep 23 '12 at 17:23
    
What will happen if you use \footcite{foo} more often? How do you expect the output in the references? –  Marco Daniel Sep 23 '12 at 17:28
    
@MarcoDaniel I guess the OP wants the number of the first footnote. –  lockstep Sep 23 '12 at 17:29
    
@lockstep: And the option \nocite isn't explained here ;-). I think the question might become really complex. –  Marco Daniel Sep 23 '12 at 17:31
    
@MarcoDaniel 1. I'm using bibtex for no special reason. I just started writing a document and bibtex seemed to work just fine. 2. Multiple citations of the same source is an interesting issue. I'm pretty much neutral on this issue but I'm kinda leaning towards that multiple occurrences in the bibliography would be the best solution. (the solution presented by lockstep is good though) 3. As for \nocite that's nothing I have utilized. –  user19051 Sep 24 '12 at 18:26
add comment

1 Answer

up vote 5 down vote accepted

The following must be done:

  • Amend the cite:full bibmacro so that it will also store the current footnote number in a new macro whose name uses the entrykey of the current entry;

  • Use the numeric bibstyle and the option sorting=none;

  • Change the labelnumber format so that it displays the meaning of the "footnote number" macro of the current entry.

Note that the bibliography "labels" will be ambiguous if you cite several entries for the first time in the same footnote.

(EDIT: The OP stated that he/she uses BibTeX as backend, but the current biblatex version [2.2] willl by default [as in the OP's MWE] use Biber. That said, the following solution will also work with BibTeX if one adds the appropriate backend=bibtex package option.)

\documentclass[a4paper,12pt]{article}

\usepackage[citestyle=verbose,bibstyle=numeric,sorting=none]{biblatex}

\makeatletter

\renewbibmacro*{cite:full}{%
  \usebibmacro{cite:full:citepages}%
  \printtext[bibhypertarget]{%
    \usedriver
      {\DeclareNameAlias{sortname}{default}}
      {\thefield{entrytype}}}%
%  \usebibmacro{shorthandintro}}% DELETED
  \usebibmacro{shorthandintro}% NEW
  \csxdef{cbx@\thefield{entrykey}@footnotenumber}{\the\value{footnote}}% NEW
}% NEW

\DeclareFieldFormat{prefixnumber}{}
\DeclareFieldFormat{labelnumber}{\csuse{cbx@\thefield{entrykey}@footnotenumber}}

\makeatother

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
    @book{Foo,
        title={Book title1},
        author={Author1},
        year= {Year1},
    }
    @book{Bar,
        title={Book title2},
        author={Author2},
        year= {Year2},
    }
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}

\null\vfill% just for the example

This is some text\footcite{Foo}, with\footnote{"Normal" footnotes also appear.}
footnotes.\footcite{Bar}

How can I make the footnote number associated with the reference be printed along
with the reference? (First entry should be numbered 1 and second numbered 3.)

\printbibliography

\end{document}

enter image description here

share|improve this answer
    
I try your solutions, but with error: File 'filecontents.sty' not found. How can they fix it? –  jafan Sep 23 '12 at 17:50
    
@jafan a) Remove all auxiliary files and compile again. b) Be sure to compile my example as-is. –  lockstep Sep 23 '12 at 17:52
    
Without effect. a) copy your solution b) cmd> xelatex exam.tex -> error File 'filecontents.sty' not found. Should I create yet another file? –  jafan Sep 23 '12 at 17:58
    
@lockstep Thank you! This solution works great. You really did me a favour there. –  user19051 Sep 24 '12 at 18:29
    
@jafan " 'filecontents.sty' not found." Almost certainly means that the package filecontents is not installed on your computer. –  user19051 Sep 24 '12 at 18:32
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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