会议AISTATS(Artificial Intelligence and Statistics) Latex模板参考文献引用问题

前言

在看AISTATS2024模板的时候,发现模板里面根本没有教怎么引用,要被气死了。

如下,引用(Cheesman, 1985)的时候,模板是自己手打上去的?而且模板提供的那三个引用,根本也没有Cheesman这个人,顿时就感觉这模板谁写的,写得太烂了。

\subsubsection{Citations in Text}

Citations within the text should include the author's last name and
year, e.g., (Cheesman, 1985). 
%Apart from including the author's last name and year, citations can follow any style, as long as the style is consistent throughout the paper.  
Be sure that the sentence reads
correctly if the citation is deleted: e.g., instead of ``As described
by (Cheesman, 1985), we first frobulate the widgets,'' write ``As
described by Cheesman (1985), we first frobulate the widgets.'

\begin{thebibliography}{}
\setlength{\itemindent}{-\leftmargin}
\makeatletter\renewcommand{\@biblabel}[1]{}\makeatother
\bibitem{first} J.~Alspector, B.~Gupta, and R.~B.~Allen (1989).
    \newblock Performance of a stochastic learning microchip.
    \newblock In D. S. Touretzky (ed.),
    \textit{Advances in Neural Information Processing Systems 1}, 748--760.
    San Mateo, Calif.: Morgan Kaufmann.

\bibitem{third} F.~Rosenblatt (1962).
    \newblock \textit{Principles of Neurodynamics.}
    \newblock Washington, D.C.: Spartan Books.

\bibitem{second} G.~Tesauro (1989).
    \newblock Neurogammon wins computer Olympiad.
    \newblock \textit{Neural Computation} \textbf{1}(3):321--323.
\end{thebibliography}

会议AISTATS(Artificial Intelligence and Statistics) Latex模板参考文献引用问题_第1张图片

任务

所以只能自己想办法解决引用问题,以往的时候我们都是使用\cite{}命令引用,另外,是将所有参考文献放在.bib文件中,而不是像这个模板一样,放在文章末尾,上面模板是如下的

\begin{thebibliography}{}
参考文献
\end{thebibliography}

但我们是要放在.bib里面,然后引用,该怎么做到呢?

解决办法

方法一

寻找该会议以往年份的模板,没准之前教了怎么引用。我去试过了,官方网站上的过往年份模板失效了,除非你去网上找找有没有谁保存了往届的。

方法二

模板里面写了参考的格式,也就是下面这两种都可以。

(Cheesman, 1985),Cheesman (1985)

前一种其实好像就是ICML的引用格式,后一种好像就是NeurIPS的引用格式。所以可以去找一找ICML的模板,或者NeurIPS的模板。这两个里面是怎么引用参考文献的,命令或许在AISTATS这里也可以成功。

我试过了,要么命令不成功,报错,要么格式不太对。

终极方案

最终我在官网上的frequently asked questions (FAQ)里面找到了这个问题的答案。家人们,谁懂呀,原来有和我一样蒙蔽的友友们。

链接:http://aistats.org/aistats2022/faqs.html。
如下:
会议AISTATS(Artificial Intelligence and Statistics) Latex模板参考文献引用问题_第2张图片

也就是:

% If you use natbib package, activate the following three lines:
\usepackage[round]{natbib}
\renewcommand{\bibname}{References}
\renewcommand{\bibsection}{\subsubsection*{\bibname}}

% If you use BibTeX in apalike style, activate the following line:
\bibliographystyle{apalike}

[...] [YOUR DOCUMENT HERE]

\bibliography{your_bib_file}

Note that, when using natbib, you can add or remove the parentheses as follows:

\cite{foo2021}   % produces Foo et al. (2021)
\citep{foo2021}  % produces (Foo et al., 2021)

回到最初

我实在是无语了,原来其实模板中写了,只是被注释了。

会议AISTATS(Artificial Intelligence and Statistics) Latex模板参考文献引用问题_第3张图片
平常不看注释的我哭了。话说回来,这么重要的东西他为什么要注释掉呢?其他格式他咋不注释掉?

所以你需要做的就是将19,20,21,24全部取消注释,然后在文章末尾参考文献的地方,指明你的参考文献路径即可。

\bibliography{your_bib_file}

完结撒花

你可能感兴趣的:(杂记,经验分享)