[OS X TeX] Problem with the "starred" includegraphics

Ross Moore ross at ics.mq.edu.au
Sun Jan 11 14:26:33 EST 2009

On 10/01/2009, at 9:46 PM, Cédrick Fairon wrote:

> Hello,

> Well, in the meantime, I noticed that the problem seems linked  
> somehow to the Beamer Package.

There's your answer then; beamer has changed something
with regard to including images. Not surprising really,
since it has special requirements for building multiple
views of a page, when there is content that is displayed
sequentially throughout the page set.

In fact, section 13.1 of the beamer docs (page 123 for TeXLive 2008
  version 3.07 March 11, 2007) indicates that the  \includegraphics
command has been modified to become "overlay-specification-aware",
giving a simple way to create animations from a set of graphics files.

> The first program below works, but the second does not:
> ---- EX1: OK ----
> \documentclass{article}
> \usepackage{graphicx}
> \begin{document}
> \section{Simple Test}
>    \resizebox{!}{1.7cm}{\includegraphics*{cental}}
> \end{document}
> ---- EX2: DOES NOT COMPILE ----
> \documentclass{beamer}  % Comment for handouts
> \usepackage{graphicx}
> \begin{document}
> \begin{frame}
>    \resizebox{!}{1.7cm}{\includegraphics*{cental}}
> \end{frame}
> \end{document}

To learn a bit more, just add a few simple debugging commands:

  \documentclass{beamer}  % Comment for handouts
  \show \includegraphics    % as defined by  graphicx
  \show \includegraphics    % how does beamer change it ???

You should get console output such as:

 > \includegraphics=macro:
->\@ifstar {\Gin at cliptrue \Gin at i }{\Gin at clipfalse \Gin at i }.
l.3 \show \includegraphics

[Loading MPS to PDF converter (version 2006.09.02).]
) (/Users/rossmoor/Library/texmf/tex/latex/hyperref/nameref.sty
(./beam_graph.out) (./beam_graph.out) (./beam_graph.nav)
 > \includegraphics=macro:
->\beamer at presort {\beamerx@\includegraphics }{2}{}.
l.8 \show \includegraphics


Whereas the original definition of \includegraphics checks for the '*',
the beamer-modified version does not. Thus the '*' ends up being
interpreted as the name of the file containing the desired image.

  ! LaTeX Error: File `*' not found.

  See the LaTeX manual or LaTeX Companion for explanation.
  Type  H <return>  for immediate help.

  l.11 \end{frame}


This is clearly an error in beamer, to not fully support the documented
syntax of  \includegraphics .
(It does do specific checks for arguments starting with '<' and '['.
It should also be doing something similar for '*'.)

However, I think it is easy enough to adapt. Do you really need the  
'*' ?
What does it do that cannot be achieved using the  'viewport' and 'clip'
options together?

> -------------------------------------------------
> Thanks !!
> Céd
> <Ngram-court.log>
> Prof. Cédrick Fairon
> cedrick.fairon at uclouvain.be

Hope this helps,


Ross Moore                                       ross at maths.mq.edu.au
Mathematics Department                           office: E7A-419
Macquarie University                             tel: +61 (0)2 9850 8955
Sydney, Australia  2109                          fax: +61 (0)2 9850 8114

More information about the MacOSX-TeX mailing list