为了管理我在论文中使用的链接,我想使用网络目录,这样我就可以引用最后列出的链接(带有上次访问的时间戳!),就像参考书目一样。我找不到任何软件包或类似的问题。有人知道软件包或解决方法吗?
答案1
你可以使用词汇表包。它不仅可以制作词汇表和首字母缩略词,还可以制作事物列表
以下内容应放在 hyperref 包后的序言中(如果它被调用,我认为你确实调用了它)
\usepackage{hyperref} % Optional
...
\usepackage[toc]{glossaries} % toc option puts an entry in the table of contents
\newglossary{links}{sym}{sbl}{Netography}
\makeglossaries
\loadglsentries{listofurls}
\begin{document}
...
以下内容应放在您希望网络图像出现的位置
\glsaddall[types={links}] % This adds all of the defined acronyms without needing to call them in the body of the document
\printglossary[style=super,type=links,nonumberlist] % Prints the acronyms
然后,创建一个文件(listofurls
在本例中命名),其中包含以下声明:
\newglossaryentry{url1}
{
type=links,
name={2012/10/10},
sort=20121010, % Use what ever form you want to sort your list
description={\url{www.google.com}}
}
\newglossaryentry{url2}
{
type=links,
name={2012/05/06},
sort=20120506, % Use what ever form you want to sort your list
description={\url{http://tex.stackexchange.com}}
}
pdflatex jobname
然后运行makeglossaries jobname
pdflatex jobname
梅威瑟:
\documentclass{article}
\usepackage{hyperref} % Optional
\usepackage[toc]{glossaries} % toc option puts an entry in the table of contents
\newglossary{links}{sym}{sbl}{Netography}
\makeglossaries
%\loadglsentries{listofurls}
\newglossaryentry{url1}
{
type=links,
name={2012/10/10},
sort=20121010, % Use what ever form you want to sort your list
description={\url{www.google.com}}
}
\newglossaryentry{url2}
{
type=links,
name={2012/05/06},
sort=20120506, % Use what ever form you want to sort your list
description={\url{http://tex.stackexchange.com}}
}
\begin{document}
\glsaddall[types={links}] % This adds all of the defined acronyms without needing to call them in the body of the document
\printglossary[style=super,type=links,nonumberlist]
\end{document}
输出
更新 1
Oliver 询问您是否可以在正文中引用链接。实际上,有一个问题我不知道如何使用命令处理\url
,这是一个 MWE:
\documentclass{article}
\usepackage{hyperref} % Optional
\usepackage[toc]{glossaries} % toc option puts an entry in the table of contents
\newglossary{links}{sym}{sbl}{Netography}
\makeglossaries
%\loadglsentries{listofurls}
\newglossaryentry{url1}
{
type=links,
name={2012/10/10},
sort=20121010, % Use what ever form you want to sort your list
description={\url{www.google.com}}
}
\newglossaryentry{url2}
{
type=links,
name={2012/05/06},
sort=20120506, % Use what ever form you want to sort your list
description={\url{http://tex.stackexchange.com}}
}
\begin{document}
For more information visit \glsdesc{url1}\footnote{This site was last visited in \gls{url1}} Notice that there is a problem with the url command...
Workaround \glslink{url1}{\url{www.google.com}}
\glsaddall[types={links}] % This adds all of the defined acronyms without needing to call them in the body of the document
\printglossary[style=super,type=links,nonumberlist]
\end{document}
输出: