如何在bibtex中引用一个网站

BibTeX: How to cite a website

With the increasing importance of the internet for scientific research, need increases for properly citing online resources. Unfortunately, when the main LaTeX citation machinery  BibTeX was created, this was not to be foreseen; this is why there is to date no canonical way to cite, say, a website. Different workarounds have emerged, using for example some trickery with the  @MISC type (see below), but the right way™ hasn't been found yet.

This could change with the advent of  biblatex. Its new entry type  @ONLINE is supposed to contain references to web resources and doesn't give room for confusion anymore.

With the BibTeX entry

@ONLINE{Doe:2009:Online,
author = {Doe, Ringo},
title = {This is a test entry of type {@ONLINE}},
month = jun,
year = {2009},
url = {http://www.test.org/doe/}
}


and the LaTeX file

\documentclass{article}

\usepackage{biblatex}
\bibliography{test.bib}

\title{BibTeX Website citatations with the \textsf{biblatex}~package}
\date{}

\begin{document}

\maketitle
\nocite{Doe:2009:Online}
\printbibliography

\end{document}

one gets a nicely typeset list of references.


Note that there are plenty of more options and entry types in the biblatex package, such as (the currently unused)  @AUDIO and  @VIDEO.

Because of its supposedly large impact on the (La)TeX community, the author of biblatex still declares the package as 'beta' which is why it is not included in TeXlive, for example. Should you for this or some other reason be unable to install biblatex, there are (inferior) alternatives to use for URL citations in a reference list.

Alternatives

Using the natbib package

The natbib package extends the functionality of regular bibtex to a certain degree, and allows for website citations as well. There is no specific entry type for online resources, but  @MISC@OTHER, and  @BOOKLET work quite well.

@BOOKLET{Doe:2009:Booklet,
title = {This is a test entry of type {@BOOKLET}},
author = {Doe, John},
month = jun,
year = {2009},
url = {http://www.test.org/doe/}
}

@MISC{Doe:2009:Misc,
author = {Doe, Paul},
title = {This is a test test entry of type {@MISC}},
month = jun,
year = {2009},
url = {http://www.test.org/doe/}
}

@OTHER{Doe:2009:Other,
author = {Doe, Brian},
title = {This is a test entry of type {@OTHER}},
month = jun,
year = {2009},
url = {http://www.test.org/doe/}
}


Note that standard bibstyles (such as  plain) will not typeset the  url key contents of the individual entries; it is required to use one of natbib's own entries, e.g.  plainnat.

\documentclass{article}

\usepackage{natbib}
\bibliographystyle{plainnat}

\usepackage{url}

\title{BibTeX Website citations with the \textsf{natbib} package}
\date{}

\begin{document}

\maketitle
\nocite{Doe:2009:Other,
Doe:2009:Misc,
Doe:2009:Booklet}
\bibliography{test}

\end{document}


Using the url package

The most elemental way to include web references is via the  howpublished key of the  @MISC entry. Use

@MISC{Doe:2009:Misc,
author = {Doe, George},
title = {This is a test test entry of type {@MISC} and `howpublished'},
month = jun,
year = {2009},
howpublished={\url{http://www.test.org/doe/}}
}


and

\documentclass{article}
\bibliographystyle{plain}

\usepackage{url}

\begin{document}

\nocite{Doe:2009:Misc}
\bibliography{mybib}

\end{document}



  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
对于 LaTeX 的参考文献引用BibTeX一个常用的工具。以下是使用 BibTeX 引用参考文献的一般步骤: 1. 创建一个 .bib 文件,该文件将包含您的参考文献条目。每个条目应以 `@` 开头,然后是条目类型(如 `@article`、`@book` 等),以及一些相关字段,如作者、标题、年份等。例如: ``` @article{Smith2020, author = {Smith, John}, title = {A Study on Topic X}, journal = {Journal of Science}, year = {2020}, } ``` 2. 在 LaTeX 文档导入 BibTeX 数据库。使用 `\bibliography{filename}` 命令指定您的 .bib 文件的文件名(不包括扩展名)。例如:`\bibliography{references}`。 3. 在正文引用参考文献的位置,使用 `\cite{key}` 命令引用相应条目。其,`key` 是您在 .bib 文件为该条目指定的标识符。例如:`\cite{Smith2020}`。 4. 编译 LaTeX 文档。为了正确生成参考文献列表和正确的引用格式,您需要进行多次编译。一般情况下,首先运行 LaTeX 编译器,然后运行 BibTeX 编译器,最后再运行两次 LaTeX 编译器。 5. 在您希望显示参考文献列表的位置,使用 `\bibliographystyle{style}` 命令选择参考文献的格式样式,并使用 `\bibliography{filename}` 命令生成参考文献列表。例如:`\bibliographystyle{plain}\bibliography{references}`。 这是一个基本的引用参考文献的流程,您可以根据需要选择不同的样式和格式来满足您的要求。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值