17

The Texmaker version is 4.0.2.

I have installed the TeXworks a couple of months ago and it works fine. Now I want to try TeXmaker, and it gives

error: could not start the command

enter image description here

I just checked that C:/Program Files/Asymptote/asy.exe and C:/Program Files/gs/gs9.07/bin/gswin32c.exe do not exist

cabohah
  • 11,455
Tiina
  • 491
  • 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 typing at commandline window pdflatex sample2e to get sample2e.pdf. BTW Latest TeXmaker is now 4.0.3 – texenthusiast Aug 02 '13 at 17:56
  • My guess: 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. – texenthusiast Aug 02 '13 at 18:02
  • @texenthusiast I m using windows. and it says the pdflatex is not recognized as an internal or external command. And the file is saved before I try to compile it. – Tiina Aug 02 '13 at 18:12
  • 1
    may be MiKTeX PATH is not set properly test the installation with pdflatex sample2e at commandline window to ensure if it's correct – texenthusiast Aug 02 '13 at 18:13
  • 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 – texenthusiast Aug 02 '13 at 18:15
  • @texenthusiast in the command line, I entered the folder that contains pdflatex, and run pdflate sample2e, it gives "This is pdfTeX, Version 3.1415926-2.4-1. entering extended mode ! I can't write on file `sample2e.log'." I haven't tried the reset yet. – Tiina Aug 02 '13 at 18:28
  • change directory(cd) to Desktop and run from that commandline window or any where folder where you have write permission , don't go to MiKTeX bin folder – texenthusiast Aug 02 '13 at 18:31
  • @texenthusiast in cmd, how to deal with the spaces in the command, like this C:\Program Files (x86)\MiKTeX 2.9\pdflatex example2e – Tiina Aug 02 '13 at 18:57
  • i recommand TexStudio +MicTex. Texworks, Texmaker Texmakerx TexStudio this 4 editors i think TexStudio is the best . it's personal view, it's up to you. – Nax Aug 03 '13 at 06:34

6 Answers6

16

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.

7

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!

Skeleton Bow
  • 1,179
5

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.
  • 1
    Works for me. In my understanding, Textmaker needs to run "pdflatex.exe" to compile. In this case, because it cannot find pdflatex.exe provided by MiKTeX, we manually let Textmaker know where pdflatex.exe is by setting as the above. – Dane Lee Dec 06 '19 at 07:46
1

You have to install TeX Live. Then it can start the command. http://tug.org/texlive/acquire-netinstall.html

Ali
  • 11
  • This answer needs more upvotes. I had the same problem. When you install TexMaker it actually doesn't install all the packages. You also need Tex Live. – Michael McLaughlin Jul 12 '23 at 05:59
0

I simply changed the pdflatex to lualatex.exe under the build section.. worked for me :)

dyuti
  • 11
  • 3
    Welcome to TeX.SX! Compiling with lualatex instead of pdflatex is not really the same thing. – egreg Feb 20 '16 at 11:39
0

For those who are using linux, to solve the problem, get installed biber and biblatex on your system by these command lines:

sudo apt-get install biber
sudo apt-get install biblatex

This is in case where you are making the bibliography with biblatex.

Torbjørn T.
  • 206,688