I am writing a thesis where I use natbib and bibtex for my citations which are displayed as numbered items with square brackets: e.g. [1], [2,3,4]
Here we go with a MWE of what I currently have:
\documentclass[10pt]{article}
\setlength\parindent{0pt}
\usepackage{hyperref}
\usepackage[square,numbers]{natbib}
\begin{document}
A single citation: \cite{M} \\
Multiple citations: \cite{M,K,T} \\
Page ref. example: \citep[p. 10]{B} \\
As shown by \citet{M,K} or also by \citet{B} \\
\begin{thebibliography}{9}
\bibitem[Me(2006)]{M} Me: My book related to the problem (2006), 145 p.
% The new line is important!
\bibitem[Karl(2005)]{K} Karl: Karl's paper published in some minor proceedings,
a local conferrence organized by his university (2005), 23--25.
% The new line is important!
\bibitem[Test(2013)]{T} Test. A test paper,
Conf. of testing (2013), 99.
% The new line is important!
\bibitem[Someone(2013)]{B} Someone, a nice book,
A good publisher (2013).
% The new line is important!
\end{thebibliography}
\end{document}
Apart from the reference section this generates the following output:
A single citation: [1]
Multiple citations: [1, 2, 3]
Page ref. example: [4, p. 10]
As shown by Me [1], Karl [2] or also by Someone [4]
In view of adding the capability to show a popup with bibliographic information upon hovering with the mouse over each of the reference items (see description here), I am looking for a way to modify the citation commands in order to add this popup functionality via the fancytooltips package.
For commands where I cite a single reference this is easy:
\let\oldcite\cite
\renewcommand{\cite}[1]{\tooltip{\oldcite{#1}}{#1}}
However, when I cite multiple items in one single cite command (or citet, etc.) my approach fails. What I would need is to get access to the command which generates each individual reference (i.e. the number itself with the corresponding link to the references section) and modify it accordingly, i.e.
\let\oldCommandInQuestion\CommandInQuestion
\renewcommand{\CommandInQuestion}{\tooltip{\oldCommandInQuestion{#1}}{#1}}
Where \CommandInQuestion would be the command generating each number inside the square brackets and would pass the citekey as first argument. If at all this exists?!?
I've been trying to decipher what is inside natbib.sty but without success. Further I was looking at the etoolbox package on how I could modify certain commands but my primary issue is that I don't know which is the command in question...if at all it exists.
Thanks a lot for your inputs!
Fab
PS: I am looking for a specific solution for my configuration (natbib and bibtex).