A particular latex package (minted: https://github.com/gpoore/minted ) requires that I pass the -shell -escape arguments when compiling a document, how do I do this in VS Code with Tex Workshop? I've tried fumbling with the toolchain but to no avail. I'd simply like to add the parameters to the %!TEX=xelatex command I already have. Is this possible?
Append the arguments to args. Each argument in one line.
I've tried to append it like this:
{
"command": "minted",
"args": [
"-shell",
"-escape",
"-pdf",
"%DOC%"
]
}
This doesn't work. Each argument is one line, github is just formatting it into one.
Appending it to the default toolchain also does not work.
I've fixed it. You need to append "-shell-escape" instead of "-shell", "-escape" as it is one argument and not two.
@Spirits- Hi, I'm wondering that where did you pass the argument to? I opened User Setting and found out these. Did you pass the argument { "command": "minted", "args": [ "-shell-escape", "-pdf", "%DOC%" ] } to each one compiler (latexmk, pdflatex, bibtex)?
"latex-workshop.latex.tools": [
{
"name": "latexmk",
"command": "latexmk",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"-pdf",
"%DOC%"
]
},
{
"name": "pdflatex",
"command": "pdflatex",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"%DOC%"
]
},
{
"name": "bibtex",
"command": "bibtex",
"args": [
"%DOCFILE%"
]
}
]
I have just figured out what to do, add the args as indicated below:
{
"name": "latexmk",
"command": "latexmk",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"-pdf",
"--shell-escape",
"%DOC%"
]
}
Refer to issue #420
Most helpful comment
I have just figured out what to do, add the args as indicated below:
Refer to issue #420