.. pdflatex.rst --- .. .. Description: .. Author: Hongyi Wu(吴鸿毅) .. Email: wuhongyi@qq.com .. Created: 三 7月 31 13:50:40 2019 (+0800) .. Last-Updated: 三 7月 31 13:58:35 2019 (+0800) .. By: Hongyi Wu(吴鸿毅) .. Update #: 1 .. URL: http://wuhongyi.cn ################################################## linux下编译bib、tex生成pdf文件 ################################################## https://www.cnblogs.com/cfsmile/p/4912226.html 在 linux 环境下,编译 xxx.bib 和 xxx.tex 文件,生成 pdf 文件。 **文件 xxx.bib** .. code-block:: bib @article{DK89, author = "Donald Knuth", title = "Typesetting Concrete Mathematics", journal = "TUGboat", volume = 10, number = 1, pages = "31--36", month = Apr, year = 1989 } **文件 xxx.tex** .. code-block:: latex \documentclass{article} \begin{document} \section*{Recommended texts} To study \TeX\ in depth, set \cite{DK89}. \bibliographystyle{alpha} \bibliography{tex} \end{document} ============================================================ 编译命令及输出 ============================================================ .. code-block:: bash pdflatex xxx.tex ## 目录下会生成 xxx.aux、xxx.log、xxx.pdf 三个个文件。xxx.aux 有用。 xxx.pdf 文件内参考文献,没有正确显示出来。只显示"?",表明还没有引用。 bibtex xxx ## 生成 xxx.bbl,xxx.blg 两个文件。这两个文件都是字符文件,可查看。其中 xxx.bbl 内容就是要插入到 xxx.tex 中去的。注意命令中,文件名字是 xxx,而不是 xxx.tex。 pdflatex xxx.tex ## 无新文件生成,但查看 xxx.pdf,其中的参考文献已经显示出来,但正文中对参考文献的引用依然显示为"?",没有正确(产生交叉)引用。 pdflatex xxx.tex ## 此时,查看生成的 pdf,已经是一份正式的档了。 ## 为了编译出出正确的pdf文件,需要执行4条命令完成整个编译过程。 .. .. pdflatex.rst ends here