I'm using LyX 1.6.9 with MikTex on Windows XP.

I want to use the "minted" package (for colored listings). This package uses Pygmentize to color the output. However, to do so, it uses \immediate\write18, which basically runs a command.

By default, Latex is not allowed to execute commands and throws instead the following error:

runsystem(echo testing)...disabled (restricted).

Turns out with Miktex on Windows XP, you must append a flag to the latex command which is to compile your code (cf. https://stackoverflow.com/questions/3300497/using-minted-source-code-latex-package-with-emacs-auctex):


Since I'm using LyX, how do I add a flag / switch / option (whatever you call it) to the Latex command which compiles my LyX code?

I am very reluctant to navigating through Windows' CMD for all my further Latex compiling and I'm pretty sure there is a way to add that in LyX. I haven't found anything on their website nor on Google/Duckduckgo.

Any help will be appreciated. Thanks!


2 Answers 2


Under the Tools menu, choose Preferences. Then, in preferences dialog, under File Handling, in Converters, find the one for converting from TeX to PDF that you use (pdflatex, lualatex, xelatex, ...) and edit its command line.

  • Thanks it worked marvelously! P.S.: I'll vote this post up as soon as I get enough reputation...
    – ChrisR
    Apr 22, 2011 at 6:28


it is a german menu but easy to understand

  • Thanks for your input and the screenshot. It was helpful. P.S.: I'll vote this post up as soon as I get enough reputation...
    – ChrisR
    Apr 22, 2011 at 6:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.