Includegraphics doesn't work

5,661 views
Skip to first unread message

Lily

unread,
Mar 2, 2009, 5:00:28 AM3/2/09
to LaTeX Users Group
For a while now, I can't compile graphics with latex. It seems to be
some problem with my computer or TexnicCenter setup, since a friend of
mine is able to compile the file with the graphics displayed in the
pdf output file. I created a dummy test file to make sure no other
packages are interfering:

\documentclass[a4paper,12pt]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\begin{document}
\begin{figure}[hbtp]
\includegraphics[width=10cm]{Kontextbruecke.emf}
\caption{Overlap}
\label{kontextbruecke}
\end{figure}
\end{document}

It doesn't seem to be a problem with the code, as I said... Maybe
someone has experienced similar problems and found a solution?

Thanks for your help!!!

Lily

unread,
Mar 2, 2009, 6:15:51 AM3/2/09
to LaTeX Users Group
Sorry, I forgot to include the error message I get:

! Undefined control sequence.
l.10 \includegraphics
[width=10cm]{Kontextbruecke.emf}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

(As in log file)

Jörg

unread,
Mar 3, 2009, 8:13:01 AM3/3/09
to LaTeX Users Group
Hello Lily,

it seems, that your Latex-system do not know the graphicx.sty-file,
since it does not know \includegraphics.
Could you copy graphicx.sty-file to the same directory as your Latex
file and try it again?

Cheers
Jörg

Kotya

unread,
Mar 3, 2009, 8:39:45 AM3/3/09
to LaTeX Users Group
> ! Undefined control sequence.
> l.10            \includegraphics

I have tested your code, and it works just fine with MiKTeX 2.7. Which
system do you use? Can you update it? I think, you have some problems
with TeX installation.

Kotya

unread,
Mar 3, 2009, 8:41:20 AM3/3/09
to LaTeX Users Group
> it seems, that your Latex-system do not know the graphicx.sty-file,
> since it does not know \includegraphics.

This would produce the error "LaTeX Error: File `graphicx.sty' not
found." I think...

Jörg

unread,
Mar 3, 2009, 2:59:41 PM3/3/09
to LaTeX Users Group
Hello Kotya,
you are right!

Jörg

Lily

unread,
Mar 6, 2009, 3:44:29 AM3/6/09
to LaTeX Users Group
> I have tested your code, and it works just fine with MiKTeX 2.7. Which
> system do you use? Can you update it? I think, you have some problems
> with TeX installation.

I am using MiKTeX 2.7 as well. I installed it last, uhm, September I
guess. And I just updated all packages I have installed and refreshed
the FNDB. It's still not working...

Anything else I could try?

Thanks!!

Lily

unread,
Mar 7, 2009, 4:15:58 AM3/7/09
to LaTeX Users Group
I finally managed to solve it - I deleted my graphics.sty and
graphicx.sty and downloaded them from the web again. It seems to work
fine now. Apparently one of the files was damaged!
Thanks for your help anyway!!
Reply all
Reply to author
Forward
0 new messages