Override default cite tooltip
I'm trying to add a tooltip to each inline citation. So far I've almost
got it working using pdfcomment:
\documentclass{article}
\usepackage[colorlinks=true]{hyperref}
\usepackage{pdfcomment}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{Bli74,
author = {Blinder, Alan S.},
year = {1974},
title = {The economics of brushing teeth},
}
\end{filecontents}
![enter image description here][1]
\usepackage{usebib}
\bibinput{\jobname}
\makeatletter
\let\@internalcite\cite
\renewcommand{\cite}[1]{%
\pdftooltip{\@internalcite{#1}}{\usebibentry{#1}{title}}}
\makeatother
\begin{document}
This is a citation: \cite{Bli74}.
\bibliographystyle{apalike}
\bibliography{\jobname}
\end{document}
But there seems to be a default tooltip because of the link in the
citation "Go to page 1" in my mac's Preview.app. I see that my custom
tooltip is working but only on the thin boundary of the citation
(including the little brackets).
Is there a way to redefine the cite command to avoid this tooltip and use
just my custom tip for the entire citation?
Meanwhile, I would also like to handle multiple citations:
\cite{thing1,thing2}. How can I extract (split on comma) and add tooltips
to both thing1 and thing2?
No comments:
Post a Comment