I’m very new to LaTeX and its distributions so this might be a very newbie question.
I was following this tutorial and I’m not being able to compile the document. The code so far is very simple i don’t think there are any typos and also I did not find a similar question in the forum.
can someone point me in the right direction ?
I’m using windows XP and I’ve installed TexMaker 4.4.1 found here
The code I have so far is simply:
\documentclass[11pt]{article}
\begin{document}
This is my first LaTeX document.
\end{document}
the error I’m getting is:
Could not start the command. pdflatex -synctex=1
-interaction=nonstopmode %.tex
Cheers !
asked Feb 23, 2015 at 13:32
If you meet the error:
Error : could not start the command
while executing TexMakerX commands in Windows 7 x64, it is probably due to environment path of LaTex compiler.
The following steps may help you solve this error:
-
Make sure that you did install a LaTex compiler like MiKTeX. You know, TexMakerX is just an editor of latex input, not a compiler.
-
Locate the bin directory in the installation directory of the LaTex compiler.
-
Add the directory of bin like
d:\Program Files (x86)\MiKTeX 2.9\miktex\bin
to the environment paths of Windows. -
Right click computer in start menu, choose properties.
-
Find the «Advanced system settings» in upper left corner.
-
Click the button «Environment Variables».
-
Find the row of variable path in the group of «System Variables» and add bin path like
;d:\Program Files (x86)\MiKTeX 2.9\miktex\bin
to the tail. -
Remember to add a semicolon to separate different path.
Then, try it again…
double-beep
5,04017 gold badges33 silver badges41 bronze badges
answered Oct 27, 2018 at 19:46
I found this question on another forum and it says that you should install MiKTex for windows too. Worked like a charm !
answered Feb 23, 2015 at 14:15
Pedro BrazPedro Braz
2,2813 gold badges26 silver badges49 bronze badges
I came across a page which mentions that MiKTeX has two major bugs due to which users haven’t been able to compile at all.
Use TeX Live compiler instead
Source
https://wiki.lyx.org/Windows/TeXLive
answered Jul 27, 2020 at 10:52
1
Most of the time errors occur due to space in the file names. while saving the Latex file one should always remember don’t put spaces in between the file name.
answered Sep 23, 2021 at 2:37
I messed up a bit with TekLive and TexMaker in my Ubuntu 14.04. I unistalled and re-installed both a couple of times.
Now, if I go to terminal and do
pdflatex -synctex=1 -interaction=nonstopmode test.tex
My test.tex
file is compiled as it should be. The problem is when I try to do this from TexMaker. I get the error message
Could not start the command.
pdflatex -synctex=1 -interaction=nonstopmode %.tex
I don’t get it. I added /usr/local/texlive/2014/bin/i386-linux
to PATH — of course I did, otherwise pdflatex
wouldn’t run from the terminal as it did. I don’t know what else to do. I found this question in SO but all the answers mentioned installing (again) TexLive. I mean, my latex seems to be working, so I don’t see any point in redoing that. I uninstalled and installed again TexMaker 4.3 by downloading the appropriate version from here and then doing
sudo gdebi texmakerQT5_ubuntu_14.04_4.3_i386
and got no error messages when installing.
What’s going on?
Well, your code has some issues:
- You have to comment out the second line (
% Only :
). - There are many linebreaks after a
\
. This causes the braces ({
) to be unescaped. - It is very bad style. All of the text goes on one line and there’s a real misuse of math mode. Best thing to do: Look at the source code, discard that one and rewrite the content from scratch.
I do not know Mathematica well enough to judge its LaTeX capabilities, but this is definitely a bad sign.
Code:
%% AMS-LaTeX Created with the Wolfram Language for Students - Personal Use
% Only : www.wolfram.com
\documentclass{article}
\usepackage{amsmath, amssymb, graphics, setspace}
\newcommand{\mathsym}[1]{{}}
\newcommand{\unicode}[1]{{}}
\newcounter{mathematicapage}
\begin{document}
\begin{doublespace}
\noindent\(\pmb{\text{ExportString}[\text{Nest}
[1+1/\#\&,x,5],\text{{``}TeX{''}}]}\)
\end{doublespace}
\begin{doublespace}
\noindent\(\text{$\%\%$ AMS-LaTeX Created with the Wolfram Language for Students - Personal Use Only : www.wolfram.com$\backslash $n$\backslash
$n$\backslash \backslash $documentclass$\{$article$\}\backslash $n$\backslash \backslash $usepackage$\{$amsmath, amssymb, graphics, setspace$\}\backslash $n$\backslash $n$\backslash \backslash $newcommand$\{\backslash \backslash $mathsym$\}$[1]$
\{\{\}\}\backslash $n$\backslash \backslash $newcommand$\{\backslash
\backslash $unicode$\}$[1]$\{\{\}\}\backslash $n$\backslash $n$\backslash
\backslash $newcounter$\{$mathematicapage$\}\backslash $n$\backslash
\backslash
$begin$\{$document$\}\backslash $n$\backslash $n$\backslash \backslash
$[1+$\backslash \backslash $frac$\{$1$\}\{$1+$\backslash \backslash $frac$
\{$1$\}\{$1+$\backslash
\backslash $frac$\{$1$\}\{$1+$\backslash \backslash $frac$\{$1$\}
\{$1+$\backslash \backslash $frac$\{$1$\}\{$x$\}\}\}\}\}\backslash \backslash
$]$\backslash $n$\backslash $n$\backslash \backslash $end$\{$document$\}\backslash $n}\)
\end{doublespace}
\end{document}
Related videos on Youtube
14 : 36
How to use COUNTIF and COUNTIFS in Microsoft Excel
20 : 07
2. Markdown & LaTeX — Jupyter Tutorial (IPython 3)
20 : 50
The power of vulnerability | Brené Brown
09 : 20
DAX Fridays! #148: CONVERT and resolve variant data-type error
10 : 00
Getting stuck in the negatives (and how to get unstuck) | Alison Ledgerwood | TEDxUCDavis
Comments
-
I have output a Latex file from Wolfram Mathematica using the first very simple example shown at https://reference.wolfram.com/language/ref/format/TeX.html
I then tried to compile it with TexMaker 4.5 on a Macbook Version 10.9.4 (Mavericks). I couldn’t get the pdf, because of error:"pdflatex" -synctex=1 -interaction=nonstopmode %.tex
Anybody knows why? The full text is:
%% AMS-LaTeX Created with the Wolfram Language for Students - Personal Use Only : www.wolfram.com \documentclass{article} \usepackage{amsmath, amssymb, graphics, setspace} \newcommand{\mathsym}[1]{{}} \newcommand{\unicode}[1]{{}} \newcounter{mathematicapage} \begin{document} \begin{doublespace} \noindent\(\pmb{\text{ExportString}[\text{Nest} [1+1/\#\&,x,5],\text{{``}TeX{''}}]}\) \end{doublespace} \begin{doublespace} \noindent\(\text{$\%\%$ AMS-LaTeX Created with the Wolfram Language for Students - Personal Use Only : www.wolfram.com$\backslash $n$\backslash $n$\backslash \backslash $documentclass$\{$article$\}\backslash $n$\backslash \backslash $usepackage$\{$amsmath, amssymb, graphics, setspace$\}\backslash $n$\backslash $n$\backslash \backslash $newcommand$\{\backslash \backslash $mathsym$\}$[1]$\ {\{\}\}\backslash $n$\backslash \backslash $newcommand$\{\backslash \backslash $unicode$\}$[1]$\{\{\}\}\backslash $n$\backslash $n$\backslash \backslash $newcounter$\{$mathematicapage$\}\backslash $n$\backslash \backslash $begin$\{$document$\}\backslash $n$\backslash $n$\backslash \backslash $[1+$\backslash \backslash $frac$\{$1$\}\{$1+$\backslash \backslash $frac$\ {$1$\}\{$1+$\backslash \backslash $frac$\{$1$\}\{$1+$\backslash \backslash $frac$\{$1$\}\ {$1+$\backslash \backslash $frac$\{$1$\}\{$x$\}\}\}\}\}\backslash \backslash $]$\backslash $n$\backslash $n$\backslash \backslash $end$\{$document$\}\backslash $n}\) \end{doublespace} \end{document}
-
Welcome to TeX.SX! Comment out the second line.
-
have you installed a TeX system? TeXMaker is just an editor it needs tex to process the document (miktex or texlive distributions)
-
Sorry, I hadn’t installed the compiler
-
I’m voting to close this question as off-topic because the OP didn’t have the compiler installed.
-
-
I just copied your code and got the same error
-
@AndreaG Well, I get no errors anymore. Could you please be more specific what error?
-
Error : could not start the command : «pdflatex» -synctex=1 -interaction=nonstopmode «ass».tex; It is weird: I am compiling fine another latex file I have, but not yours corrected.
-
@AndreaG Could you please open the command line, compile it in your command-line with
pdflatex ass.tex
(if the filename is right) and then post the output? -
I am new to the language: what do you mean more precisely with «open the command line»? Do you mean the terminal? Could you explain me or give me instructions on how to do that?
-
@AndreaG Yes, I mean the terminal. Under Linux: Use your file browser and search in the menus for open in terminal. Under Windows: Shift-rightclick into the folder and choose open in terminal. Under Mac: Idk. Then you should also be in the right folder and just type the command from above.
-
I think I got
-bash: pdflatex: command not found
Recents
Related
In order to use LaTeX you need two things:
-
A LaTeX installation, this includes the LaTeX format it self and all the packages
-
You need an editor, like TeXMaker or TeXStudio.
If you only have installed an editor, then you are still missing a LaTeX installation. And you get the error you mention (it is actually worse if you use TexStudio, there it only warns that it cannot find a log file).
As an extra comment to @Dolhpin and @Bernard. It tried the following in a clean Win 7 (VM)
-
Installed TeXMaker and TeXStudio, started both editors on a simple hellow word doc, and left them running
-
Installed miktex basic
-
When I go back to the two editors the was running before miktex was installed we see the error the OP was mentioning. But if I stopped TeXMaker and TeXStudio and started them again, then LaTeX compiles just fine.
Conclusion: TeMaker and TeXStuido rely on the PATH variable. If that value changes when the program is running, the program will never know.
So you do not have to reinstall miktex or TeXMaker. Just install MikTeX (or TeX Live) and restart TeXMaker.
You can see the same effect in the dos prompt. Open a dos prompt before MikTeX is installed and run the command: path
. That will list the system path as it was when the dos promt was started. Leave it open and re-ruin path
after MikTeX has been installed. It will report the same PATH.
Now start a new dos prompt, and run path
, it now lists the updated PATH.
If you’re a Texmaker user, you may have encountered the error message, «Could not start the command. pdflatex -synctex=1 -interaction=nonstopmode %.tex.» This error can be frustrating and difficult to solve, but there are a few steps you can take to fix the issue and get back to working on your documents.
Understanding the Error Message
Before we delve into how to solve the error message, it’s important to understand what the message means. Essentially, this error message is stating that Texmaker is unable to compile your document because it cannot find the pdflatex command. Pdflatex is a command-line tool that processes your LaTeX code and creates a PDF document.
Common Causes of the Error
There are a few common causes of the «Could not start the command» error message in Texmaker:
-
Pdflatex is not installed: If pdflatex is not installed on your computer, Texmaker will not be able to call the command and will produce the error message.
-
Pdflatex is not in the system path: If pdflatex is installed but not in the system path, Texmaker won’t be able to find it and will produce the error message.
Solution 1: Install Pdflatex
The first solution to the error is to download and install pdflatex. This can be done by downloading a LaTeX distribution such as MiKTeX or TeX Live. These distributions include pdflatex and other tools needed for working with LaTeX.
Once you’ve downloaded and installed a LaTeX distribution, you may need to restart Texmaker in order for it to recognize the new installation.
Solution 2: Add Pdflatex to the System Path
If pdflatex is installed but not in the system path, you can add it to the path by following these steps:
-
Open the Control Panel in Windows or the System Preferences in macOS.
-
Click on System and Security (Windows) or System (macOS).
-
Click on Advanced System Settings.
-
Click on Environment Variables.
-
Under system variables, find the «Path» variable and click Edit.
-
Add the path to the pdflatex executable to the list of paths.
-
Restart Texmaker.
Conclusion
The error message, «Could not start the command. pdflatex -synctex=1 -interaction=nonstopmode %.tex,» is a common issue for Texmaker users. However, with a few simple solutions such as installing pdflatex or adding it to the system path, this error can be easily resolved. Once you’ve fixed the issue, you can get back to working on your LaTeX documents without interruption.