2

When I perform ps->pdf or XeLaTeX I get error

'mgs.exe' is not recognized as an internal or external command, operable program or batch file.

The solution for this is to add ...\miktexport\miktex\bin to the PATH variable, because mgs.exe exist in this folder.

I did this and now I have no problems to compile my document via command line.

However I would like to call XeLaTeX via TexMaker shortcut but in this case I still get that mgs is not recognized. I guess that this is because portable miktex has its own PATH variable, which is different from system PATH variable

So I still cannot call XeLaTeX from portable TexMaker, since mgs.exe is still not recognized. In TeXMaker configuration I have the following command for XeLaTeX

"../miktexport/miktex/bin/xelatex.exe" -synctex=1 -interaction=nonstopmode %.tex

Any solution?

  • Go to the command line and check if you are able to run xelatex from there. Also, check that the path given to xelatex is correct. The "../" indicate that the command is run from the parent directory of "miktexport". If that not correct, the command will fail. Since the .exe file is in the path, you may try to remove the path from the configuration file, i.e. use "xelatex.exe -synctex=1 -interaction=nonstopmode %.tex". – Sveinung Jun 25 '15 at 10:49
  • I finally solved the problem. The solution is to insert appropriate mikex/bin path in TexMaker via Configure Texmaker->Add To PATH option, but then you MUST RESTART TexMaker, otherwise the changes in PATH variable will not be made. I spend whole day on this problem, and next day when I open program again everything was worked. – Dejan Jun 25 '15 at 14:00
  • 1

Your Answer

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

Browse other questions tagged or ask your own question.