mirror of
https://github.com/beyondx/Notes.git
synced 2026-06-30 16:16:15 +08:00
Add New Notes
This commit is contained in:
129
Zim/LaTex/BibTeX/BibTeX-How_to_cite_a_website.txt
Normal file
129
Zim/LaTex/BibTeX/BibTeX-How_to_cite_a_website.txt
Normal file
@@ -0,0 +1,129 @@
|
||||
Content-Type: text/x-zim-wiki
|
||||
Wiki-Format: zim 0.4
|
||||
Creation-Date: 2011-11-26T19:58:19+08:00
|
||||
|
||||
====== BibTeX-How to cite a website ======
|
||||
Created Saturday 26 November 2011
|
||||
|
||||
http://win.ua.ac.be/~nschloe/content/bibtex-how-cite-website
|
||||
|
||||
Submitted by Nico on Sun, 21/06/2009
|
||||
|
||||
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 forseen; 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} #nocite 与cite的区别是前者不会显示引用计数
|
||||
\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 usused) @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 citatations 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}
|
||||
|
||||
|
||||
89
Zim/LaTex/BibTeX/BibTeX使用介绍.txt
Normal file
89
Zim/LaTex/BibTeX/BibTeX使用介绍.txt
Normal file
@@ -0,0 +1,89 @@
|
||||
Content-Type: text/x-zim-wiki
|
||||
Wiki-Format: zim 0.4
|
||||
Creation-Date: 2011-11-26T20:10:51+08:00
|
||||
|
||||
====== BibTeX使用介绍 ======
|
||||
Created Saturday 26 November 2011
|
||||
http://latex.yo2.cn/articles/latex-bibtex-introduction.html
|
||||
|
||||
BibTeX 是一种格式和一个程序, 用于协调LaTeX的参考文献处理.
|
||||
|
||||
BibTeX 使用数据库的的方式来管理参考文献. BibTeX 文件的后缀名为 .bib . 先来看一个例子
|
||||
|
||||
@article{name1,
|
||||
author = {作者, 多个作者用 and 连接},
|
||||
title = {标题},
|
||||
journal = {期刊名},
|
||||
volume = {卷20},
|
||||
number = {页码},
|
||||
year = {年份},
|
||||
abstract = {摘要, 这个主要是引用的时候自己参考的, 这一行不是必须的}
|
||||
}
|
||||
|
||||
@book{name2,
|
||||
author ="作者",
|
||||
year="年份2008",
|
||||
title="书名",
|
||||
publisher ="出版社名称"
|
||||
}
|
||||
|
||||
说明:
|
||||
|
||||
第一行@article 告诉 BibTeX 这是一个文章类型的参考文献. 还有其它格式, 例如 article, book, booklet, conference, inbook, incollection, inproceedings, manual, misc, mastersthesis, phdthesis, proceedings, techreport, unpublished 等等.
|
||||
接下来的"name1", 就是你在正文中应用这个条目的名称.
|
||||
其它就是参考文献里面的具体内容啦.
|
||||
|
||||
===== 在LaTeX中使用BibTeX =====
|
||||
为了在 LaTeX 中使用BibTeX 数据库, 你必须先做下面三件事情:
|
||||
|
||||
1) 设置参考文献的类型 (bibliography style). 标准的为 plain:
|
||||
|
||||
\bibliographystyle{plain}
|
||||
|
||||
将上面的命令放在 LaTeX 文档的 \begin{document}后边. 其它的类型包括
|
||||
|
||||
unsrt – 基本上跟 plain 类型一样, 除了参考文献的条目的编号是按照引用的顺序, 而不是按照作者的字母顺序.
|
||||
alpha – 类似于 plain 类型, 当参考文献的条目的编号基于作者名字和出版年份的顺序.
|
||||
abbrv – 缩写格式 .
|
||||
|
||||
2) 标记引用 (Make citations). 当你在文档中想使用引用时, 插入 LaTeX 命令
|
||||
|
||||
\cite{引用文章名称}
|
||||
|
||||
"引用文章名称" 就是前边定义@article后面的名称.
|
||||
|
||||
3) 告诉 LaTeX 生成参考文献列表 . 在 LaTeX 的结束前输入
|
||||
|
||||
\bibliography{bibfile}
|
||||
|
||||
这里bibfile 就是你的 BibTeX 数据库文件 bibfile.bib .
|
||||
|
||||
===== 运行 BibTeX =====
|
||||
分为下面四步
|
||||
|
||||
用LaTeX编译你的 .tex 文件 , 这是生成一个 .aux 的文件, 这告诉 BibTeX 将使用那些应用.
|
||||
用BibTeX 编译 .bib 文件.
|
||||
再次用LaTeX 编译你的 .tex 文件, 这个时候在文档中已经包含了参考文献, 但此时引用的编号可能不正确.
|
||||
最后用 LaTeX 编译你的 .tex 文件, 如果一切顺利的话, 这是所有东西都已正常了.
|
||||
|
||||
例子: 将上面的 BibTeX 的的例子保存为 bibtex-example.bib .
|
||||
|
||||
\documentclass{article}
|
||||
\usepackage{CJK}
|
||||
\begin{document}
|
||||
\begin{CJK}{UTF8}{gkai}
|
||||
%我是在linux下用使用latex的, window用户将上一行改为\begin{CJK}{GBK}{kai}
|
||||
text\cite{name1}\cite{name2}
|
||||
中文
|
||||
把Latex中的 Reference 写成中文的"参考文献"
|
||||
%如果文档类是article之类的, 用\renewcommand\refname{参考文献}
|
||||
%如果文档类是book之类的, 用\renewcommand\bibname{参考文献}
|
||||
\renewcommand\refname{参考文献}
|
||||
\bibliographystyle{plain}
|
||||
\bibliography{ bibtex-example.bib}
|
||||
\end{CJK}
|
||||
\end{document}
|
||||
|
||||
将上面的内容保存为bibtex-example.tex .
|
||||
|
||||
latex编译一次, bibtex 编译一次, 再用 latex编译两次就大功告成了!
|
||||
Reference in New Issue
Block a user