[Mac OS X TeX] TEX -> EPDF?

Ross Moore ross at ics.mq.edu.au
Thu Dec 6 00:53:58 CET 2001



> matsakis said:
> >So, I'm curious whether anyone knows a good way to get a single TeX
> >equation as a piece of embedded PDF?
> 
> <snip> work-around manual method.
> 
> Right problem, wrong solution.
> 
> What one wants is for TeXShop.app to provide a Service, ``TeX eq ->
> EPDF'', so that one could then, within OmniGraffle, type  the desired
> equation (say \magstep2$1+1=2$), select it, choose the Service and then
> get in situ the ``epdf''---that's how it works in NeXTstep, and I can't
> think of a more efficient fashion to get this sort of thing done....
> 
> And that's how I get
> >...nicely
> >typeset equations in posters and presentations.

There is no need to have the equations in different PDF documents.
It is surely sufficient to have TeX typeset them as separate
pages in the same document.
The cute part is to make the bounding-box (or MediaBox) fit
the contents, for each page.

Then you have a nice collection, from which you can easily
extract the image that you need for some other purpose.



In fact this is very easy to do, using TeX's \shipout primitive.

  \shipout\hbox{...contents...}

or

  \shipout\vbox{...contents...}

will do essentially what you want ...


	... however, you have to take margins and offsets
into account, else these may be added "behind the scenes".
So it's better to do a bit of other processing first.


I have several examples of exactly this kind of thing, at:

   http://www-texdev.ics.mq.edu.au/WARM/WARMhome/ILLUS902/

in files named  testimage<num>.pdf   with <num> from 1 to 8 .
Look at the *last* page of each document.

Indeed, I showed the results of the `Encapsulated PDF' technique
at TUG2001, in one of my talks.


The source code for the above examples is available as   testimage<num>.tex  .

It contains code such as:

  \newbox\shipoutbox

  \global\setbox\shipoutbox=\hbox{.... contents ... }

 \newpage\parindent=0pt \leftmargin0pt
 \setbox0=\vbox{\kern -1truein
   \hbox{\kern -1truein 
    \framebox{\box\shipoutbox }%
    \kern 1truein}%
   \kern1truein}%
 \ifx\undefined\pdfoutput\else
  \dimen0\ht0 \advance\dimen0\dp0
  \pdfpageheight\dimen0
  \pdfpagewidth\wd0
 \fi
 \shipout\box0


Note the need to set the  \pdfpageheight  and  \pdfpagewidth
before shipping-out; and the need to  \kern-1truein  to
compensate for the location of the top-left corner of a page.


BTW, for the true setting of those example documents,
visit   http://www-texdev.ics.mq.edu.au/WARM/
and scroll down to the link to   PDF-LaTeX examples.



Hope this helps,

	Ross Moore


 
> on my NeXT Cube at home....

This `Encapsulated PDF' technique is already at your finger-tips.  :-)

 
> William
> 
> --
> William Adams, publishing specialist
> ATLIS Graphics & Design / 717-731-6707 voice / 717-731-6708 fax
> Sphinx of black quartz, judge my vow.
> http://www.atlis.com
> 
> 
> 
> -----------------------------------------------------------------
> To UNSUBSCRIBE, send email to <info at email.esm.psu.edu> with
> "unsubscribe macosx-tex" (no quotes) in the body.
> For additional HELP, send email to <info at email.esm.psu.edu> with
> "help" (no quotes) in the body.
> This list is not moderated, and I am not responsible for
> messages posted by third parties.
> -----------------------------------------------------------------


-----------------------------------------------------------------
To UNSUBSCRIBE, send email to <info at email.esm.psu.edu> with
"unsubscribe macosx-tex" (no quotes) in the body.
For additional HELP, send email to <info at email.esm.psu.edu> with
"help" (no quotes) in the body.
This list is not moderated, and I am not responsible for
messages posted by third parties.
-----------------------------------------------------------------





More information about the macostex-archives mailing list