【overleaf】使用`.bib`文件管理参考文献

【overleaf】使用.bib文件管理参考文献

此文章为个人学习过程中的记录,仅供参考,欢迎讨论

latex模版

使用的是IEEEtran

原模版关于参考文献的代码

官方模版中关于参考文献的latex代码

\begin{thebibliography}{1}

\bibitem{ams}
{\it{Mathematics into Type}}, American Mathematical Society. Online available: 

\bibitem{oxford}
T.W. Chaundy, P.R. Barrett and C. Batey, {\it{The Printing of Mathematics}}, Oxford University Press. London, 1954.

\bibitem{lacomp}{\it{The \LaTeX Companion}}, by F. Mittelbach and M. Goossens

\bibitem{mmt}{\it{More Math into LaTeX}}, by G. Gr\"atzer

\bibitem{amstyle}{\it{AMS-StyleGuide-online.pdf,}} published by the American Mathematical Society

\bibitem{Sira3}
H. Sira-Ramirez. ``On the sliding mode control of nonlinear systems,'' \textit{Systems \& Control Letters}, vol. 19, pp. 303--312, 1992.

\bibitem{Levant}
A. Levant. ``Exact differentiation of signals with unbounded higher derivatives,''  in \textit{Proceedings of the 45th IEEE Conference on Decision and Control}, San Diego, California, USA, pp. 5585--5590, 2006.

\bibitem{Cedric}
M. Fliess, C. Join, and H. Sira-Ramirez. ``Non-linear estimation is easy,'' \textit{International Journal of Modelling, Identification and Control}, vol. 4, no. 1, pp. 12--27, 2008.

\bibitem{Ortega}
R. Ortega, A. Astolfi, G. Bastin, and H. Rodriguez. ``Stabilization of food-chain systems using a port-controlled Hamiltonian description,'' in \textit{Proceedings of the American Control Conference}, Chicago, Illinois, USA, pp. 2245--2249, 2000.

\end{thebibliography}

得到如下所示的参考文献

image-20240702204750609

我对这这种参考文献的写法不太熟悉,所以研究了一下使用.bib文件来管理参考文献目录,特作此记录。

使用.bib文件管理参考文献目录

我检索了很多博客说的很复杂,我也跟着做了很多错误操作,其实很简单

overleaf中创建.bib文件,名字任意但要与代码中一致,我这里叫做test.bib

test.bib文件中加入参考文献的bibTex格式,参考文献的bibTex格式的获得方式如下

获得参考文献的bibTex格式

@inproceedings{ortega2000stabilization,
  title={Stabilization of food-chain systems using a port-controlled Hamiltonian description},
  author={Ortega, Romeo and Astolfi, Alessandro and Bastin, George and Rodriguez, Hugo},
  booktitle={Proceedings of the 2000 American Control Conference. ACC (IEEE Cat. No. 00CH36334)},
  volume={4},
  pages={2245--2249},
  year={2000},
  organization={IEEE}
}

@article{fliess2008non,
  title={Non-linear estimation is easy},
  author={Fliess, Michel and Join, C{\'e}dric and Sira-Ramirez, Hebertt},
  journal={International Journal of Modelling, Identification and Control},
  volume={4},
  number={1},
  pages={12--27},
  year={2008},
  publisher={Inderscience Publishers}
}

以上面2篇文章为例,ortega2000stabilizationfliess2008non表示论文的label,用于正文中的交叉引用\cite{ortega2000stabilization}\cite{fliess2008non}

另外,在你需要显示参考文献的位置写上两行代码,

  • 第一行代码表示参考文献使用什么格式显示,
  • 第二行代码表示你存储参考文献信息的文件(上文中的test.bib),就是告诉编译器你正文中的引用应该去哪个.bib文件中找
\bibliographystyle{IEEEtran}
\bibliography{test}

到此就结束了,就这么简单,不需要添加任何多余的内容👍

文中具体示例

这节给一个文中具体示例~✨顺便可以展示一下使用.bib文件管理参考文献的好处

  • **不需要在意参考文献的格式。**只需要拿到文献的bibTex格式即可
  • **不需要在意参考文献的引用顺序和排列顺序。**文末参考文献不会显示.bib文件中的所有文献,只显示你在正文中引用到的文献,而且是按照你在正文中引用的先后顺序来排列文末的参考文献,十分好用~

废话少说,直接上文中示例⬇️

test.bib文件内容如下,我一共写了3篇文献。

@inproceedings{ortega2000stabilization,
  title={Stabilization of food-chain systems using a port-controlled Hamiltonian description},
  author={Ortega, Romeo and Astolfi, Alessandro and Bastin, George and Rodriguez, Hugo},
  booktitle={Proceedings of the 2000 American Control Conference. ACC (IEEE Cat. No. 00CH36334)},
  volume={4},
  pages={2245--2249},
  year={2000},
  organization={IEEE}
}

@article{fliess2008non,
  title={Non-linear estimation is easy},
  author={Fliess, Michel and Join, C{\'e}dric and Sira-Ramirez, Hebertt},
  journal={International Journal of Modelling, Identification and Control},
  volume={4},
  number={1},
  pages={12--27},
  year={2008},
  publisher={Inderscience Publishers}
}

@article{levant2011exact,
  title={Exact differentiation of signals with unbounded higher derivatives},
  author={Levant, Arie and Livne, Miki},
  journal={IEEE Transactions on Automatic Control},
  volume={57},
  number={4},
  pages={1076--1080},
  year={2011},
  publisher={IEEE}
}

正文中引用文献示例⬇️

Please note that the environment in {\LaTeX}
will increment the main equation counter even when there are no
equation numbers displayed\cite{fliess2008non}. 

If you forget that, you might write an
article in which the equation numbers skip from (17) to (20), causing
the copy editors to wonder if you've discovered a new method of
counting\cite{ortega2000stabilization}.


\bibliographystyle{IEEEtran}
\bibliography{test}

PDF实际效果⬇️

文中示例

可以看出,文末参考文献的顺序与.bib文件中论文的顺序无关,只与正文中引用论文的顺序有关,而且文末参考文献只展示正文中引用了的参考文献,没有引用的文献(第3篇:levant2011exact)则不会出现在文末参考文献中~

注意事项!!!

(2024.07.05).bib中参考文献的label尽量不要加符号一类的。
因为稍不注意可能就会输入成中文的符号,加入中文符号之后在overleaf编译可能会显示编译超时,而且不会显示报错(如果中文符号在正文是会报错的)。目前不太清楚具体原因,所以尽量不要在label中加入符号一类的~(排查了一晚上,才找到问题所在。)
本人的血泪教训如下(想加入感叹号强调,结果打成了中文的感叹号。)

@inproceedings{!2021hfl,
  title={HFL-DP: Hierarchical federated learning with differential privacy},
  author={Shi, Lu and Shu, Jiangang and Zhang, Weizhe and Liu, Yang},
  booktitle={2021 IEEE Global Communications Conference (GLOBECOM)},
  pages={1--7},
  year={2021},
  organization={IEEE}
}
``

文章到这里就结束了,如果对你有帮助就点个赞吧~~~如果文章有什么问题或者有什么疑问欢迎讨论~


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值