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
\documentclass[conference]{IEEEtran}
\usepackage{graphicx}
%\usepackage{epstopdf}
\begin{document}
\section{Introduction}
test
\begin{figure}[!htb]
\centering
\includegraphics[width=0.45\textwidth]{network.eps}
\end{figure}
\end{document}
UPDATE
The actual log message is as below
("C:\Users\XXX\AppData\Local\Programs\MiKTeX 2.9\tex/latex/epstopdf-pkg\ep
stopdf-base.sty"
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
85.
)
! 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
k.eps>
(epstopdf) \includegraphics on input line 13.
runsystem( --outfile=network-eps-converted-to.pdf network.eps)...disabled (rest
ricted).
Package epstopdf Info: Result file: <network-eps-converted-to.pdf>.
pdflatexthen you don't needepstopdf. Also you should remove the extension.eps, so just put\includegraphics[width=0.45\textwidth]{network}. – Marijn Jan 24 '20 at 15:18epstopdf-sys.cfgin texlive that is/usr/local/texlive/2019/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfgI am not sure where it is in miktex or whetehr it is missing upstream in miktex or just in your installation – David Carlisle Jan 24 '20 at 15:36
– LaTeXMinion Jan 24 '20 at 15:36This is pdfTeX, Version 3.14159265-2.6-1.40.20 (MiKTeX 2.9.7250) (preloaded format=pdflatex 2020.1.24) 24 JAN 2020 15:56 entering extended mode **./test.tex (test.tex LaTeX2e <2019-10-01> patch level 3/usr/local/texlive/2019/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfgdoes not exist in my pc since I am a windows user. Besides, I can directly use\usepackage{epstopdf}to workaround the problem instead of\makeatletter \def\epstopdf@sys@cmd{repstopdf} \makeatother. I am after an answer which explains the reason of this problem. – LaTeXMinion Jan 24 '20 at 15:44