如何使用超連結將 URI 添加到書目文件中,以便任何單擊它的人都將被定向到顯示論文的頁面。
uri
參考書目中似乎沒有標籤,因此我嘗試透過在序言中添加以下內容來建立自訂字段
\newcommand{\uri}[1]{\href{http://hdl.handle.net/#1}{URI: #1}}
但不幸的是它沒有做任何事。
這些是我的序言中的相關包
\usepackage[square,sort,comma,numbers]{natbib}
這是我用來在文件中加入參考書目的程式碼
\bibliographystyle{plainnat}
\bibliography{References/references.bib}
\addcontentsline{toc}{chapter}{Bibliography}
答案1
如果您使用natbib
with 則plainnat
可以使用
\documentclass[12pt]{article}
\usepackage[a4paper]{geometry}
\usepackage{natbib,hyperref}
\begin{document}
\begin{filecontents*}{\jobname.bib}
@ARTICLE{Important,
author = "Doe, J.",
title = "Gnus and Gnats",
journal = "Gnus of the world",
year = "2020",
volume = "2456",
number = "1",
pages = "123--2567",
url = "https://tex.stackexchange.com",
}
\end{filecontents*}
\citet{Important}
\bibliographystyle{plainnat}
\bibliography{\jobname}
\end{document}