[Tex/LaTex] The system cannot find the file specified

errorswinedt

I have just downloaded WinEdt and written my first code, but it will not run because I keep getting the following error. I am at a loss as to how to fix this.

Error launching Console Application PDFLaTeX …

Command Line: pdflatex.exe –interaction=errorstopmode –synctex=-1 "practice.tex"

Startup Folder: C:\Users\shahand\WinEdt Team\WinEdt 8

The system cannot find the file specified.

Best Answer

There are three different cases for which these errors may occur in WinEdt.


1. No TeX distribution installed

WinEdt is merely an editor, if you want to use TeX you have to download a TeX distribution. See here for more details.


2. No info about the TeX distribution in the system PATH

WinEdt can automatically detect the executables of a TeX distribution only if its bin directory is in the system PATH.

If you have any problems, go to Options menu -> Execution Modes -> Diagnosis page, and you will see something like:

enter image description here

Looking at the "Windows PATH" part of the report, you can see if the bin directory of your distribution has been inserted there. If not, there are two common causes for that:

  1. Something has gone wrong when you installed your TeX distribution and it didn't insert its bin directory in the system PATH.
  2. For some reasons, you've manually deleted the path to the bin directory from the system PATH.

In both cases you'd better insert this information in the PATH manually and then restart WinEdt.

If you don't want to deal with changing the system PATH manually, you can proceed as follows:

  • Choose the right configuration (MiKTeX or TeX Live) from the Options -> Configurations menu.

  • Go to the TeX System page of the Execution Modes interface, insert the root path of your TeX distribution in the TeX Root field and press 'Apply'. WinEdt will retreive all relevant info about your TeX distribution automatically.

enter image description here


3. Problems with a specific application

It can happen that WinEdt finds where your TeX distribution is installed, but it doesn't find a specific application. For example, you have MiKTeX installed and you want to use ConTeXt. Since it is not bundled with MiKTeX, you've installed the standalone version, but WinEdt is not able to find context.exe.

In this case, go to the Console Application page of the Execution Modes interface and you will see that ConTeXt is marked by a question mark.

enter image description here

Insert the full path to context.exe in the Executable field and press 'OK'. WinEdt will now know where context.exe is and you will be able to launch it from within WinEdt.


Other issues

It is unlikely that following the above guidelines you still receive the message

Error launching Console Application ????? ...

Anyway, in such a case, let me know and I will update the answer.