1

On MacTeX 2019, I get the following error when using \includegraphics:

./test.tex:5: Undefined control sequence.
\Ginclude@graphics ...e \expandafter {\@curr@file 
                                                  }}\expandafter \filename@p...
l.5 \includegraphics{ddg.png}

The following MWE does not work (yes, ddg.png is there):

\documentclass{article}
\usepackage{graphicx}
\begin{document}
\includegraphics{ddg.png}
\end{document}

This happens both with XeLaTeX and pdfLaTeX. Anybody got any ideas or even the same issue?

Sadly, I can't track down what I did to cause this bug, it presumably happened when auto-updating packages with tlmgr. I know it worked fine like a couple days ago.

folran
  • 55
  • 1
    https://tex.stackexchange.com/questions/511138/miktex-graphics-version-1-3b-bug-on-windows-10-setcurrfile-undefined/511144?noredirect=1#comment1293602_511144? – Joseph Wright Oct 09 '19 at 15:45
  • with texlive/mactex that error should not be possible, latex/base and latex/graphics should both have updated together. – David Carlisle Oct 09 '19 at 18:00
  • @JosephWright wow, thanks! I had actually seen that post but immediately discarded it because it said it was a miktex specific bug! The fix worked flawlessly, though.

    @DavidCarlisle: How can I check whether that was the case or not, how can I update them manually? Because apparently it was the same error (or at least, it had the same fix).

    – folran Oct 09 '19 at 18:38
  • 2
    the fix in Joseh's answer was just a temp workaround for a day or so until the miktex distribution was fixed. As the texlive (mactex) distribution didn't have that problem you have a local issue so it would be better to fix it than use the workaround (as otherwise it might never get fixed). firstly what date does latex give when it starts up? it should be LaTeX2e <2019-10-01> if it is a 2018 date try fmtutil-sys --all to rebuild the formats – David Carlisle Oct 09 '19 at 19:03
  • It was indeed a 2018 date, problem solved, thank you so much!

    (I don't exactly understand what was from 2018 though; I assumed to be working with a fresh install of MacTeX 2019).

    – folran Oct 10 '19 at 06:37
  • Got the same error. @DavidCarlisle suggestion with fmtutil-sys --all fixed the issue. – Szymon Bęczkowski Oct 10 '19 at 07:47
  • @SzymonBęczkowski after the mactex wrapper around tlmgr downloaded the new 2019 sources it was supposed to have run fmtutil-sys --all and remade the formats but apparently it didn't so you had new run time packages loading into an old format which is an untested (and sometimes not working) situation. That isn't supposed to happen so it may be worth asking on a mactex support list, but may be hard to reproduce once the formats have been updated. – David Carlisle Oct 10 '19 at 08:33

0 Answers0