VSCode + latex references cited bibtex

Personal micro-channel public number: J square

EDITORIAL 0

Internet to find some reference links, as follows

Reference links 1 , reference links 2 , reference links 3 , reference links 4

But they say not specific enough, and for VSCode no more relevant description (although similar), the other is not particularly more detailed description of the specific process of compilation, therefore this article.

This article is based on VSCode configuration latex environment a supplement.

Procedure 1

1.1 New lib

In .tex the same folder, create a new .bib file, for example ref.bib, the references to the literature bibtex format copy and paste into it, the major search engines such as Google Scholar what should have, the following is an example, Note citations which mirowski2018learning variable name

@misc{mirowski2018learning,
    title={Learning to Navigate in Cities Without a Map},
    author={Piotr Mirowski and Matthew Koichi Grimes and Mateusz Malinowski and Karl Moritz Hermann and Keith Anderson and Denis Teplyashin and Karen Simonyan and Koray Kavukcuoglu and Andrew Zisserman and Raia Hadsell},
    year={2018},
    eprint={1804.00168},
    archivePrefix={arXiv},
    primaryClass={cs.AI}
}

1.2 latex write

Write the following

\documentclass[UTF8]{ctexart} 

\usepackage{cite} % 导入引用的包,能够使用\cite

\begin{document}

% \cite括号内为引用文献的变量名,\cite前要有一个空格
% 在正文中引用,如果不引用则在参考文献部分中不显示该文献
Learning to Navigate in Cities Without a Map \cite{mirowski2018learning}. 

\bibliography{ref} % 导入lib,ref为“ref.lib"的文件名
\bibliographystyle{ieeetr} % 参考文献排版风格,这个是IEEE transaction的,其他可以自查
\end{document}

The specific packet are to be imported annotation indicates that, as

1.3 compiler display

Standard compiler command is as follows, for the file name "refrences.tex" the tex file, the command line in order to be executed the following command

latex references.tex
bibtex references
latex references.tex
latex references.tex

But for VSCode, due to the latex workshop plug-ins that only need to save is automatically executed latex compilation "latex references.tex", so that concrete steps can be slightly modified as follows

  • After editing the tex file, save (shortcut cmd (ctrl) + s)

  • VSCode run in the terminal command "bibtex reference"

  • Tex back in to save

Need to re-perform the above operation after this time can be a pdf file preview generator good effect is as follows, note that adding i.e. change lib reference file.
Here Insert Picture Description

Published 95 original articles · won praise 30 · views 40000 +

Guess you like

Origin blog.csdn.net/JohnJim0/article/details/103309475