# PdfLaTeX in Texmaker doesn’t work: “Could not start the command”

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 the build my files every time from the terminal?

-
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
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
@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
@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

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`
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