{
//何時構建 LaTeX 專案 onFileChange:檔案更改時編譯檔案 onSave:儲存程式碼時自動編譯檔案 never:從不自動編譯)
"latex-workshop.latex.autoBuild.run": "never",
//顯示上下文選單
"latex-workshop.showContextMenu": true,
//啟用智慧感知功能包功能
"latex-workshop.intellisense.package.enabled": true,
//禁用錯誤資訊顯示
"latex-workshop.message.error.show" : false,
//禁用警告資訊顯示
"latex-workshop.message.warning.show": false,
//recipes編譯鏈中使用的編譯命令
"latex-workshop.latex.tools": [
{
"name": "latexmk",
"command": "latexmk",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"-pdf",
"%DOCFILE%"
]
},
{
"name": "latexmkrc",
"command": "latexmkrc",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"-pdf",
"%DOCFILE%"
]
},
{
"name": "lualatex",
"command": "lualatex",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"-pdf",
"%DOCFILE%"
]
},
{
"name": "xelatex",
"command": "xelatex",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"-pdf",
"%DOCFILE%"
]
},
{
"name": "pdflatex",
"command": "pdflatex",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"%DOCFILE%"
]
},
{
"name": "bibtex",
"command": "bibtex",
"args": [
"%DOCFILE%"
]
}
],
//配方,編譯順序在左側LaTex中可以看到
"latex-workshop.latex.recipes": [
{
"name": "latexmk",
"tools": [
"latexmk"
]
},
{
"name": "latexmk(latexmkrc)",
"tools": [
"latexmkrc"
]
},
{
"name": "latexmk(luatex)",
"tools": [
"lualatex"
]
},
{
"name": "xelatex",
"tools": [
"xelatex"
]
},
{
"name": "bibtex",
"tools": [
"bibtex"
]
},
{
"name": "pdf->bib->pdf->pdf",
"tools": [
"pdflatex",
"bibtex",
"pdflatex",
"pdflatex"
]
},
{
"name": "xe->bib->xe->xe",
"tools": [
"xelatex",
"bibtex",
"xelatex",
"xelatex"
]
},
{
"name": "pdflatex",
"tools": [
"pdflatex"
]
}
],
//何時刪除中間過程檔案 onBuilt:編譯時清除過程檔案;onFailed:當編譯失敗時,清除輔助檔案:never:不清除過程檔案。
"latex-workshop.latex.autoClean.run": "onBuilt",
//預設編譯順序 first:使用latex-workshop.latex.recipes中的第一條編譯鏈,lastUsed:使用最近的一次編譯所用的編譯鏈
"latex-workshop.latex.recipe.default": "lastUsed",
//反向同步快捷鍵繫結 ctrl-click: 為預設選項,使用Ctrl/cmd+滑鼠左鍵單擊;double-click : 使用滑鼠左鍵雙擊
"latex-workshop.view.pdf.internal.synctex.keybinding": "double-click",
//檢視LaTexPDF tab: 在VSCode標籤;browser: 在網路瀏覽器;external: 在外部檢視器
"latex-workshop.view.pdf.viewer": "external",
//PDF 參考文獻檢視 auto : 自動;tabOrBrowser : vscode內建pdf檢視器或預設瀏覽器;external : 外部pdf檢視器。
"latex-workshop.view.pdf.ref.viewer":"external",
//指定了用於檢視 PDF 的外部檢視器的命令的相關路徑
"latex-workshop.view.pdf.external.viewer.command": "C:/App/SumatraPDF/SumatraPDF.exe",
//latex-workshop.view.pdf.external.view .command的引數 %PDF%是用於生成PDF檔案的絕對路徑的佔位符
"latex-workshop.view.pdf.external.viewer.args": [
"%PDF%"
],
//指定在使用外部 PDF 檢視器時,觸發 SyncTeX(同步預覽)功能的命令的相關路徑
"latex-workshop.view.pdf.external.synctex.command":"C:/App/SumatraPDF/SumatraPDF.exe", //定位
//指定在使用外部 PDF 檢視器進行 SyncTeX(同步預覽)操作時的引數
"latex-workshop.view.pdf.external.synctex.args":[
"-forward-search",//執行正向搜尋操作
"%TEX%",//觸發syncTeX時,副檔名為.tex的LaTeX檔案路徑
"%LINE%",//原始檔中的行號資訊
"-reuse-instance",//表示複用外部 PDF 檢視器的例項,避免每次都啟動新的例項,提高效率。
"-inverse-search",//執行反向搜尋操作
"\"C:/App/Microsoft VS Code/Code.exe\" \"C:/App/Microsoft VS Code/resources/app/out/cli.js\" -r -g \"%f:%l\"", // 定位到VScode所在的.exe檔案
"%PDF%"//在觸發SyncTeX時,會被替換為生成的PDF檔案路徑
]
}