[Tex/LaTex] looking for equivalent to natbib’s `\citepalias` in biblatex with active links using \hypersetup

biblatexhyperreflinksnatbibpdf

I recently made the switch from natbib to biblatex. I've been using \hypersetup to make active links with natbib––it helps me navigate my document as I am working on it (see below for example).

\citepalias and \citeauthor does not generate hyperlinks when used under biblatex. biblatex's \citet and \citep works great, but my homemade (i.e. using \citepalias) ibid. doesn't generate hyperlinks (I solved the striked part, see update below).

Is there a better way to get active links with biblatex?

natbib half ass

Here is a small example using the LaTeX below in a file called `main.tex’

\begin{filecontents}{\jobname.bib}
@book{veblen1919place,
  title={The Place of Science in Modern Civilisation: and other essays},
  author={Veblen, Thorstein},
  year={1919},
  publisher={BW Huebsch}
}
@book{veblen2007theory,
  title={The theory of the leisure class},
  author={Veblen, Thorstein},
  year={2007},
  publisher={Oxford University Press},
 url = {http://www.test.org}
}
\end{filecontents}

\documentclass{article}

\usepackage[style=authoryear, natbib=true, backend=bibtex]{biblatex}


\usepackage{hyperref}
            \hypersetup{
          pdfborderstyle={/S/U/W 1} % thanks, https://tex.stackexchange.com/a/26085/22939
                         }

\addbibresource{\jobname.bib}

\begin{document}

 \defcitealias{veblen1919place}{ibid.:~}     

\noindent 
As \citeauthor*{veblen2007theory} has argued \citep[12--19]{veblen1919place} it is clear that $y$. Second,  \citet[12]{veblen1919place} also show $m$ and $x$ \citepalias[37]{veblen1919place}.

\printbibliography
\end{document}

Update 2015-02:06 23:34:18Z

With the help of this answer (and this for title) I’ve solved my issue with \citeauthor.

Here iss the code

\DeclareCiteCommand{\citeauthor}
  {\boolfalse{citetracker}%
   \boolfalse{pagetracker}%
   \usebibmacro{prenote}}
  {\ifciteindex
     {\indexnames{labelname}}
     {}%
   \printtext[bibhyperref]{\printnames{labelname}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

  \DeclareCiteCommand{\citetitle}
  {\boolfalse{citetracker}%
   \boolfalse{pagetracker}%
   \usebibmacro{prenote}}
  {\ifciteindex
     {\indexfield{indextitle}}
     {}%
   \printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

Look after update
after update

Best Answer

biblatex's natbib-like commands \citepalias and \citetalias (whose definitions can be found in blx-natbib.def) can be turned into hyperlinked versions just as easily as the other commands

\makeatletter
\DeclareCiteCommand{\citetalias}
  {\usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \printtext[bibhyperref]{\@citealias{\thefield{entrykey}}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\DeclareCiteCommand{\citepalias}[\mkbibparens]
  {\usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \printtext[bibhyperref]{\@citealias{\thefield{entrykey}}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}
\makeatother

Note the \makeatletter/\makeatother commands are needed in order for the @ in \@citealias to work.

MWE

\documentclass{article}
\usepackage[style=authoryear, natbib=true, backend=bibtex]{biblatex}
\usepackage{hyperref}
\makeatletter
\DeclareCiteCommand{\citetalias}
  {\usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \printtext[bibhyperref]{\@citealias{\thefield{entrykey}}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\DeclareCiteCommand{\citepalias}[\mkbibparens]
  {\usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \printtext[bibhyperref]{\@citealias{\thefield{entrykey}}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}
\makeatother
\addbibresource{biblatex-examples.bib}

\defcitealias{cicero}{DND} 

\begin{document}
As \citeauthor*{cicero} has argued  \citep[12]{cicero} it is clear that $y$. Second,  \citet[12]{cicero} also show $m$ and $x$ \citepalias[12]{cicero}.

\printbibliography
\end{document}

enter image description here

In your use-case though, it seems much more appropriate to use a style that can do the "ibid"-work for you, in your case probably authoryear-ibid. Then there is no need to awkwardly alias an entry to "ibid" and biblatex tries its best to avoid ambiguous "ibid" citations for you.

Related Question