Graphics, Figures & TablesProblems with Graphs

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
beth87
Posts: 6
Joined: Sat Jun 11, 2011 5:52 pm

Problems with Graphs

Post by beth87 »

I have serious problems with the graphs in whatever format .pdf .eps or .png
I am using Texnic Center and Miktex as a compiler and I am having problems because it generates a frame with written the directory of the image but I can not see the image.
I have uploaded the graphic package... my code is...

Code: Select all

\documentclass{beamer}

\usetheme{Warsaw}

\setbeamercovered{invisible}

\setbeamertemplate{navigation symbols}{} 
%
\usepackage{graphicx}


\title{Offshoring with Search and Matching at the Labor Market}
\author{Annalisa Ziliani}
\institute {University of Tubingen}
\date{12-07-2011}

\begin{document}

\begin{frame}

\begin{figure}
\includegraphics [width=0.65\textwidth]{C:\TEX FILES\imgs\Graph2.png}


\end{figure}
\end{frame}
% End of slides
\end{document}


I save the images under a same folder where I keep my latex files. I have problems aswell in a normal latex pdf with Texnic Center. With Texnic Center the graphs do not even appear.
Last edited by Stefan Kottwitz on Sat Jun 11, 2011 7:02 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: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Problems with Graphs

Post by Stefan Kottwitz »

Hi Beth,

welcome to the board!

The problem is caused by spaces in file path. Just don't use spaces there. Or use relative paths, such as

Code: Select all

\includegraphics[width=0.65\textwidth]{imgs\Graph2.png}
It can also be solved by loading grffile which can help to fix it:

Code: Select all

\usepackage{grffile}
Stefan
LaTeX.org admin
beth87
Posts: 6
Joined: Sat Jun 11, 2011 5:52 pm

Re: Problems with Graphs

Post by beth87 »

Thanks,I had already changed the folder name but it did not work.
I solved the problem writing the the path as follows ( NOTE THAT THE SLASH ARE IN A DIFFERENT DIRECTION - Slash instead of back slash)

C:/TEX/img/Graph2.png



Is this normal?
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Re: Problems with Graphs

Post by Stefan Kottwitz »

Yes, slashes are normal. Slashes are used in Unix paths, but more important is that the backslash character has a special meaning in (La)TeX, starting control sequences.

Note that also with slashes it would not have worked with the space in the file name.

Stefan
LaTeX.org admin
beth87
Posts: 6
Joined: Sat Jun 11, 2011 5:52 pm

Re: Problems with Graphs

Post by beth87 »

Now I have problems creating a bounding box in a pdf file for a pdf image...
Post Reply