Graphics, Figures & TablesProblem with graphicx

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
mike1264
Posts: 27
Joined: Wed Jul 24, 2013 6:07 pm

Problem with graphicx

Post by mike1264 »

I have a problem with a graphics file. I am using:

Code: Select all

\usepackage{graphicx}
\includegraphics[scale=0.5]{./images/bensig.jpg}
and receive the following error:

! LaTeX Error: Cannot determine size of graphic in ./images/bensig.jpg (no BoundingBox).

I need the graphic to be 2 inches wide and 1 inch high which is 50% of its original size.

I would appreciate any guidance as to where I may be going wrong.
Many thanks,
Mike
Last edited by Stefan Kottwitz on Sun Jul 20, 2014 2:23 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Problem with graphicx

Post by Johannes_B »

Hi, always best to privide a minimal working example.

You can use \includegraphics[width=2in,heigth=1in]{./images/bensig}, please note, that i haven't giben the file extension.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Re: Problem with graphicx

Post by Stefan Kottwitz »

Hi Mike,

use pdfLaTeX instead of LaTeX in DVI mode. This can be a setting in your editor. LaTeX in DVI mode expects EPS files with a bounding box, jpg is not supported. But pdfLaTeX supports jpg, png and pdf.

Stefan
LaTeX.org admin
mike1264
Posts: 27
Joined: Wed Jul 24, 2013 6:07 pm

Re: Problem with graphicx

Post by mike1264 »

Hi Stefan_K,

Thank you very much indeed for your time and patience. I'll amend the .tex files tonight with your suggestions. I'm very much a newcomer to Latex but, painfully slowly, beginning to understand Latex.

Again, thanks,
Mike
Post Reply