Latex文献引用

我使用的是在线latex编译器:A Survey on Machine Translation - Online LaTeX Editor Overleaf

# 宏文件处,开头加上
\usepackage{cite}
\bibliographystyle{plain}  

# 结尾加上这个你的 mybibfile.bib 文件的名字
\bibliography{mybibfile}

# 记录一个小问题:
\cite{} 这个给我报错:
"""
			]{xxxx名字} 
			! Paragraph ended before \@citex was complete.
			 
			                   \par 
			l.1474 
			       
			I suspect you've forgotten a `}', causing me to apply this
			control sequence to too much text. How can we recover?
			My plan is to forget the whole thing and hope for the best.
"""
\citep{} 才不报错,不知道为啥

举个例子 咱们有两个文件 一个 .tex(需要编译的主文件)和 .bib(这个里面放引用文献的信息)

.bib

@inproceedings{NIPS2017_3f5ee243,
 author = {Vaswani, Ashish and Shazeer, Noam and Parmar, Niki and Uszkoreit, Jakob and Jones, Llion and Gomez, Aidan N and Kaiser, \L ukasz and Polosukhin, Illia},
 booktitle = {NeurIPS},
 pages = {},
 title = {Attention is All you Need},
 url = {https://proceedings.neurips.cc/paper/2017/file/3f5ee243547dee91fbd053c1c4a845aa-Paper.pdf},
 year = {2017}
}
@inproceedings{Box1970TimeSA,
  title={Time series analysis, forecasting and control},
  author={G. E. P. Box and Gwilym M. Jenkins},
  year={1970}
}

@book{2008Forecasting,
  title={Forecasting with exponential smoothing: the state space approach},
  author={Hyndman, Rob and Koehler, Anne B and Ord, J Keith and Snyder, Ralph D},
  year={2008},
  publisher={Springer Science \& Business Media}
}

.tex

\usepackage[utf8]{inputenc} % allow utf-8 input
\usepackage[T1]{fontenc}    % use 8-bit T1 fonts
\usepackage{hyperref}       % hyperlinks
\usepackage{url}            % simple URL typesetting
\usepackage{booktabs}       % professional-quality tables
\usepackage{amsfonts}       % blackboard math symbols
\usepackage{nicefrac}       % compact symbols for 1/2, etc.
\usepackage{microtype}      % microtypography
\usepackage{xcolor}         % colors
\usepackage{graphicx}
\usepackage{float} 
\usepackage{subfigure}
\graphicspath{{fig/}}
\usepackage{cite}           %这个就是咱们上面提到的


正文里面
Transformer-based models ~\citep{NIPS2017_3f5ee243}have achieved progressive breakthrough on extensive areas. Especially in time series forecasting, credited to their stacked structure and the capability of attention mechanisms, Transformers can naturally capture the temporal dependencies among time points, thereby fitting the series forecasting task perfectly~\citep{Box1970TimeSA,2008Forecasting}.


\bibliographystyle{plain}  
\bibliography{LaTex/mypaper.bib} #这个地方mypaper是我.bib文件的名字,还有这个一般放到正文后面

效果展示

Latex文献引用_第1张图片

这个序号生成感觉比较随机,如果注重顺序的朋友可以再想想其他办法,因为我参考nips2022的模板里面的论文好像没有这个要求。

Latex文献引用_第2张图片

其他资料

Latex如何进行文献的引用(两步解决) - 知乎 (zhihu.com) //这个和我讲的差不多

(293条消息) LaTeX引用参考文献——BibTex参考文献格式大全_花无凋零之时的博客-CSDN博客

//bib文件里面的各个字段的含义(293条消息) Latex正确的引用姿势(使用~\cite, ~\cref, ~\autoref)_鸾镜朱颜暗换的博客-CSDN博客 

你可能感兴趣的:(实用工具箱,latex,文献引用,参考文献,参考文献引用)