Texmaker gives an error: could not start the command

Please have a look at this answer Unable to compile TeXmaker 4.0.2 with MiKTeX 2.9 and based on your position/error apply the related trick assuming MiKTeX is installed properly and test the installation by following steps

  • when you run cmd from Start Menu search it would open at C:\Users\username>
  • type cd Desktop to get C:\Users\username\Desktop>
  • now type pdflatex sample2e to get sample2e.pdf then it is confirmed that installation is working properly and Path is set ok.

  • also Type at C:\Users\username\Desktop> Path to see if there is MiKTeX bin like C:\Program Files (x86)\MiKTeX 2.9\bin depending where it was installed on 32 bit or 64 bit OS and MiKTeX Distro

Latest TeXmaker is 4.0.3 released on July 29th 2013.

In Worst case Options-->Settings file-->Reset settings and Remember to save the settings file somewhere for backup incase required. Restart TeXmaker so that TeXmaker automatically configures the latex dvips executables

Note : You might need to save the file as filename.tex before running QuickBuild. Make sure Ghostscript is installed incase of latex-dvips-ps2pdf route compilation/PSTricks otherwise use pdflatex compilation.


For those of you who have MiKTeX install but still can't seem to solve this even with the other answers here, I found a solution (for Windows).

If you have have both MiKTeX and Texmaker installed on Windows, but get the could not start the command error, try this:

  1. Locate the pdflatex.exe file. This is a file which should have been installed along with MiKTeX. Go to the folder in with MiKTeX was installed. Use the search feature to find pdflatex.exe. Right click on it and copy the file path, so what you copied should be something like this: C:\path\to\pdflatex.exe. If you don't copy the end pdflatex.exe (because Windows only shows the file path excluding the name in the About box) don't worry, you can append \pdflatex.exe to it later!
  2. Go to Texmaker and click Options > Configure Texmaker
  3. In the page that comes up the second label you'll see is called "PdfLaTeX." It the box next to it you need to paste the path in. Select the word pdflatex which is in that box and paste the file path in. Don't forget to put it in quotes! Now, in that box, you should see something like this: "C:\path\to\pdflatex.exe" -synctex=1 -interaction=nonstopmode %.tex
  4. Click okay and you're good to go! Try building something. You shouldn't see an error now.

Hopefully this helps someone and saves them from a lot of searching!


it is very simple, in that box, you should see something like this: "C:\path\to\pdflatex.exe" -synctex=1 -interaction=nonstopmode %.tex

  • enter to local c.
  • enter to program or prgrame file.
  • search about MiKTeX 2.9
  • search about miktex
  • search about bin
  • search about x64
  • search about pdflatex.exe
  • copy the link as: C:\Program Files\MiKTeX 2.9\miktex\bin\x64\pdflatex.exe
  • open text maker and follow Options > Configure Texmaker
  • past it PdfLatex field as: "C:\Program Files\MiKTeX 2.9\miktex\bin\x64\pdflatex.exe" -synctex=1 -interaction=nonstopmode %.tex
  • and it will be run successful INCHALLAH.

Tags:

Texmaker