latex_setting
2019.12.1 win10+latex+sumatrapdf+vscode
1.version:
tex live 2019 sumatrapdf Portable:SumatraPDF-3.1.2-64.zip vscode 1.40.2
2.vscode
install-extension:
latex workshop, latex-formatter, latex utilities
vocode setting.json:
{
{
"latex-workshop.latex.recipes": [
{
"name": "PDFlatex",
"tools": [
"pdflatex"
]
},
{
"name": "pdflatex->bibtex->pdflatex->pdflatex",
"tools": [
"pdflatex",
"bibtex",
"pdflatex",
"pdflatex"
]
},
{
"name": "xelatex",
"tools": [
"xelatex"
]
},
{
"name": "xelatex->bibtex->xelatex->xelatex",
"tools": [
"xelatex",
"bibtex",
"xelatex",
]
}
],
"latex-workshop.latex.tools": [
{
"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-workshop.latex.clean.fileTypes": [
"*.aux",
"*.bbl",
"*.blg",
"*.idx",
"*.ind",
"*.lof",
"*.lot",
"*.out",
"*.toc",
"*.acn",
"*.acr",
"*.alg",
"*.glg",
"*.glo",
"*.gls",
"*.ist",
"*.fls",
"*.log",
"*.fdb_latexmk"
],
"latex-workshop.view.pdf.ref.viewer":"external",
"latex-workshop.view.pdf.viewer": "external",
"latex-workshop.view.pdf.external.viewer.command": "C:/sumatrapdf/SumatraPDF.exe",
"latex-workshop.view.pdf.external.viewer.args": [
"--unique",
"%PDF%"
],
"latex-workshop.view.pdf.external.synctex.command": "C:/sumatrapdf/SumatraPDF.exe",
"latex-workshop.view.pdf.external.synctex.args": [
"-forward-search",
"%TEX%",
"%LINE%",
"%PDF%"
],
"http.proxy": "http://127.0.0.1:19966",
}
you can delete these:
“http.proxy”: “http://127.0.0.1:19966”,
3.SumatraPDF
you need use Portable version
(Installer version may be wrong).
you unzip SumatraPDF-3.1.2-64.zip to “C:\sumatrapdf”
open exe->Settings->Advanced Options, insert:(the path is related to vscode install method.)
InverseSearchCmdLine = "C:\Program Files\Microsoft VS Code\Code.exe" "C:\Program Files\Microsoft VS Code\resources\app\out\cli.js" -g "%f":"%l"
referance:
https://www.sumatrapdfreader.org/settings3.2.html
https://github.com/James-Yu/LaTeX-Workshop/wiki/View#latex-workshopviewpdfrefviewer