Ignoring pdftex primitives

Robert Howlett rhowlett at mail.usyd.edu.au
Fri Dec 11 00:25:41 CET 1998



David Carlisle wrote:
> 
> > \pdfimage height 3 cm imagefile.png
> 
> I can't say I like the syntax either, but it is probably the `TeX way'.
> It is just that Knuth's decision to give TeX primitives a syntax that
> is totally alien to the TeX macro syntax was simply wrong:-)
> 
> In practice I am not sure it would help much in this case. Even if the
> syntax were slightly more helpful you would probably never be able to
> totally fake a non expandable primitive with a macro. In this case
> probably you should just use some macro and document that it be used for
> both tex and pdftex. For latex this would just be
> 
> \includegraphics{imagefile}
> 
> (being a macro it can do other checks, like deciding which extension to
> use depending on what tex version and drivers are specified)
> Context no doubt has similar image inclusion macros which again give a
> consistent interface. For plain tex you could either provide just a
> basic wrapper around \special and \pdfimage, or you could use the
> latex interface (which does work with plain tex).
> 
> > Incidentally, with the syntax as it is, I notice that I can't
> > include an image file with a name like depthcharge.png.
> 
> If you know there is no depth you can always use depth 0pt, can't you?
> so that \pdfimage has seen a depth and doesn't look for another. (not
> tried)
> 

No, things like
\pdfimage height 3 cm height 2 cm depth 1cm height 5cm picture.png
are perfectly valid (as with \hrule and \vrule in ordinary TeX),
the later ones overriding the earlier ones.

Bob



More information about the pdftex mailing list