0

I understand this my concern has been expressed previously here,`here2 and here3 but the responses cannot still solve my problem.

I included an image in my Latex code, which was running normally until today. All attempts only show undefined control sequence.\includegraphics{IDP}. I have checked for errors, retyped the code without any luck. It seems there is something I am not doing right.

I would very much appreciate any assistance on how to correct my code.

Here is the code I am using

\documentclass[12pt,a4paper]{memoir}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[american]{babel}
\usepackage[strict]{csquotes}
\usepackage{apacite}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{makeidx}
\usepackage{graphicx}
\graphicspath{ {./images/} }
\begin{document}

\begin{figure}[htp]
\includegraphics{IDP}
\caption*{Source:~\citeA{dunning1996investment}}
\caption{Patterns of Investment Development}
\label{figIDP}
\end{figure}


\end{document}
David Carlisle
  • 757,742
  • Put a \usepackage{graphicx} in your preamble if not there yet, does the error persist? – Skillmon Oct 05 '19 at 11:01
  • The code you posted works fine for me... Please make sure that the minimal example throws the same error as the complete document. – Phelype Oleinik Oct 05 '19 at 11:05
  • @PhelypeOleinik I have included a minimal code, still trying to find out how to add the png image – Beri Parfait Oct 05 '19 at 11:05
  • 1
    @BeriParfait You don't need to upload the image. We can test replacing it by example-image (unless the problem is with the picture itself, which doesn't seem to be the case here). – Phelype Oleinik Oct 05 '19 at 11:06
  • @PhelypeOleinik The code has been working fine for six months since I started writing my thesis. It's only today I had a break down with it. – Beri Parfait Oct 05 '19 at 11:08
  • 2
    @BeriParfait (Things like to break when a thesis is underway ;-) Did you update your TeX distribution today? If you did, something may have changed (although unlikely). If you did not, then try deleting temporary files. As I said, it's hard to tell without a code that throws the error. – Phelype Oleinik Oct 05 '19 at 11:28
  • Welcome to here. Can you post the exact error with a few lines of context from before it? If you replace IDP with example-image-a, does the minimal example you posted above compile then? – cfr Oct 05 '19 at 11:50
  • the error you show is not the format of a tex error message, please show the exact error from the log with all lines in a code block ({} button) so line endings are preserved. – David Carlisle Oct 05 '19 at 11:51
  • @DavidCarlisle See non-answer below? Should this be a different question or combined with this one? – cfr Oct 05 '19 at 12:18
  • please don't post clarifications to teh questions as answers, you can edit the questiion, again you need to mark the code block as without the original line endings it is impossible to read the error message (the line break marks which command is undefined) – David Carlisle Oct 05 '19 at 12:27
  • 2
    This is almost certainly the standard miktex issue (the only thing I know about miktex:-) have you updated both user and admin versions of miktex If you only update one you will get inconsistent behaviour. – David Carlisle Oct 05 '19 at 12:32
  • 2
    It seems that MikTeX updated the graphics package (https://miktex.org/packages/graphics) but not the LaTeX base (https://miktex.org/packages/ltxbase). https://github.com/MiKTeX/miktex-packaging/issues/131 – moewe Oct 05 '19 at 13:41
  • @DavidCarlisle This time I don't think it is. It seems like MikTeX just didn't update the LaTeX base, but did update the graphics package. See my comment above. – moewe Oct 05 '19 at 16:02
  • Today's update should resolve the issue. Make sure to run the MikTeX updater in Admin and User mode. – moewe Oct 06 '19 at 07:59
  • @DavidCarlisle Yes, I did update Tex on that day, and it was immediately after the update that I realised the code could no longer run properly. The messages shows that "Process exited with error(s)" while the log only shows " Undefined control sequence \includegraphics{IDP}. – Beri Parfait Oct 07 '19 at 07:24
  • Thanks, everyone. The directory to which the question has been resolved was helpful. I look forward to a permanent solution from the next MikTex update. – Beri Parfait Oct 07 '19 at 07:50
  • my guess above was wrong (it happens:-) this was not the usual user-error with only updating miktex in one of the two modes, it was an error in miktex, with graphics updated but not the base latex code to match. – David Carlisle Oct 07 '19 at 08:50

0 Answers0