Unable to compile TeXmaker 4.0.2 with MiKTeX 2.9

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:

  • Impossible to save LaTeX file in Texmaker on Windows from TeXmaker version 4.0 and 4.0.1 (compiled with Qt5).

  • TeXmaker documentation and Installation Screenshot tutorials (FR)

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

  • Biblatex + Biber + Texmaker + MiKTeX

  • Configure forward search with Texmaker + SumatraPDF


I faced the same problem and tried pretty much everything mentioned in the above answer with no luck. What worked for me though is uninstalling MiKTex and reinstalling a 64-bit version as administrator (for all users). I read this solution somewhere and it worked. I am sorry I don't know the reason why it worked.