[texhax] getting embedded vs paged pdf (eps/png)

Steve Schwartz s.schwartz at imperial.ac.uk
Thu Feb 14 15:00:24 CET 2008


George,

There are lots of things that do the equivalent to translate documents,
including latex2html, latex2rtf, etc., and I seem to recall a similar
query a year or 10 ago here, so you might search through the archives.

I'll offer a simple solution, which is to use pdfcrop to crop the pdf.
Here's an example:

\documentclass{article}
\pagestyle{empty}
\begin{document}
\[ E=mc^2\]
\end{document}

pdflatex this, then run the result through pdfcrop. That will generate
the attached, which is what I interpret your posting to say you want.
You can then convert this to eps or png.

Alternatively, latex the above file, dvips the result, then run the ps
file through eps2eps, which will generate an eps cropped to the equation
(result attached).

It would be relatively easy to write a script to do this automatically,
I suspect, on a *nix machine, which is what I use. If you're doing this
under windows, you'll need to get advice from someone else.

HTH
Steve

On Wed, 2008-02-13 at 13:54 -0500, George Georgalis wrote:
> The subject sums up the task, not sure why I cannot find
> anything on the topic searching for embed* and page*
> 
> I'd like to use pdflatex generate stand alone formulas
> and tables, ie without page layout. these will be used
> in web pages and/or word processors; final output
> needs be in eps or png format. Doesn't really matter
> if pdflatex output is converted to eps/png or if they
> are generated directly, but how can I make stand alone
> images (eg size of the table/formula) vs typeset into
> the paper size?
> 
> // George
> 
> 
-- 
+-------------------------------------------------------------------+
Professor Steven J Schwartz      Phone: +44-(0)20-7594-7660
Space and Atmospheric Physics    Fax:   +44-(0)20-7594-7772
The Blackett Laboratory          E-mail: s.schwartz at imperial.ac.uk
Imperial College London          Office: Huxley 6M70 
London SW7 2BW, U.K.             Web: http://www.sp.ph.ic.ac.uk/~sjs
+-------------------------------------------------------------------+
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_pdfcrop-crop.pdf
Type: application/pdf
Size: 9244 bytes
Desc: not available
Url : http://tug.org/pipermail/texhax/attachments/20080214/8fd6e132/attachment.pdf 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.eps
Type: image/x-eps
Size: 3362 bytes
Desc: not available
Url : http://tug.org/pipermail/texhax/attachments/20080214/8fd6e132/attachment.bin 


More information about the texhax mailing list