Graphics, Figures & TablesIMAGE Problem, PNG File

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
berat01
Posts: 7
Joined: Wed Feb 01, 2012 11:09 pm

IMAGE Problem, PNG File

Post by berat01 »

Hi mates,

I'm trying to translate a book from german to turkish and i'm using TexMaker on Ubuntu 11.10 for this job. So i try to add some pictures to my work but it does not working. I'm using the following packages:

Code: Select all

\documentclass{scrartcl}
\usepackage[english,turkish]{babel}
\usepackage[utf8]{inputenc}
\usepackage[pdftex]{graphicx}
\usepackage[T1]{fontenc}
\selectlanguage{turkish}
\usepackage{color}
\begin{document}
...So the document begins...

If i add the image like this:

Code: Select all

\includegraphics[]{Abbildung1.png}
I get no error report.
But when i try to scale the image like this:

Code: Select all

\includegraphics[width=4cm, height=4cm]{Abbildung1.png}
or like this

Code: Select all

\includegraphics[scale=0.25]{Abbildung1.png}
it is not working anymore. What can be wrong? Does anyone have an idea??

Cheers
Last edited by berat01 on Sun Apr 15, 2012 4:53 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.

Stefan Kottwitz
Site Admin
Posts: 10344
Joined: Mon Mar 10, 2008 9:44 pm

IMAGE Problem, PNG File

Post by Stefan Kottwitz »

berat01 wrote:it is not working anymore. What can be wrong?
Do you get an error message? If you don't see a message, perhaps post the .log file here, as attachment.

Stefan
LaTeX.org admin
berat01
Posts: 7
Joined: Wed Feb 01, 2012 11:09 pm

Re: IMAGE Problem, PNG File

Post by berat01 »

When i run it as PDFLateX i become this message; "Process exited with error(s)"

This is the image;
Attachments
Abbildung1.png
Abbildung1.png (127.39 KiB) Viewed 6168 times
User avatar
Stefan Kottwitz
Site Admin
Posts: 10344
Joined: Mon Mar 10, 2008 9:44 pm

IMAGE Problem, PNG File

Post by Stefan Kottwitz »

berat01 wrote:When i run it as PDFLateX i become this message; "Process exited with error(s)"
So there are errors, but we need to know the errors (or your source code) to be able to help. Perhaps attach your .log file, it contains the error messages.

Stefan
LaTeX.org admin
berat01
Posts: 7
Joined: Wed Feb 01, 2012 11:09 pm

IMAGE Problem, PNG File

Post by berat01 »

I do not understand. In the log is the followings written:

Code: Select all

Dimensions can be in units of em, ex, in, pt, pc,
cm, mm, dd, cc, nd, nc, bp, or sp; but yours is a new one!
But i am writing this code;

Code: Select all

\includegraphics[width=4cm, height=4cm]{Abbildung1.png}\\
So my units are given in cm.
Attachments
pisiKitap.log
(23.87 KiB) Downloaded 414 times
User avatar
Stefan Kottwitz
Site Admin
Posts: 10344
Joined: Mon Mar 10, 2008 9:44 pm

IMAGE Problem, PNG File

Post by Stefan Kottwitz »

The errors in the .log give gave me sufficient information. I noticed that the problem is caused by using the turkish babel features. This makes the = sign an active character and interferes with the key=value interface. You could switch it off, if you don't need it - after \begin{document}, i.e.

Code: Select all

\documentclass{scrartcl}
\usepackage[english,turkish]{babel}
\usepackage[utf8]{inputenc}
\usepackage[pdftex]{graphicx}
\usepackage[T1]{fontenc}
\selectlanguage{turkish}
\usepackage{color}
\begin{document}
\shorthandoff{=}
\includegraphics[width=4cm, height=4cm]{Abbildung1.png}\\
\end{document}
Btw. the option pdftex is usually not required, the driver should be auto-detected.

Stefan
LaTeX.org admin
berat01
Posts: 7
Joined: Wed Feb 01, 2012 11:09 pm

Re: IMAGE Problem, PNG File

Post by berat01 »

:D Thank you Stefan. It worked. You are the savior :)
Berat
Post Reply