I often work on Windows, so need to use MiKTeX. I recently found the minted
package, which needs to call the external command pygmentize
. I currently call xelatex
with the -shell-escape
option to support this, but I'd rather not give malicious latex files complete access to my system. TeXLive has the --restricted-shell-escape
option, which is what I want, but it doesn't seem to be available on MiKTeX. I did find a passing reference to --shell-restricted
, but I don't know if that's what I want, and if it is what I want I don't know how to use it.
Is --shell-restricted
a way to tell XeLaTeX to run pygmentize
but not del /F /S /Q C:\*.*
? If so, how do I use it? If not, is there such a way and how do I use it? If you can, could you also link me to the official documentation on the subject?
--restrict-write18
.--shell-restricted
could work too - miktex often has alias names for some commands. Restricted write18 is enabled by default, but I don't know if your command is in the list of secure commands.minted
package explicitly checks if\pdfshellescape
equals 1, so you'd have to change the package, even if you succeed into puttingpygmentize
ampng the allowed programs for restricted shell escape.pygmentize
is specifically available). That still leaves the problem of making it available. Now that I realize that\write18
is the method of accessing external commands, I can check its documentation and see if I find something.