[pdftex] psfrag like functionality in pdflatex?

Ross Moore ross at ics.mq.edu.au
Fri Jun 15 09:51:14 CEST 2001


> Folks,
> 
> you must have figured out by now that I am in the throes of switching
> from good old latex to pdflatex and this dog is trying to learn new
> tricks while I am at it... :)
> 
> I am looking for something that has functionality similar to psfrag but
> which works with pdflatex. I did a search on ctan but couldn't find
> anything immediately that seemed to fit the bill. Any suggestions?

Altering the contents of a PDF "on-the-fly" is well-nigh impossible.
Even when all the streams are uncompressed, so that you can see the
basic PostScript-like structure, there are still tables of numerical
offsets that need to be adjusted for any edit. So any approach to
labelling graphics --- I'm assuming that this is what you are trying
to do with psfrag --- by additions made at TeX-time is just too hard.

Taking into account previous postings to this list, I'm aware of
3 possibilities to do the sort of thing that I think you want.

 A.
Using Metapost you can create a completely new graphic, in a different
format, which includes your TeX-ed labels. 

 B.
I haven't used  psedit  but presumably this is just a way to edit the
PostScript, which then needs to be converted back to PDF for inclusion.
How this will handle complicated mathematics, I don't know without trying.


The 3rd method is to *not* alter the existing PDF graphic at all.

 C.
Instead simply overlay the labels, typeset in (La)TeX, over the area of
the page covering the graphic.
 An existing method for doing this is Xy-pic with the WaRMreader macros.
See the site at:  http://www-texdev.mpce.mq.edu.au/WARM/ for examples.

For this method to work you need to supply the coordinates (in any
convenient basis) of places within the graphic where you may wish to
attach labels or other graphic features. With this information, Xy-pic
can move to the correct place and typeset any TeX material that you
can specify. 
 We (Wendy McKay and myself) call those places in the graphic "Marked Points",
and are working with Tom Ruark at Adobe to develop a plug-in that allows
the marked-points to be specified using Adobe Illustrator, as you compose
the graphic. This plug-in will be demonstrated in one of the talks at TUG2001,
and before then at CalTech when I visit in August.

The plug-in is in the final stages, at least for the Mac platform.
Peter, you know Wendy. Just go ask her about it.
I don't know whether it is available for other platforms yet;
if so, then we'd appreciate a beta-tester.


Oh, and a further advantage of the Xypic/WaRMreader method is that you
don't have to worry about the font encoding problems that exist
with recent versions of Illustrator, since it never sees the TeX fonts
that will be used with your labels; pdfTeX handles all of that.


Hope this helps

	Ross

 
PS: see you in August.

> peter
> 
> _______________________________________________
> pdftex mailing list
> pdftex at tug.org
> http://tug.org/mailman/listinfo/pdftex




More information about the pdftex mailing list