12

I seem to be getting a strange error after updating MiKTeX 2.9. I am using pdfLaTeX and TeXmaker with the graphicx package to include .png images. When I try to compile, I get the error LaTeX Error: File 'title' not found. If I include the file extension, then the error becomes LaTeX Error: Cannot determine size of graphic in title.png (no BoundingBox). I wasn't getting these errors a few days ago when I started creating my presentation. It has also worked without problems in the past.

MWE:

\documentclass{beamer}
\usepackage{graphicx}
\graphicspath{{figures/}}
\begin{document}
    \title{title}
    \author{author}
    \date{date}
    \titlegraphic{\includegraphics[scale=0.5]{title}}
    \frame{\titlepage}
\end{document}

Also, from the logfile it seems that pdfLaTeX is not in PDF mode, and that all graphics are being treated as .eps:

Package: ifpdf 2011/01/30 v2.3 Provides the ifpdf switch (HO)
Package ifpdf Info: pdfTeX in PDF mode is not detected.
...
File: title.png Graphic file (type eps)

Does anyone know how to fix this problem?

  • 2
    Welcome to TeX.sx! The first problem is related to the second (and actual) problem. latex cannot determine the natural dimensions of an image. So the real question is: Why is pdfLaTeX not in PDF mode? Does your MWE compile if you use pdflatex from the command line (pdflatex <filename>)? It seems as if your editor is set up to use latex rather than pdflatex. – Qrrbrbirlbel Feb 18 '13 at 05:17
  • @Qrrbrbirlbel I get the same error messages when using pdflatex from the command line. I checked the options in Texmaker, but it does look like it is set up to use pdflatex. The first line of the logfile also shows This is pdfTeX, Version 3.1415926-2.4-1.40.13 (MiKTeX 2.9) (preloaded format=pdflatex 2013.2.18) 18 FEB 2013 16:52 – Ian Gralinski Feb 18 '13 at 05:55
  • That usually means that TeX isn't able to process the image, either because the image's format isn't supported or just the image isn't found. – vonbrand Feb 18 '13 at 06:17
  • 1
    Could it be that you have several files with basename title, that some of them have a pdf or an eps extension and that they're corrupt? If yes, a possible solution may be adding the extension to the filename title. –  Feb 18 '13 at 06:23
  • @vonbrand I was able to get my presentation to compile with images included a few days ago, so perhaps it's something to do with updating MiKTeX. I will try on a different computer at home without updating to see if the problem persists. – Ian Gralinski Feb 18 '13 at 06:52
  • @MarcvanDongen, you could be right. Or some wrong setup for imageformats. Try leaving only the "right" format images around. Clean the temporary files, and re-run LaTeX. – vonbrand Feb 18 '13 at 06:55
  • @MarcvanDongen @vonbrand In my figures subdirectory I have a total of 7 png images (no other formats). I can open the images to view so they don't appear to be corrupt. I also tried removing all files except the tex source and images, but the error persists. – Ian Gralinski Feb 18 '13 at 07:00
  • 3
    @m0nk3y: There was an update some days ago (12.2.) which broke the formats. The error has been corrected but perhaps you still have remains. Run the update manager (admin + user mode). Recreate all formats. If the problem persist you will have to find the local ini-files and correct them manually. If you are in a hurry: you can also put \pdfoutput=1 at the start of your document, this will switch the mode back to pdf. – Ulrike Fischer Feb 18 '13 at 08:22
  • @UlrikeFischer I have the same problem with the PNGs despite updating to the current version. Thanks for the \pdfoutput=1 trick, though. It works well for the time being! –  Feb 18 '13 at 13:22
  • 1
    @hjschulz: Updating is not enough. You should also recreate the formats (as user). If this doesn't help: Rename in the UserData and (perhaps) CommonData-root (not in the main root!) in the folder miktex/config formats.ini, language.ini and if it exists pdflatex.ini. And then recreate the formats again. (This can change the language and format settings, you can reset them in miktex->settings). – Ulrike Fischer Feb 18 '13 at 14:30
  • I tried compiling my document at home and it worked, both before and after updating MiKTeX. So it looks like something has gone wrong with this installation as @UlrikeFischer suggested. I also tried adding \pdfoutput=1 after \documentclass{beamer}, but the error persists. @UlrikeFischer- I tried renaming formats.ini, languages.ini and pdflatex.ini in the installation directory and then updating formats, but I just received error messages so I changed the filenames back to the originals. Is there anything else I can try apart from reinstalling MiKTeX? – Ian Gralinski Feb 19 '13 at 06:41
  • 1
    @m0nk3y: I explicitly wrote that you should not change files in the main root (=installation root). Go to miktex-setting, tab "root", activate "show miktex roots", it will show you the path to UserConfig (not UserData as I wrote by mistake in the previous comment). There you will find the local ini's. – Ulrike Fischer Feb 19 '13 at 08:35
  • @UlrikeFischer: I opened MiKTeX settings as user and checked "show MiKTeX roots". I then looked in the locations specified as "UserConfig", "UserData" and "CommonConfig", but none of those locations (in miktex/config) contained the ini files. So I tried going to CommonConfig/miktex/data/le/pdftex, renamed pdflatex.fmt and pdftex.fmt, and then recreated formats. This then allowed me to compile without errors. If you post an answer, I will accept it. Thanks for your help and patience. – Ian Gralinski Feb 21 '13 at 00:29

1 Answers1

1

This problem was solved by renaming pdflatex.fmt and pdftex.fmt in the CommonConfig/miktex/data/le/pdftex directory and then recreating formats as "user".