LaTeX Graphics
Home Up


The following (from may be relevant to your interests here.

Here is another useful site:

If you need to download jpeg2ps go to Thomas Merz web page


If you REALLY need to include JPEG files on the fly, there is a way. First put jpeg2ps.exe
in your path (probably texmf/miktex/bin).  Here's an example that just now worked for me
(using MiKTeX):

\DeclareGraphicsRule{.JPG}{eps}{*}{`jpeg2ps #1}

\includegraphics [width=\textwidth , bb= 20 20 575 575]{slope.JPG}


The bb= stuff is the bounding box information TeX needs.  So where did these numbers
come from?  I ran jpeg2ps in a dos command line and created an eps file, then opened the
file to get the numbers.  Even though tex calls jpeg2ps on the
fly and must generate these numbers, apparantly there's no way to get tex to use these
numbers; they must be in the \includegraphics command.

Thus, this method is worthwhile only if you have a large number of jpeg image files all of
the same size.

If you scanned an image, convert/save the scanned image to eps format. For   instructions
go to They will tell you everything else you
need to know.

I think it is often still best to convert things to eps and generate Postscript files with dvips.
To do this I like to convert bitmaps to
jpeg format and then use jpeg2ps to convert this to eps. This makes small eps files since it
keeps the jpeg compression (You need level 2 Postscript.). I got jpeg2ps from

More references can be found at


My Example is as follows.

Assuming the gunzip is in the path, and f2.eps.gz is a compressed image file is its bounding box, and f1.eps is a normal image file.

The files used may be found here: LaTex_Examples/ LaTex_Examples/f2.eps.gz

and here is the code 


%\DeclareGraphicsRule{.eps.gz}{eps}{}{'gunzip -c #1}

%\includegraphics[width=\textwidth, bb= 20 20 592 321]{f2.eps.gz}
%\includegraphics[width=3in, bb= 20 20 592 321]{f2.eps.gz}

\caption[Submanifold]{Picture from a compressed file.}

\caption[Submanifold]{An embedded submanifold with caption below.}

\caption[Submanifold]{An embedded submanifold with caption above.}



Some more resources:



08/15/2016 02:53 PM