VSCode與Latex的參考文獻編輯

來源

寫論文到了添加參考文獻,整合論文修改階段,此處專注添加參考文獻。
如何配置VScode下的Latex編輯環境參考: 這裏
https://blog.csdn.net/jh1513/article/details/103647961

方法

我主要出錯原因如下:
1.要使用 \usepackage{cite}
2. 要設置參考文獻格式 \bibliographystyle{ieeetr}
3. 引用時使用的標籤,要和你 bib 文件中對應的上
4. 生成參考文獻時一種順序爲xe->bib->xe->xe, 也就是說後面要把文章編譯兩次,這個是在VScode latex設置中配置的,具體看前面提到的鏈接。

代碼如下

\documentclass{article}  
    \author{Me}
    \title{Test on Reference}
    \usepackage{cite}

\begin{document}
\maketitle
 
This is a test~\cite{taphoorn2010review} of reference. 

 
\bibliographystyle{ieeetr} % reference style
\bibliography{References} % reference library
 

\end{document}

在這裏插入圖片描述

我的配置文件

這個東西我還沒有搞太懂,但是測試是通過的

{
      // Latex workshop
      "latex-workshop.latex.tools": [
        {
          "name": "latexmk",
          "command": "latexmk",
          "args": [
          "-synctex=1",
          "-interaction=nonstopmode",
          "-file-line-error",
          "-pdf",
          "%DOC%"
          ]
        },
        {
          "name": "xelatex",
          "command": "xelatex",
          "args": [
          "-synctex=1",
          "-interaction=nonstopmode",
          "-file-line-error",
          "%DOC%"
            ]
        },          
        
        {
          "name": "pdflatex",
          "command": "pdflatex",
          "args": [
          "-synctex=1",
          "-interaction=nonstopmode",
          "-file-line-error",
          "%DOC%"
          ]
        },
        {
          "name": "bibtex",
          "command": "bibtex",
          "args": [
          "%DOCFILE%"
          ]
        }
      ],
  "latex-workshop.latex.recipes": [
        {
          "name": "xelatex",
          "tools": [
          "xelatex"
                      ]
                },
        {
          "name": "latexmk",
          "tools": [
          "latexmk"
                      ]
        },

        {
          "name": "pdflatex -> bibtex -> pdflatex*2",
          "tools": [
          "pdflatex",
          "bibtex",
          "pdflatex",
          "pdflatex"
                      ]
        },

        {  
          "name": "xelatex",  
          "tools": [  
            "xelatex"  
          ]  
        },  
        {  
          "name": "xelatex->bibtex->xelatex->xelatex",  
          "tools": [  
            "xelatex",  
            "bibtex",  
            "xelatex",  
            "xelatex", 
          ]  
        } 

      ],



  "latex-workshop.view.pdf.viewer": "tab",  
  "latex-workshop.latex.clean.fileTypes": [
      "*.aux",
      "*.bbl",
      "*.blg",
      "*.idx",
      "*.ind",
      "*.lof",
      "*.lot",
      "*.out",
      "*.toc",
      "*.acn",
      "*.acr",
      "*.alg",
      "*.glg",
      "*.glo",
      "*.gls",
      "*.ist",
      "*.fls",
      "*.log",
      "*.fdb_latexmk"
    ],
    "editor.fontSize": 16,
    "window.zoomLevel": 0,

//    "latex-workshop.view.pdf.external.synctex.command":  "C:\Program Files\SumatraPDF/SumatraPDF.exe",
//    "latex-workshop.view.pdf.external.synctex.args": [
//        "-forward-search",
//        "%TEX%",
//        "%LINE%",
//        "-reuse-instance",
//        "-inverse-search",
//        "code \"C:\\Users\\CHEN\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app\\out\\cli.js\" -r -g \"%f:%l\"",
//        "%PDF%",
//    ],

}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章