我想知道是否有办法在 bibtex 参考书目中设置一个“链接”按钮,链接到底层 URL,而不必显示每个条目的完整 URL?我发现能够直接链接到在线来源很有帮助,但 URL 在我的参考书目中占用了大量空间。
编辑:添加示例:
\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{geometry}
\usepackage{array}
\usepackage{graphicx}
\usepackage{setspace}
\usepackage[authoryear]{natbib}
\makeatletter
\providecommand{\tabularnewline}{\\} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage[colorlinks=true, allcolors=black]{hyperref}
\usepackage{graphicx}
\usepackage{epstopdf}
\makeatother
\usepackage{babel}
\begin{document}
\newpage{}
\bibliographystyle{elsarticle-harv}
\bibliography{MA_bib,electronic_references}
\end{document}
编辑:添加 bib-entry。这是我的参考管理器生成的:
@article{Giuliano:2009ib,
author = {Giuliano, Paola and Ruiz-Arranz, Marta},
title = {{Remittances, financial development, and growth}},
journal = {Journal of Development Economics},
year = {2009},
volume = {90},
number = {1},
pages = {144--152},
month = sep,
publisher = {Elsevier B.V.},
doi = {10.1016/j.jdeveco.2008.10.005},
url = {http://dx.doi.org/10.1016/j.jdeveco.2008.10.005},
uri = {\url{papers3://publication/doi/10.1016/j.jdeveco.2008.10.005}}
}
答案1
如果您使用,您可以通过biblatex
更改的输出。url
\DeclareFieldFormat
下面的例子中,包裹的符号fontawesome
被链接起来。
\documentclass{article}
\usepackage{fontawesome}
\usepackage{biblatex}
\usepackage{hyperref}
\DeclareFieldFormat{url}{\mkbibacro{URL}\addcolon\space\href{#1}{\faExternalLink}}
\addbibresource{biblatex-examples.bib}
\begin{document}
\cite{ctan}
\printbibliography
\end{document}
使用 op 的 MWE 进行更新:
\RequirePackage{filecontents}
\begin{filecontents}{mwe.bib}
@article{Giuliano:2009ib,
author = {Giuliano, Paola and Ruiz-Arranz, Marta},
title = {{Remittances, financial development, and growth}},
journal = {Journal of Development Economics},
year = {2009},
volume = {90},
number = {1},
pages = {144--152},
month = sep,
publisher = {Elsevier B.V.},
doi = {10.1016/j.jdeveco.2008.10.005},
url = {http://dx.doi.org/10.1016/j.jdeveco.2008.10.005},
uri = {\url{papers3://publication/doi/10.1016/j.jdeveco.2008.10.005}}
}
\end{filecontents}
\documentclass[english]{article}
\usepackage{etoolbox,fontawesome}
\usepackage[colorlinks=true, allcolors=black]{hyperref}
\AtBeginEnvironment{thebibliography}{\def\url#1{\href{#1}{\faExternalLink}}}
\begin{document}
\nocite{*}
\bibliography{mwe}
\bibliographystyle{elsarticle-harv}
\end{document}