ajshort / vscode-latex-preview

Compilation and embedded preview of LaTeX documents for Visual Studio Code
MIT License
32 stars 11 forks source link

additional pdflatex command line arguments #8

Open tux19 opened 7 years ago

tux19 commented 7 years ago

I use minted for code formattin in my thesis. Is there a possibility to add additional commandline arguments?

I found the file in your source code (document-provider.ts) but could not find the file on my system, i think the extension gets compiled?

tux19 commented 7 years ago

I found the source code location. For minted -shell-escape needed to be used.

The problem is that minted relies on the root directory, or alternatively the pdflatex -outputdirectory has to be passed in the sourcecode.

Since latexpreview uses temporary output directories i see no way to use minted with it :) and therefore i would label this issue as 'future request' ... maybe other tools need additional commandline arguments 😄

phyrog commented 7 years ago

I am currently facing the same problem. This is not solvable in a nice way, since minted can not detect the command line switch -output-directory. A workaround however might be to set an environment variable to the output directory during the build, so that you can access the output path in the TeX file like described here. As far as I see, this would only require a change to this line to include an env object containing the path.

I might add a PR for this later, if successful.