考虑以下 MWE 和此.tex
文件:
\documentclass[]{article}
% PACKAGES
\usepackage[isbn=false,giveninits=true,uniquename=init,style=authoryear-comp,backend=biber,sorting=ynt,natbib,maxbibnames=99,maxcitenames=99,hyperref=true,sortcites=true,language=british,backref=true,url=false,doi=false]{biblatex} % To get fancy bibliography.
% HYPERREF SETTINGS
\usepackage[colorlinks=true,urlcolor=blue,linkcolor=black]{hyperref}
\usepackage[nameinlink]{cleveref}
\hypersetup{allcolors=blue}
% REDEFINING CITEYEAR
\DeclareCiteCommand{\citeyear}
{}
{\bibhyperref{\printfield{year}}}
{\multicitedelim}
{}
\DeclareCiteCommand{\citeyearpar}
{}
{\mkbibparens{\bibhyperref{\printfield{year}}}}
{\multicitedelim}
{}
\addbibresource{References.bib}
\begin{document}
\citeauthor{author_yy}'s \citeyearpar[Axiom X, p. y]{author_yy}.
\printbibliography[heading=bibintoc]
\end{document}
还有这个.bib
文件:
@article{author_yy,
title = {title},
author = {author},
journal = {journal},
volume = {1},
number = {1},
pages = {yyy--xxx},
year = {2000},
doi = {XXXXXXXXXX}
}
正如您在下面的输出中看到的,[Axiom X, p. y]
由于我重新定义了\citeyear
和,位丢失了\citeyearpar
。我的目标是获得可点击的年份,同时将位保留[Axiom X, p. y]
在输出中。你能帮助我实现这个目标吗?
答案1
解决方案比预想的要简单得多。只需使用:
\citeauthor{author_yy}’s (Axiom X, p. y, \citeyear{author_yy})
那就行了。