[texhax] [IC/Admin] Putting image *data* inside a TeX/LaTeX file?
tomfool at as220.org
Tue Apr 7 16:30:40 CEST 2009
> > I need to create a LaTeX style for technical report covers.
> > The cover is to show the institution's logo, which exists
> > only in bitmap form.
> > Normally I would provide the user with two files, the
> > "report.sty" and a "logo.eps" file. However, life would be
> > simpler for users if they had only one file to download.
> > So, is there a way to include the image pixel data (or the
> > contents of the "logo.eps" file) in the "report.sty" file
> > itself? Say, within a largish "\special" command?
Yes, you can do this. Make a postscript version of the logo, and then
you can use a \special command to encapsulate it. I got a file like
this from kluwer a few years ago, and have also used the same trick for
clients since for exactly the reason you suggest, to make it easier on them.
The kluwer file I think you can find by googling kluwer.cls. The
beginning of the relevant section looks like this:
4 4 translate
989 1138 1 [60 0 0 -60 210 930]
<< /K -1 /Columns 989 >>
]*kjT\string$a at 6KL"blG_X2L_CTtEVL"blG_X2L_CTtEVY/9RL]*l%#ln6muG.V%6g?j&"
The downside is you are stuck with the tex->dvips->ps2pdf route. (I
think -- someone else will correct me if I'm wrong.) I imagine there is
some similar trick for pdftex->pdf, but I haven't messed with that.
> You might try lookng at the "filecontents" package.
> Cheers, Phil
> TeX FAQ: http://www.tex.ac.uk/faq
> Mailing list archives: http://tug.org/pipermail/texhax/
> More links: http://tug.org/begin.html
> Automated subscription management: http://tug.org/mailman/listinfo/texhax
> Human mailing list managers: postmaster at tug.org
tomfool at as220 dot org
More information about the texhax