[Tex/LaTex] Unable to compile TeXmaker 4.0.2 with MiKTeX 2.9

compilingerrorstexmaker

I just downloaded first MiKTex 2.9 and then TeXmaker 4.0.2. However, I am having a hard time getting it to compile. I always get the info box saying Can't detect the file name followed by the info box saying Could not start the command.

In the Configure Texmaker -> Commands options box I have set the path in the bottom to:

"C:/Program Files (x86)/MiKTeX 2.9/miktex/bin"

I have also tried putting this file path in the specific command paths above (together with the filenames). But neither helps. I have been looking around at this and other Tex pages, and other people have asked the same question. I have tried to do, what they were advised to do, but is has not help.

I hope that somebody can help me.

Best Answer

Common newbie mistakes/errors Using TeXmaker

  1. From Version 4.1 onwards, A document must be saved with an extension (and without spaces or accents in the name) before being used by a command pops out when the file is compiled (Press QuickBuild) before saving it as file-name.tex.

    • Save the file as file-name.tex and then compile using QuickBuild or PDFLATEX.

2.cannot detect file-name and Could not start the command errors:

  • In TeXmaker one needs to save .tex code as file-name.tex before compiling otherwise above errors pop out. In TeXworks, it's better handled by suggesting the untitled-1.tex file name before compiling.

    1. Error: Log file not found! :Texmaker (Windows version) - first use - Error: Log file not found!.

      • when compiling a .tex document in TeXmaker without installing LaTeX distribution MiKTeX/TeXLive/MacTeX etc. Since TeXmaker is just like any LaTeX editor needs LaTeX distribution to compile .tex and output .pdf

      • "Note : a LaTeX distribution must be installed on the system to use TeXmaker" at TeXmaker Download page .

      • Verify a latex installation: Commandline/Terminal after installation and In MiKTeX, after installation,Computer needs a restart to get miktex bin path added to system PATH automatically.

    2. "File not found" error: TexMaker - "File not found" when viewing as pdf. when the file-name.pdf is not available/generated from file-name.tex during compilation due to following reasons:solutions

  • Wrong output file path :uncheck "build" subdirectory in Configure window

  • Lack of read/write output folder permissions : copy file-name.tex to another folder and compile

  • renamed file-name.pdf : file-name.tex and file-name.pdf names should be same

  • Missing file-name.pdf : Incase of latex compilation only -file-name.dvi is only available, one may need dvips and ps2pdf to get compiled-file.pdf

  • file-name.pdf locked by another pdf-viewer : Close the external pdf-viewer

  • Unable to generate file-name.pdf: Delete improper .aux files and why to Delete .aux file in order to successfully compile

  • Common newbie errors Unable to generate pdf encountered in TeXniccenter are are applicable to TeXmaker as well.

    1. Finally configure TeXmaker whenever necessary as defaults work fine.

      • Typical command line arguments to place in the configure TeXmaker window :adding flag -synctex=1 to enable synctex and -shell-escape to run external programs(when neccessary)

      • pdflatex -synctex=1 -interaction=nonstopmode %.tex

      • latex -interaction=nonstopmode %.tex

      • xelatex -synctex=1 -interaction=nonstopmode %.tex

Related Links: