我最近从 切换到natbib
。biblatex
我一直在\hypersetup
使用积极的链接natbib
——它可以帮助我在处理文档时浏览文档(例如,见下文)。
\citepalias
并且\citeauthor
biblatex
在.下使用时不会生成超链接,并且biblatex
效果很好,但是我的自制(即使用)同上。不会生成超链接(我解决了删除的部分,请参阅下面的更新)。\citet
\citep
\citepalias
有没有更好的方法来获取活动链接biblatex
?
下面是在名为“main.tex”的文件中采用 LaTeX 的一个小例子
\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}
更新 2015-02:06 23:34:18Z
在...的帮助下这个答案(和此为标题)我已经解决了我的问题\citeauthor
。
这是代码
\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}}
关注更新
答案1
biblatex
类似natbib
命令\citepalias
和\citetalias
(其定义可在中找到blx-natbib.def
)可以像其他命令一样轻松地转换为超链接版本
\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
请注意,需要\makeatletter
/\makeatother
命令才能使@
in\@citealias
正常工作。
平均能量损失
\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}
不过,在您的用例中,使用可以为您完成“ibid”工作的样式似乎更合适,在您的情况下可能如此authoryear-ibid
。 那么就没有必要笨拙地将条目别名为“ibid”,并biblatex
尽力避免模糊的“ibid”引用。