Graphics, Figures & Tablesgraphics | Trouble with scaled Image

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
bilalwehbe
Posts: 3
Joined: Wed Jul 04, 2012 9:57 am

graphics | Trouble with scaled Image

Post by bilalwehbe »

Hello,

I am having an error when writing \includegraphics[scale=0.40]{fig 1.JPG}. But if I'm removing the scale and writing the following command \includegraphics{fig 1.JPG} the PDF is running but the image is no to the scale I want. Please if anyone can help.

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

graphics | Trouble with scaled Image

Post by localghost »

Show what your exactly doing in form of a minimal example.


Best regards and welcome to the board
Thorsten
bilalwehbe
Posts: 3
Joined: Wed Jul 04, 2012 9:57 am

graphics | Trouble with scaled Image

Post by bilalwehbe »

Code: Select all

\usepackage[pdftex]{graphics}
\begin{document}
\begin{figure}
\begin{center}
\includegraphics[scale=0.40]{fig 1.JPG}
\end{center}
\end{figure}
\end{document}
If I'm writing these commands, the compiler is giving me an error and the PDF is not created. But if I write the following, the program is running but the image is not to scale.

Code: Select all

\usepackage[pdftex]{graphics}
\begin{document}
\begin{figure}
\begin{center}
\includegraphics[scale=0.40]{fig 1.JPG}
\end{center}
\end{figure}
\end{document}
User avatar
Stefan Kottwitz
Site Admin
Posts: 10350
Joined: Mon Mar 10, 2008 9:44 pm

graphics | Trouble with scaled Image

Post by Stefan Kottwitz »

Hi,

welcome to the board!
bilalwehbe wrote:If I'm writing these commands, the compiler is giving me an error and the PDF is not created.
If you get an error, please tell us the error message. Otherwise it's hard to help.
bilalwehbe wrote:

Code: Select all

\usepackage[pdftex]{graphics}
I think that is the cause - use graphicx instead of graphics. The graphicx package provides the key=value interface, graphics does not. Furthermore, spaces in file names are commonly a problem, I would avoid that.

Even if this already helps, it would be good if you would follow the link to the Infominimal working example explanation, this would be good for the future.

Stefan
LaTeX.org admin
bilalwehbe
Posts: 3
Joined: Wed Jul 04, 2012 9:57 am

Re: graphics | Trouble with scaled Image

Post by bilalwehbe »

thank you a lot. Using graphicx made it work.
Post Reply