3

I am using Biblatex, Biber backend, and autocite for all of my references. I found this question (Biblatex: footnote citations. Two references to footnote in same slide), but it was never answered and didn't seem to be asking the exact question I want answered

I want to be able to refer to a footnote by its number. The code I tried looked like this:

What I am talking about.\autocite[\label{bar}Pre-note][Post note][foo2000]

As you see in footnote \ref{bar}, that thing is great.

The output would look like:

That thing I am talking about.1

As you see in footnote 1, that thing is great.

1 Pre-note von Foobar, A. 2000. Journal of Spam. Post note

fIt is possible to get something like that, using

\footnote{\label{bar} \autocite{foo2000}}

but it creates a whole host of formatting problems down the road.

EDIT: Here is the non-working code EDIT2: Fixed the non-standard reference, and added babel

\begin{filecontents}{testbib.bib}
@book{CITE,
title = {Book's title},
author = {Author, Some},
location = {The City},
publisher = {Publisher},
date = {2005},
}
\end{filecontents}

\documentclass{article}


\usepackage[english]{babel}

\usepackage[backend=biber,autocite=footnote, notes]{biblatex-chicago}
\usepackage{hyperref}

\newcommand{\activeref}[1]{\phantomsection\label{#1}}
\addbibresource{testbib.bib} %Adds the Bibliography File

\begin{document}

Some text.\autocite[][]{CITE}

Some text.\autocite[\label{label1}][]{CITE}

That was right, see footnote \ref{label1}.

\end{document}
  • 1
    Welcome to TeX.SX! Would you please add a minimal document showing the issue? In particular, the options to biblatex seem important to see. – egreg Dec 8 '15 at 23:32
  • Some styles save the first footnote of a citation for later use, that could be accessed. Are you only interested in the first citation of a work, or do you want to be able to refer to any citation? – moewe Dec 9 '15 at 7:18
  • No, unfortunately. I need to be able to refer to the footnote itself. Ultimately what I am trying to do is create a macro that will support the "Active Citations" format (princeton.edu/~amoravcs/library/latex.pdf The example in the link is unruly, and does not lend itself to automation). To do that I would ideally be able to link back to the actual footnote. There is another work around I found where I put the label in a \phantomsection, but that doesn't take you back to the note, itself. – The Pompitous of Love Dec 10 '15 at 0:57
  • Those instructions are ill-conceived in so many ways. Did anybody consider testing them? – cfr Dec 10 '15 at 2:26
  • The code obviously won't work for us because we do not have ../../CommonDocs/BasicPackages. Please edit it so that it does not require non-standard files. – cfr Dec 10 '15 at 2:32
3

If I understand you right, you want to be able to reference that a special document was cited in a special footnote.

Your given command \activeref is not used in your code, I commented it.

I added three bib entrys and added more references to show that it compiles for more than one reference.

The trick in your case is to use command \protect to save the command \label to be expanded at once: \autocite[\protect\label{label1}][]{CITE}

Please see the following MWE

\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@book{CITE,
  title     = {Book's title},
  author    = {Author, Some},
  location  = {The City},
  publisher = {Publisher},
  date      = {2005},
}
@Book{goossens,
  author    = {Goossens, Michel and Mittelbach, Frank and 
               Samarin, Alexander},
  title     = {The LaTeX Companion},
  edition   = {1},
  publisher = {Addison-Wesley},
  location  = {Reading, Mass.},
  year      = {1994},
}
@Book{adams,
  title     = {The Restaurant at the End of the Universe},
  author    = {Douglas Adams},
  series    = {The Hitchhiker's Guide to the Galaxy},
  publisher = {Pan Macmillan},
  year      = {1980},
}
@article{einstein,
  author  = {Albert Einstein},
  title   = {{Zur Elektrodynamik bewegter Körper}. ({German}) 
             [{On} the electrodynamics of moving bodies]},
  journal = {Annalen der Physik},
  volume  = {322},
  number  = {10},
  pages   = {891--921},
  year    = {1905},
  DOI     = {http://dx.doi.org/10.1002/andp.19053221004},
}
\end{filecontents*}


\documentclass{article}

\usepackage[utf8]{inputenc} % <================================ for biber
\usepackage[english]{babel}

\usepackage{csquotes} %<======================================= for biber
\usepackage[backend=biber,autocite=footnote,notes]{biblatex-chicago}
\usepackage{hyperref}

%\newcommand{\activeref}[1]{\phantomsection\label{#1}} % <===== ????????
\addbibresource{\jobname.bib} %Adds the Bibliography File


\begin{document}

Some text.\autocite[][]{CITE}

Some text two.\autocite[\protect\label{label1}][]{CITE}
%                       ^^^^^^^^

Some text three.\autocite[\protect\label{label2}][]{goossens}

Some text four.\autocite[\protect\label{label3}][]{adams}

Some text five.\autocite[\protect\label{label4}][]{einstein}

That was right, see footnote~\ref{label1} (label1), footnote~\ref{label3} (label3), 
footnote~\ref{label4} (label4) and footnote~\ref{label2} (label2). 

\printbibliography
\end{document}

and the result:

enter image description here

  • Amazing! Thank you. I had given up on ever resolving this. – The Pompitous of Love May 12 '16 at 14:40

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.