作者:@张扶摇
本文为作者原创,转载请注明出处:https://www.cnblogs.com/zhangshengdong/p/18529662
目录
How to manage Bibliography by Latex
1.Create an extension file
2.Use Natbib function
3.Getting current LaTeX document to use your .bib file
4.Getting ideal Output
References
How to manage Bibliography by Latex
For any academic/research writing, incorporating references into a document is an important task.
LaTeX has a variety of features that make dealing with references much simpler.
BibTeX is an auxiliary tool that effectively manages bibliographies.
BibTeX provides for the storage of all references in a bibliographic information file with the file extension .bib
, a kind of flat-file database.
and now, I will use BibTeX to manage my bibliographies.
1.Create an extension file
In my environment, I create an extension file called citations-zsd.bib
for the storage of all references.here is my practical example:
@article{2021data,
title={A data-driven shale gas production forecasting method based on the multi-objective random forest regression},
author={Xue, Liang and Liu, Yuetian and Xiong, Yifei and Liu, Yanli and Cui, Xuehui and Lei, Gang},
journal={Journal of Petroleum Science and Engineering},
volume={196},
pages={107801},
year={2021},
publisher={Elsevier}
}
the above example is my supervisor paper Citation.how to get BibTeX information,you should visit https://scholar.google.com/ and input your papar title.choose the BibTeX button to get it.
2.Use Natbib function
The numeric style of citation is quite common in scientific writing.
In other disciplines, the author-year style, e.g., (Roberts, 2003), such as Harvard is preferred.
I want use Harvard's disciplines to cite papar.
My template is elsarticle's. and elsarticle provide Harvard's author-year style. you must use the file called elsarticle-template-harv.tex
.
The natbib
package is one possible way to get such an output.Natbib allows the user to easily switch between Harvard or numeric.
In my elsarticle-template-harv.tex
file ,my first job is to add the following to your preamble in order to get LaTeX to use the Natbib package:
\usepackage{natbib}
3.Getting current LaTeX document to use your .bib file
At the end of my LaTeX file (that is, after the content, but before \end{document}
),I place the following commands:
\bibliographystyle{plainnat}
\bibliography{citations-zsd}
4.Getting ideal Output
My ideal output is (Xue et al., 2021)
, use the existing \citep
commands to display the type of citation I want.I place the following commands:
\citep{2021data}
References
1.https://en.wikibooks.org/wiki/LaTeX/Bibliography_Management
2.https://assets.ctfassets.net/o78em1y1w4i4/3ro3yQff1q67JHmLi1sAqV/1348e3852f277867230fc4b84a801734/elsdoc-1.pdf
感谢您的阅读,如果您觉得阅读本文对您有帮助,请点一下“推荐”按钮。本文欢迎各位转载,但是转载文章之后必须在文章页面中给出作者和原文连接。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?