I have a problem with LaTeX. I have installed MiKTeX 2.9 and Texmaker, and when I try to compile a .tex file in Texmaker, I get the error

Could not start the command

When I try to build it from the terminal (using pdfLaTeX) it works, though.

By the way, I have found the same question here, but when I try to do as in the answers (i.e., go to options > configure and then choose the correct documents for LaTeX and pdfLaTeX) it doesn't work. What can I do, other than build my files every time from the terminal?

My configuration

  • Have you made sure latex and friends are in your path? – Sean Allred Apr 5 '13 at 22:56
  • @SeanAllred: Sorry, what do you mean with this? – Daniel Robert-Nicoud Apr 5 '13 at 22:58
  • 1
    Actually, after re-reading your question, I don't suppose that will help much. If it works from the command line, then it's in your $PATH. What exactly is your configuration for TeXMaker? Are you sure you're starting 'Quick Build'? Try just doing 'pdfLaTeX' from the drop-down, maybe? – Sean Allred Apr 5 '13 at 23:04
  • 2
    @DanielRobert-Nicoud There we go ... LaTeX should be latex -interaction=nonstopmode %.tex and pdfLaTeX pdflatex -synctex=1 -interaction=nonstopmode %.tex. – doncherry Apr 5 '13 at 23:30
  • 1
    @doncherry: Wow! It worked! Thank you very, very much! Post your comment as an answer and I'll mark it as the accepted answer, if you want. – Daniel Robert-Nicoud Apr 5 '13 at 23:33
up vote 14 down vote accepted

The paths to your LaTeX und PdfLaTeX are wrong. latexsym.sty is a package, which isn’t ever gonna compile anything, and pdfetex.exe is a compiler, but definitely not the one you’re looking for (see e.g. Glossary of TeX and LaTeX terms). If MiKTeX is in your PATH varible (which usually is the case if you installed it normally), you don’t need to specify the full path to the directory, the name of the compiler/program with the desired options is entirely sufficient. Basically, you just enter what you would enter when compiling from the command line, just with %.tex as a placeholder for the file to compile. So here’s the right (standard) configuration:

LaTeX: latex -interaction=nonstopmode %.tex

PdfLaTeX: pdflatex -synctex=1 -interaction=nonstopmode %.tex

  • 2
    Good points very nice :). Some ideas if you like: How about including command line arguments for xelatex,latexmk,bib(la)tex etc.. with a high-res screenshot of TeXmaker configure window to avoid future Q or use as good citing ref. To verify MiKTeX bin is added to PATH , just incase How to Verify/Test a latex installation: Commandline/Terminal:. Feel free i may be wrong also. – texenthusiast Apr 6 '13 at 3:18

Sorry for opening an old issue, but the above did not work for me. What worked for me was to "Refresh FNDB" from MiKTeX Options (Start -> MiKTeX 2.9 -> Maintenance -> Settings). Note also that a warning box popped up after clicking Settings, which goes away after refreshing FNDB.

  • For those are using windows 8.0 or 8.1 (although 10 has been released shortly), they may go to start screen rather than start menu (it's not exist actually), and open MiKTeX sitting, some details. Perfect, this helped me a lot; I should not say... but, I had to ... – AlFagera Nov 25 '15 at 9:29

(This is a bit different than the OP's problem, but the error message is the same. I hope this helps someone else:)

Having never used LaTeX before, I started off by installing Texmaker, and encountered this error. I didn't know that the LaTeX tool is not bundled with the editor, and must be installed separately.

In my case, I was able to fix the above error message by downloading the proTeXT tool from the LaTeX site:

http://www.latex-project.org/

...and running the MikTeX installer.

protected by samcarter May 5 '17 at 16:18

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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