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
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 asfile-name.tex
.file-name.tex
and then compile usingQuickBuild
orPDFLATEX
.2.
cannot detect file-name
andCould not start the command
errors:In TeXmaker one needs to save
.tex
code asfile-name.tex
before compiling otherwise above errors pop out. In TeXworks, it's better handled by suggesting theuntitled-1.tex
file name before compiling.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.
"File not found" error: TexMaker - "File not found" when viewing as pdf. when the
file-name.pdf
is not available/generated fromfile-name.tex
during compilation due to following reasons:solutionsWrong output file path :uncheck "build" subdirectory in Configure window
Lack of read/write output folder permissions : copy
file-name.tex
to another folder and compilerenamed
file-name.pdf
:file-name.tex
andfile-name.pdf
names should be sameMissing
file-name.pdf
: Incase oflatex
compilation only-file-name.dvi
is only available, one may needdvips
andps2pdf
to getcompiled-file.pdf
file-name.pdf
locked by another pdf-viewer : Close the external pdf-viewerUnable to generate
file-name.pdf
: Delete improper.aux
files and why to Delete .aux file in order to successfully compileCommon newbie errors Unable to generate pdf encountered in TeXniccenter are are applicable to TeXmaker as well.
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