I write my text in Windows 10 and using TexStudio. I recently updated both my MikTeX and TeXstudio to the latest versions. After the update the tex files that were working before start throwing the error

Undefined control sequence. ...raphics[width=0.45\textwidth]{network.eps}

Then, I found the following questions

undefined control sequence \includegraphics

"Undefined control sequence \includegraphics" after TeXstudio update

It seems like the root of the problem is same but the solutions that are suggested in those did not work. I realized that the problem happens only for eps files and if I include epstopdf the problem seems to be solved.

However, the latex was running properly without calling epstopdf before. How can I fix this issue without \usepackage{epstopdf}. See the full code below








The actual log message is as below

("C:\Users\XXX\AppData\Local\Programs\MiKTeX 2.9\tex/latex/epstopdf-pkg\ep
Package: epstopdf-base 2019-12-09 v2.10 Base part for package epstopdf
Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 4
! Undefined control sequence.
\ETE@program@epstopdf ->\epstopdf@sys@cmd 

l.13 ...raphics[width=0.45\textwidth]{network.eps}

The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

Package epstopdf Info: Source file: <network.eps>
(epstopdf)                    date: 2019-03-28 04:44:41
(epstopdf)                    size: 141038 bytes
(epstopdf)             Output file: <network-eps-converted-to.pdf>
(epstopdf)             Command: < --outfile=network-eps-converted-to.pdf networ
(epstopdf)             \includegraphics on input line 13.
runsystem( --outfile=network-eps-converted-to.pdf network.eps)...disabled (rest

Package epstopdf Info: Result file: <network-eps-converted-to.pdf>.
  • You cannot add long text to a comment, please add it to the question instead. Have you fully updaed your miktex both in miktex user mode and in miktex admin mode?
    – daleif
    Commented Jan 24, 2020 at 15:17
  • 1
    If you compile with pdflatex then you don't need epstopdf. Also you should remove the extension .eps, so just put \includegraphics[width=0.45\textwidth]{network}.
    – Marijn
    Commented Jan 24, 2020 at 15:18
  • @daleif I have even uninstalled miktex and texstudio completely (including configuration, preference, user files) and installed it only for one user. So I am sure that they are fully updated. Commented Jan 24, 2020 at 15:24
  • the error you show is not the format of a tex error message, and does not show which command is undefined. Please show the actual tex error from the log file, in a code block so line endings preserved Commented Jan 24, 2020 at 15:25
  • 1
    That is the reason, As I say that is the location of the file on texlive, I do not know the location in miktex, but the missing file is the reason for the error. I will change epstopdf-base.sty to default a definition in case the cfg file is missing. Commented Jan 24, 2020 at 15:46

1 Answer 1


epstopdf-base currently assumes the presence of a file epstopdf-sys.cfg which sets up a system command to do the external conversion of the EPS files to PDF.

In texlive this is


but apparently miktex does not set this default.

It is not good that the package requires a cfg file anyway so I will update epstopdf-base so the default command is epstopdf.

texlive's cfg file will still over-ride this, as now, and make the default be repstopdf unless you use --shell-escape, in which case it will be set to epstopdf (MikTeX does not make this distinction, apparently).

Until the package is updated (it is updated at source), you can set this with

\makeatletter \def\epstopdf@sys@cmd{epstopdf} \makeatother

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .