Latex 添加参考文献引用及 Mac 编译可能遇到的问题:I couldn't open file name `bibfile.aux'
I can’t open file name *.auxBy default (or design), the res documentclass does not create an auxiliary file since it executes\nofiles% resume’s don’t need .aux filesaround line 200. Modify...
·
Latex 添加参考文献
1. 添加文件
在 .tex
文件的同级路径下添加 .bib
文件,在文件中复制下述格式的代码(代码可以在 google 学术 或者 百度学术里面的: 引用 - bibtex
中获得)。
这里我们以文件名 bibtex.bib
为例,文件内容如下:
@article{guan2020clinical,
title={Clinical characteristics of 2019 novel coronavirus infection in China},
author={Guan, Wei-jie and Ni, Zheng-yi and Hu, Yu and Liang, Wen-hua and Ou, Chun-quan and He, Jian-xing and Liu, Lei and Shan, Hong and Lei, Chun-liang and Hui, David SC and others},
journal={MedRxiv},
year={2020},
publisher={Cold Spring Harbor Laboratory Press}
}
2.
添加宏包:\usepackage{cite}
正文中使用命令:\cite{guan2020clinical}
即可引用
正文最后的 \end{document}
前加上下述两句代码:
\bibliographystyle{unsrt}
\bibliography{bibtex}
注意,这里 unsrt
表示按照参考文献在文中出现的顺序排列,这里用 plain
等其他代码。参考:Latex参考文献引用顺序排序
- plain,按字母的顺序排列,比较次序为作者、年度和标题
- unsrt,样式同plain,只是按照引用的先后排序
- alpha,用作者名首字母+年份后两位作标号,以字母顺序排序
- abbrv,类似plain,将月份全拼改为缩写,更显紧凑
- ieeetr,国际电气电子工程师协会期刊样式
- acm,美国计算机学会期刊样式
- siam,美国工业和应用数学学会期刊样式
- apalike,美国心理学学会期刊样式
3. Mac 编译顺序(Windows 系统 xelatex 替换为 pdflatex)
xelatex -> bibtex -> xelatex -> xelatex (共四次!)
Mac 编译可能遇到的问题
I couldn't open file name *.aux
出现这个问题解决方法非常简单,在 .tex
文件最开头,加上:\let\nofiles\relax
这里解释一下:
\nofiles
表示编译不产生.aux
文件\let\nofiles\relax
就表示不要上面的命令,也就是强制产生.aux
文件,这样.bib
文件就可以调用,并且成果生成参考文献啦!!
参考
更多推荐
所有评论(0)