(超詳細(xì))vscode中配置latex的方法

vscode中怎么配置latex?下面本篇文章給大家介紹一下vscode配置配置latex的方法(超詳細(xì)),希望對大家有所幫助!

(超詳細(xì))vscode中配置latex的方法

【推薦學(xué)習(xí):vscodevscode

之前一直用的是texstudio寫論文,但我覺得texstudio的ui不好看,加上實(shí)際使用過程中,texstudio的工具欄里面那些功能我一直沒有用過,只需要簡單地編寫tex文檔就足夠了,所以考慮使用一款顏值高并且比較輕量化的文檔編輯器,因此vscode就進(jìn)入了我的視線之中。

經(jīng)過一番配置,我成功地在vscode里面調(diào)好了tex的編寫環(huán)境,個(gè)人體感和texstudio使用感覺差不多,但顏值更好,使用起來比較開心!寫這篇文檔是為了記錄一下配置心得,防止自己忘記,同時(shí)做一個(gè)輸出,讓自己消化一下知識。

需要先說明,這篇文檔里面已經(jīng)默認(rèn)讀者安裝好texlive和vscode。

vscode,在vscode里面看看能不能編譯。

下載好latex模板后,

① 把.tex文件拖入vscode中

② 點(diǎn)擊左邊工具欄的TEX按鈕

③ 找到Build LaTex project,點(diǎn)它!如果不報(bào)錯的話,則運(yùn)行成功。我一般會選Recipe:pdflatex作為編譯手段

④ 找到View LaTex PDF,選擇View in VSCode tab,這個(gè)時(shí)候就會在vscode的頁面中出現(xiàn)生成的pdf了,如下圖右邊白色區(qū)域所示。

(超詳細(xì))vscode中配置latex的方法

要是一切正常,到這里就結(jié)束了。

vscode來配置latex的,感謝這位作者!

要是不會安裝texlive和vscode的話,vscode也有很詳細(xì)的介紹,大家可以看看。

更多關(guān)于VSCode的相關(guān)知識,請?jiān)L問:vscode

(超詳細(xì))vscode中配置latex的方法(超詳細(xì))vscode中配置latex的方法(超詳細(xì))vscode中配置latex的方法(超詳細(xì))vscode中配置latex的方法(超詳細(xì))vscode中配置latex的方法(超詳細(xì))vscode中配置latex的方法

"latex-workshop.latex.tools": [	     {         "name": "pdflatex",         "command": "pdflatex",         "args": [             "-synctex=1",             "-interaction=nonstopmode",             "-file-line-error",             "%DOCFILE%"         ]     },     {         "name": "xelatex",         "command": "xelatex",         "args": [             "-synctex=1",             "-interaction=nonstopmode",             "-file-line-error",             "%DOCFILE%"         ]     },     {         "name": "bibtex",         "command": "bibtex",         "args": [             "%DOCFILE%"         ]     } ], "latex-workshop.latex.recipes": [     {         "name": "xelatex",         "tools": [             "xelatex"         ],     },     {         "name": "pdflatex",         "tools": [             "pdflatex"         ]     },     {         "name": "xe->bib->xe->xe",         "tools": [             "xelatex",             "bibtex",             "xelatex",             "xelatex"         ]     },     {         "name": "pdf->bib->pdf->pdf",         "tools": [             "pdflatex",             "bibtex",             "pdflatex",             "pdflatex"         ]     } ], "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" ], //tex文件瀏覽器,可選項(xiàng)為"none" "browser" "tab" "external" "latex-workshop.view.pdf.viewer": "tab", //自動編譯tex文件 "latex-workshop.latex.autoBuild.run": "onFileChange", //顯示內(nèi)容菜單:(1)編譯文件;(2)定位游標(biāo) "latex-workshop.showContextMenu": true, //顯示錯誤 "latex-workshop.message.error.show": false, //顯示警告 "latex-workshop.message.warning.show": false, //從使用的包中自動補(bǔ)全命令和環(huán)境 "latex-workshop.intellisense.package.enabled": true, //設(shè)置為never,為不清除輔助文件 "latex-workshop.latex.autoClean.run": "never", //設(shè)置vscode編譯tex文檔時(shí)的默認(rèn)編譯鏈 "latex-workshop.latex.recipe.default": "lastUsed", // 用于反向同步的內(nèi)部查看器的鍵綁定。ctrl/cmd +點(diǎn)擊(默認(rèn))或雙擊 "latex-workshop.view.pdf.internal.synctex.keybinding": "double-click",
"latex-workshop.latex.tools": [	     {         "name": "pdflatex",         "command": "pdflatex",         "args": [             "-synctex=1",             "-interaction=nonstopmode",             "-file-line-error",             "%DOCFILE%"         ]     },     {         "name": "xelatex",         "command": "xelatex",         "args": [             "-synctex=1",             "-interaction=nonstopmode",             "-file-line-error",             "%DOCFILE%"         ]     },     {         "name": "bibtex",         "command": "bibtex",         "args": [             "%DOCFILE%"         ]     }],
"latex-workshop.latex.recipes":?[ ????{ ????????"name":?"xelatex", ????????"tools":?[ ????????????"xelatex" ????????], ????}, ????{ ????????"name":?"pdflatex", ????????"tools":?[ ????????????"pdflatex" ????????] ????}, ????{ ????????"name":?"xe->bib->xe->xe", ????????"tools":?[ ????????????"xelatex", ????????????"bibtex", ????????????"xelatex", ????????????"xelatex" ????????] ????}, ????{ ????????"name":?"pdf->bib->pdf->pdf", ????????"tools":?[ ????????????"pdflatex", ????????????"bibtex", ????????????"pdflatex", ????????????"pdflatex" ????????] ????} ],
"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" ],
//設(shè)置為never不清除輔助文件 "latex-workshop.latex.autoClean.run":?"never",
//tex文件瀏覽器,可選項(xiàng)為"none"?"browser"?"tab"?"external" "latex-workshop.view.pdf.viewer":?"tab",
//自動編譯tex文件 "latex-workshop.latex.autoBuild.run":?"onFileChange",
//顯示內(nèi)容菜單:(1)編譯文件;(2)定位游標(biāo) "latex-workshop.showContextMenu":?true,
//顯示錯誤 "latex-workshop.message.error.show":?false, //顯示警告 "latex-workshop.message.warning.show":?false,
//從使用的包中自動補(bǔ)全命令和環(huán)境 "latex-workshop.intellisense.package.enabled":?true,
//設(shè)置vscode編譯tex文檔時(shí)的默認(rèn)編譯鏈 "latex-workshop.latex.recipe.default":?"lastUsed",
//?用于反向同步的內(nèi)部查看器的鍵綁定。ctrl/cmd?+點(diǎn)擊(默認(rèn))或雙擊 "latex-workshop.view.pdf.internal.synctex.keybinding":?"double-click",

以上就是(超詳細(xì))

? 版權(quán)聲明
THE END
喜歡就支持一下吧
點(diǎn)贊9 分享