Ignoring pdftex primitives

Hans Hagen pragma at wxs.nl
Thu Dec 10 14:12:03 CET 1998


Robert Howlett wrote:

> Incidentally, with the syntax as it is, I notice that I can't
> include an image file with a name like depthcharge.png.

This is a general tex problem, take rules. 
 
> I guess pdftex syntax is by now too settled for it to be changed, is it?
> If not, is there any support out there for changing the syntax?

The current syntax suits the \input one, no beauty either but we've
learned to live with that. In most cases \pdfimage will be wrapped up
anyway. 

Maybe the next hack suits your purpose and it saves Thanh some
programming -)

\let\normalpdfimage\pdfimage

\def\pdfimage%
  {\ifcase\pdfoutput
     \expandafter\nopdfimage
   \else
     \expandafter\dopdfimage
   \fi}

\def\dopdfimage#1#{\dodopdfimage{#1}}
\def\nopdfimage#1#{\donopdfimage{#1}}

\def\dodopdfimage#1#2%
  {\normalpdfimage#1#2\relax}

\def\donopdfimage#1#2%
  {\ifhmode\vrule\else\hrule\fi height 1cm width 1cm depth 0cm #1\relax}

\pdfimage width 2cm {./logo-con.png}

It also shows why your pdfimage substitute would be no real substitute:
\pdfimage returns a box with the natural dimensions of the graphic. 

Hans

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 477 53 69 | fax: 038 477 53 74 | mail: pragma at wxs.nl
-----------------------------------------------------------------




More information about the pdftex mailing list