[texhax] How do I generate a .jpg/.gif/.png from TeX ?

Steve Schwartz s.schwartz at imperial.ac.uk
Mon Dec 24 19:10:22 CET 2007


On Mon, 2007-12-24 at 12:01 -0500, Tom Schneider wrote:
> Don't make them JPEG, GIF, PNG.  Make them eps.  Then you can use
> standard LaTeX to read them in
> \includegraphics*{myfile.eps}
> Note that this is inefficient.  You make a page with TeX/LaTeX,
> convert to eps, read it in as a figure.  If you are demonstrating
> something about TeX it makes sense.  Otherwise, you could just do it
> directly. 

I think it depends on the situation. I often use latex to tidy up a
picture that is otherwise hard to edit, for example by using the overpic
package to re-label graphs or add annotations or include multiple
pictures. For myself, this can be done directly in the latex source, as
you imply.

But publishers usually want clean figures, file-named by number, and all
ready to be inserted. The easiest way to do this is then to put the
relevant latex in a separate file, latex it, crop it, and then you have
a simple graphic that the publisher will accept.

For those publishers that will take pdfs, this is very easy with

pdflatex <image-manipulation.tex>
pdfcrop <image-manipulation.pdf>

then \includegraphics{image-manipulation-crop} will input the result.

Seasons greetings,

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

More information about the texhax mailing list