[Tex/LaTex] How to configure LaTeX in Visual Studio Code to compile PSTricks or dvips

dvipseditorsps2pdfpstricksvisual-studio-code

I would like to know how I should configure or what I should install to be able to compile graphics with PSTricks, for example in an editor such as TeXMaker, simply compile in the form latex + dvips + ps2pdf followed by viewing with a PDF reader. I would like to know if this type of settings is possible in Visual Studio Code. How to configure the settings.json?

Best Answer

Create a file latexmkrc or .latexmkrc (Linux macOS) in your home directory with

$pdf_mode=2;
$latex = 'latex -interaction=nonstopmode -shell-escape';
$pdf_previewer = 'start evince';

For the viewer choose whatever you use with your system. Then you can run the recipe Recipe:latexmk (latexmkrc) and you'll get the pdf.

enter image description here