# Hyperlink year only on citeA command

I'm using apacite and both cite{author} and citeA{author} commands. When using cite{author}, both author and year are hyperlinked and this is fine.

But when using citeA{author}, i would like the year only to be hyperlinked. Here is a screenshot of citeA{tulving1972, tulving1995} :

I would like the author name (tulving) to be in black like the rest of the text. However, when using cite{} i would like both names and year to be hyperlinked.

found this answer but couldnt manage to adapt it to make it work with citeA{} (note citea{}

Any help ?

This turns out to be a lot easier than with the natbib solution. I haven't tested all the other cite commands but this seems to work properly for \citeA and \cite.

\begin{filecontents}{\jobname.bib}

Journal = {Natural Language \& Linguistic Theory},
Pages = {1-32},
Title = {From Old French to the Theory of Pro-Drop},
Volume = {5},
Year = {1987}}

Journal = {Linguistic Inquiry},
Pages = {305-313},
Title = {Government of Empty Subjects in Factive Clausal Complements},
Volume = {16},
Year = {1985}}

@book{Chomsky1986,
Author = {Noam Chomsky},
Publisher = {{MIT} Press},
Title = {Barriers},
Year = {1986}}

\end{filecontents}
\documentclass{article}

\usepackage{apacite}
\bibliographystyle{apacite}

\usepackage{etoolbox}

\makeatletter

\newif\if@citeA
\pretocmd{\citeA}{\@citeAtrue}{}{}
\def\@ifauthorsunequalc@de#1{%
\if@F@cite
\@F@citefalse
\else
\if@Y@cite
{\@BAY}%
\fi
{\@BBC}%
\fi
\edef\@cite@undefined{?}%
\def\BBA{\@BBA}%
\if@A@cite
\if@citeA
{\csname b@\@citeb\APAC@extra@b@citeb\endcsname}%
\@citeAfalse
\else
{\csname b@\@citeb\APAC@extra@b@citeb\endcsname}%
\fi
\if@Y@cite
{\@BBAY}%
\fi
\fi
\if@Y@cite
{\csname Y@\@citeb\APAC@extra@b@citeb\endcsname}%
\fi
\let\BBA\relax
}
\makeatother

\begin{document}

\noindent