I'm using biber and want to cite references inside a tikzpicture. I followed this answer that described how to do it with bibtex and it works nicely, but when switching to use biber, it doesn't work anymore:
\documentclass{article}
\usepackage{tikz}
\usepackage[backend=biber]{biblatex}
\begin{document}
\begin{tikzpicture}[show/.style={circle,draw}]
\node[show] (newpaper) at (0,2)
[label=right:{This 2011 paper ...}]
{\cite{newpaper}};
\node[show] (oldpaper) at (0,0)
[label=right:{This paper came out in 1900 ...}]
{\cite{oldpaper}};
\draw[->] (oldpaper) -- (newpaper);
\end{tikzpicture}
%\bibliographystyle{amsplain}
\begin{thebibliography}{10}
\bibitem{newerpaper}B. Becker, \emph{Even Newer Stuff}, 2012.
\bibitem{newpaper}C. Charles, \emph{New Stuff}, 2011.
\bibitem{oldpaper}H. Huckley, \emph{Old Stuff}, 1900.
\end{thebibliography}
\end{document}
Does anyone know of a solution without me having to switch to use bibtex?
UPDATE:
As noted by several below, my original code I posted was an easy fix. The actual bug I found was a result of my larger LaTeX code and I found the issue. Here's the updated code that has the issue:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{external}
\tikzexternalize[prefix=fig/]
\usepackage[backend=biber]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{newerpaper,
author={B. Becker},
title={Even Newer Stuff},
date={2012}
}
@book{newpaper,
author={C. Charles},
title={New Stuff},
date={2011}
}
@book{oldpaper,
author={H. Huckley},
title={Old Stuff},
date={1900}
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
%\tikzexternaldisable
\begin{tikzpicture}[show/.style={circle,draw}]
\node[show] (newpaper) at (0,2)
[label=right:{This 2011 paper ...}]
{\cite{newpaper}};
\node[show] (oldpaper) at (0,0)
[label=right:{This paper came out in 1900 ...}]
{\cite{oldpaper}};
\draw[->] (oldpaper) -- (newpaper);
\end{tikzpicture}
%\tikzexternalenable
\printbibliography
\end{document}
The problem is with the \tikzexternalize[prefix=fig/] command. I got around this issue by adding \tikzexternaldisable before the tikzpicture and \tikzexternalenable after the tikzpicture.


addbibresource? – gusbrs Jul 12 '17 at 19:02biblatexbut your bibliography is done by hand? If' you're really doing things by hand, then don't usebiblatex. If you're really usingbiblatexdelete your hand-done bibliography and replace it with\printbibliography, tellbiblatexwhere to find your.bibfile (using\addbibresource) and letbiblatexdo the work. See biblatex in a nutshell (for beginners). – Alan Munn Jul 12 '17 at 19:03\usetikzlibrary{external}if you are "getting around it" with\tikzexternaldisablein the only tikz drawing you have? – gusbrs Jul 12 '17 at 20:16-shell-escape. But it's long ago, so I'm not really sure what my reasoning was. – gusbrs Dec 16 '18 at 19:07