[Tex/LaTex] Natbib: Display hyperlinked author-year part in \citet and \citep using numerical (superscripted) option

hyperrefnatbib

I want to display an hyperlinked author-year citation with the super option in the natbib package like this:

\citet : Lancaster et al. (1999) (19)
\citep : (Lancaster et al., 1999) (19)

With \usepackage[round,super]{natbib}, only citation number (here for example :(19)) is hyperlinked. I want to display an hyperlink on both author-year and number whether I use textual (\citet) or parenthesized (\citep) citation.

Here's an MWE:

enter image description here

\documentclass[12pt,a4paper,english,french]{article} %% use 'article' so that output fits on one page
\usepackage{filecontents}
\begin{filecontents}{Bibliob.bib}
@article{Lancaster99,
   title={A new approach to {MSEs} Management},
   author={Lancaster, James R. and Drauster, Mikael F. and Logan, Richard},
   journal={Journal of International Research on Management},
   volume={74},
   number={2},
   pages={132-157},
   year={1999},
   publisher={JSTOR}
}
\end{filecontents}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[frenchb]{babel}
\usepackage[round,super]{natbib}
\usepackage[colorlinks=true, linkcolor=blue, citecolor=blue]{hyperref}

\begin{document}
Textual citation:~\citep{Lancaster99}

Parenthesized citation:~\citet{Lancaster99}

\bibliographystyle{plainnat}
\bibliography{Biblio}  
\end{document} 

Is that possible to get the display I want ?

Best Answer

The solution comes in two parts. First, in order to make the name and year information part of the hyperlink, we add the code provided by @Audrey in her answer to the posting How to hyperlink name part in \citet using natbib numerical and hyperref. Second, we define two new macros, called (not very creatively, I'm afraid) \mycitet and \mycitep, which mimic the behavior of \citet and \citep in the authoryear citation style, but with the addition of the superscripted entry number.

enter image description here

\documentclass[12pt,a4paper,english,french]{article} %% use 'article' so that output fits on one page
\usepackage{filecontents}
\begin{filecontents}{Bibliob.bib}
@article{Lancaster99,
   title={A new approach to {MSEs} Management},
   author={Lancaster, James R. and Drauster, Mikael F. and Logan, Richard},
   journal={Journal of International Research on Management},
   volume={74},
   number={2},
   pages={132-157},
   year={1999},
   publisher={JSTOR}
}
\end{filecontents}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[frenchb]{babel}
\usepackage[round,super]{natbib}

%% The following lines are straight from https://tex.stackexchange.com/a/76075/5001
\usepackage{etoolbox}
\makeatletter
\patchcmd{\NAT@test}{\else \NAT@nm}{\else \NAT@hyper@{\NAT@nm}}{}{}
\makeatother

\usepackage[colorlinks=true, citecolor=blue]{hyperref}

%% Provide custom macros to mimic the look created by \citet and \citep
\newcommand{\mycitet}[1]{\citeauthor{#1} (\citeyear{#1}) \citep{#1}}
\newcommand{\mycitep}[1]{(\citeauthor{#1}, \citeyear{#1}) \citep{#1}}

\begin{document}
\mycitet{Lancaster99}

\mycitep{Lancaster99}

\bibliographystyle{plainnat}
\bibliography{Biblio}  
\end{document}