jpg/latex

Peter Flynn peter at silmaril.ie
Sat Nov 16 18:33:04 CET 2019


On 16/11/2019 15:50, Walt Burkhard wrote:
> Hello,
> I have a basic JPG/Latex question.   I cannot successfully run a very simple
> latex program that is  to display an image.    (Normally I use eps files but
> now I must use JPG images.)

OK. The rules USED to be:

1. You can ONLY use EPS files with original LaTeX.
    To use JPGs/PNGs you MUST use pdflatex or xelatex.

2. pdflatex and xelatex CANNOT use EPS files.
    To use EPS files you MUST use original LaTeX.

(BUT: some systems will automatically run a conversion from one format 
to the other so that you don't notice. This is convenient but 
inefficient and probably poor file management practice.)

> I have attached the Latex file,  the image file  as well as a screenshot 
> showing the Latex complaint.

LaTeX is complaining that there is no BoundingBox in the JPG file.
That is correct: BoundingBox is found ONLY in EPS files.

Answer: switch to using pdflatex and it will create a PDF directly with 
no need to run any PS2PDF conversion afterwards.

The switch for doing this is usually in your editor's configuration of 
the 'Process' or 'Build' button.

If you really do still need to produce Postscript output, you can always 
run PDF2PS afterwards.

Peter



More information about the texhax mailing list