4

After googling for a while, I decided to ask this question on here..

I am desperately trying to make a citation inside a figure (using BibLaTeX and the footnote-dw style [the sources are added as footnotes]), but I cannot figure out how to properly achieve this. Basically I want to do something like this:

test.tex

\documentclass{book}
\usepackage[style=footnote-dw]{biblatex}
\usepackage{graphicx}
\usepackage{hyperref}
\bibliography{bibliography}
\begin{document}
\begin{figure}
    \includegraphics[width=0.95\textwidth]{pics/somepicture.png}
    \caption{My Caption\cite{wikipedia-de-visitor}}
\end{figure}
foobar\cite{wikipedia-de-visitor}
\end{document}

While the first \cite gives

pdfTeX warning (dest): name{Hfootnote.1} has been referenced but does
not exist, replaced by a fixed one

the second (not withing the figure) works just as expected.


Edit:

bibliography.bib resides in the same dir as the .tex file and contains:

@misc{wikipedia-de-visitor,
url="http://de.wikipedia.org/wiki/Besucher_(Entwurfsmuster)"
}

Commands used to "compile" are:

pdflatex test
biber test
pdflatex test
pdflatex test

Edit 2:

Changed the questions title (and part of the body) to reflect the facts offered by Ulrike Fischer.

PS: sorry for my bad english

Marco Daniel
  • 95,681
Tobias Heinicke
  • 193
  • 1
  • 11
  • We need a minimal working example. This just can not work because the biblatex needs to know where the bibliography is. You need /addbibresource{path/to/bib/file.bib}. – aignas Mar 11 '13 at 15:45
  • I forgot to add the bib-entry: "@misc{wikipedia-de-visitor, url="http://de.wikipedia.org/wiki/Besucher_(Entwurfsmuster)" }" – Tobias Heinicke Mar 11 '13 at 15:45
  • Thats the sample content from bibliography.bib (in the same folder as the .tex-file) .. – Tobias Heinicke Mar 11 '13 at 15:46
  • 1
  • 3
    footnotes in floats doesn't work easily: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=footintab. – Ulrike Fischer Mar 11 '13 at 15:53
  • While his MWE doesn't show it, maybe all he wants to do is to put the cite in the figure caption, which is doable. (Of course, then he has to worry about renumbering the references if he has a list of figures, for which the remedy is \usepackage{notoccite}) I'm merely allowing for the fact that his reputation might indicate relatively recent introduction to LaTeX. – Steven B. Segletes Mar 11 '13 at 16:08
  • @StevenB.Segletes thats exactly what I want to do, sorry if I missed the point of describing my matter correctly. In fact I have some figures in my LaTeX document, which I want to cite the same way I do with the rest of the text. To give a more concrete example:\begin{figure}[H] \centering \includegraphics[width=0.95\textwidth]{pics/factory.png} \caption{Factory Beispiel}\cite{oodesign-factory} \label{Factory Beispiel} \end{figure} – Tobias Heinicke Mar 11 '13 at 16:14
  • I edited my questions to hopefully reflect my use case more precisely. – Tobias Heinicke Mar 11 '13 at 16:20
  • @StevenB.Segletes: The problem is not the toc, the problem is that (due to the footnote-dw style) \cite is actually a footnote. And footnotes in floats can't excape to the bottom of the page. – Ulrike Fischer Mar 11 '13 at 16:29
  • @StevenB.Segletes Thanks for your answers. I have done that (in fact it was this way, before I tried differently, sorry to not have mentioned it). It seems that I can place the \cite everywhere - as long as it is inside the figure-environment it will not compile. – Tobias Heinicke Mar 11 '13 at 16:29
  • @UlrikeFischer Thanks for your answer, too. I changed my code and removed the style and instead added \printbibliography at the end of my document, and now everything seems to be ok. But is there really no way to get a seamless integration of figure-citation into my bibliography, without changing my style? – Tobias Heinicke Mar 11 '13 at 16:33
  • @TobiasH: Use a minipage. See the FAQ. – Ulrike Fischer Mar 11 '13 at 16:42
  • @UlrikeFischer I changed my question according to your comments. – Tobias Heinicke Mar 11 '13 at 16:43
  • @UlrikeFischer When I try to nest the figure environment in a minipage environment I get the error Not in outer par mode.. – Tobias Heinicke Mar 11 '13 at 16:52
  • 1
    Do it the other way round: Put the figure environment around the minipage (and the graphic and the \caption inside the minipage). – Ulrike Fischer Mar 11 '13 at 17:07
  • That works but does look rather ugly.. Based on your comments I did another google search and came up with this question, where the author explained howto properly use \footnotemark & \footnotetext in this context to achieve what I want. I am using now this solution. Thanks. Resulting code: \begin{figure} \includegraphics[width=0.95\textwidth]{pics/factory.png} \caption[a figure]{Factory Beispiel\footnotemark} \end{figure} \footnotetext{\fullcite{wikipedia-de-visitor}.} – Tobias Heinicke Mar 11 '13 at 17:41
  • If somebody answers my question I will accept this solution (being a new user of this service I am not able to answer my own question). – Tobias Heinicke Mar 11 '13 at 17:42

1 Answers1

5

Based on the facts added by UlrikeFischer I did another Google search and came up with this post: BasicallyTheSameQuestion

The author suggested to use \footnotetext{\fullcite{<key>}.} that did the trick for me.

The resulting code snippet is something like the following:

\begin{figure} 
   \includegraphics[width=0.95\textwidth]{pics/somepicture.png}
   \caption[a figure]{My Caption\footnotemark} 
\end{figure} 
\footnotetext{\fullcite{wikipedia-de-visitor}.}
Tobias Heinicke
  • 193
  • 1
  • 11