VS Code settings
The snippet can be accessed without any authentication.
Authored by
Jan Wille
I have now also published the VS code Settings and recomended Extentions on the example Branche. So it's brobably easysest to just clone that Project and go from there. But I will still keep this here:
Here are my latex specific settings for VS code. They set it up so the .pdf
file is produced next to its .tex
file while all additional files are put in a subdirectory called .aux/
. Cleaning is also expaned to fit that.
There are additional tools for pdf optimisation using ghostscript.
Only tested with MikTex
!
settings.json 2.51 KiB
{
"latex-workshop.showContextMenu": true,
"latex-workshop.latex.autoBuild.run": "onSave",
"latex-workshop.latex.outDir": "%DIR%",
"latex-workshop.latex.recipes": [
{
"name": "latexmk",
"tools": [
"latexmk"
]
},
{
"name": "pdflatex",
"tools": [
"pdflatex"
]
},
{
"name": "biber",
"tools": [
"biber"
]
},
{
"name": "pdflatex ➞ biber ➞ 2× pdflatex",
"tools": [
"pdflatex",
"biber",
"pdflatex",
"pdflatex"
]
},
{
"name": "Optimize PDF",
"tools": [
"gs opt printer"
]
}
],
"latex-workshop.latex.tools": [
{
"name": "latexmk",
"command": "latexmk",
"args": [
"-pdf",
"-interaction=nonstopmode",
"-file-line-error",
"-synctex=1",
"-aux-directory=%OUTDIR%/.aux",
"-output-directory=%OUTDIR%",
"%DOC_EXT%"
],
"env": {
"TEXINPUTS": "%WORKSPACE_FOLDER%/src/"
}
},
{
"name": "pdflatex",
"command": "pdflatex",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"-aux-directory=%OUTDIR%/.aux",
"-output-directory=%OUTDIR%",
"%DOC%"
],
"env": {
"TEXINPUTS": "%WORKSPACE_FOLDER%/src/"
}
},
{
"name": "biber",
"command": "biber",
"args": [
"-output-directory=%OUTDIR%/.aux",
"%DOCFILE%"
]
},
{
"name": "bibtex",
"command": "bibtex",
"args": [
"-include-directory=.aux",
"%OUTDIR%/.aux/%DOCFILE%"
]
},
{
"name": "gs opt printer",
"command": "mgs",
"args": [
"-sDEVICE=pdfwrite",
"-dPDFSETTINGS=/printer",
"-dPrinted=false",
"-f%OUTDIR%/%DOCFILE%.pdf",
"-o%OUTDIR%/%DOCFILE%_optimized.pdf"
]
}
]
}
Please register or sign in to comment