我们经常希望在参考文献当中能够将作者的姓和文章的年份展示出来,而并非简单的序号。例如下面一段话通常是我们不希望呈现的形式。
Literature has documented that the air pollution can be harmfull to people's mental health[1].
相反,我们需要的是下面的这个效果
Literature has documented that the air pollution can be harmfull to people's mental health (Kong et al., 2023)..
实现上述效果的代码如下:
首先使用如下代码导入相关文件:
\usepackage[round, sort]{natbib}
然后在\bibliography{reference}前一行写入如下格式代码:
\bibliographystyle{apalike}
那么我们在文中引用的时候就可以达到上述效果了
可以使用\cite{},这个代码的效果是
作者,年份
也可以使用\citep{},这个代码的效果是
(作者,年份)
即如果希望在句末体现引用,就可以用\citep{}
如果希望在句子开头说明某篇文章说了什么,就可以用\cite{}