
Here is an Asymptote example of cited references with hyperref links, c.tex,
with attached texbooks.bib file:
\begin{filecontents*}{texbooks.bib}
@Book{TeXbook,
author = {Knuth, Donald},
title = {The TeXbook},
publisher = {Addison-Wesley},
year = {1986},
address = {Reading, Mass},
isbn = {0201134470}
}
@Book{MFbook,
author = {Knuth, Donald},
title = {The METAFONTbook},
publisher = {Addison-Wesley},
year = {1986},
address = {Reading, Mass},
isbn = {0201134454}
}
@Book{Goossens:1994,
author = {Goossens, Michel},
title = {The LaTeX companion},
publisher = {Addison},
year = {1994},
address = {Reading, Mass},
isbn = {0201541998}
}
@Book{Karow:1994font,
author = {Karow, Peter},
title = {Font technology : methods and tools},
publisher = {Springer-Verlag},
year = {1994},
address = {Berlin New York},
isbn = {3540572236}
}
@Book{Knuth:1999digital,
author = {Knuth, Donald},
title = {Digital typography},
publisher = {CSLI Publications},
year = {1999},
address = {Stanford, Calif},
isbn = {1575860104}
}
\end{filecontents*}
%
\documentclass{article}
\usepackage{lmodern}
\usepackage{natbib}
\usepackage[svgnames]{xcolor}
\usepackage[inline]{asymptote}
\usepackage[colorlinks=true,citecolor=DarkBlue]{hyperref}
\begin{document}
\begin{figure}
\begin{asy}
size(300);
string[] citeName={
"MFbook",
"TeXbook",
"Goossens:1994",
"Karow:1994font",
"Knuth:1999digital"
};
pen p=orange+1.3pt;
real w=90;
draw(Label("\hbox to "+string(w)+"pt{\cite{"+citeName[0]+"}}",(-3w,w)),ellipse,p);
draw(Label("\hbox to "+string(w)+"pt{\cite{"+citeName[1]+"}}",(0,0)),ellipse,p);
draw(Label("\hbox to "+string(w)+"pt{\cite{"+citeName[2]+"}}",(3w,w)),roundbox,p);
draw(Label("\hbox to "+string(w)+"pt{\cite{"+citeName[3]+"}}",(-3w,-w)),ellipse,p);
draw(Label("\hbox to "+string(w)+"pt{\cite{"+citeName[4]+"}}",(3w,-w)),roundbox,p);
\end{asy}
\caption{Some citations in a figure. Inline \texttt{Asymptote} example.}
\end{figure}
\bibliographystyle{agsm}
\bibliography{texbooks}
\end{document}
To process it with latexmk, create file latexmkrc:
sub asy {return system("asy '$_[0]'");}
add_cus_dep("asy","eps",0,"asy");
add_cus_dep("asy","pdf",0,"asy");
add_cus_dep("asy","tex",0,"asy");
and run latexmk -pdf c.tex.
\captioncontains a fragile command -\citein this case. Use\protect\cite. See\citein captionbeameror\citein caption oflistings. Also, as reference, see What is the difference between Fragile and Robust commands? – Werner Jun 26 '13 at 23:43\label-\refsystem to reference a figure. – Werner Jun 26 '13 at 23:52\citecan be used anywhere in a document, even in a figure. In moving arguments you use\protect\cite. – Werner Jun 27 '13 at 00:04