Graphics, Figures & TablesPicture File Won't Insert

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
esong_98
Posts: 16
Joined: Tue Jan 14, 2014 9:34 am

Picture File Won't Insert

Post by esong_98 »

I'm using TXC and using the insert function to insert a picture in my text file. The commands are done automatically with this feature and the input is:

Code: Select all

\begin{figure}
	\centering
		\includegraphics{C:/Users/Ed/Desktop/Documents/Economics/Van der Waals Macroeconomy/Word Versions/Van der Waals Economy Figure 1.pdf}
	\label{fig:Van der Waals Economy Figure 1}
\end{figure}
Unfortunately, when I compile the file I get the error message: Undefined control sequence on the \includegraphics line. The output prints out:C:/Users/Ed/Desktop/Documents/Economics/Van der Waals Macroeconomy/Word Versions/Van der Waals Economy Figure 1.pdf. So what's wrong? If I remove these blocks of command then the error disappears, but I want to insert the picture.
Last edited by cgnieder on Tue Jan 14, 2014 11:24 am, 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

Picture File Won't Insert

Post by Johannes_B »

Preparing a minimal working example can help you find the reasons for problems. In your case, the package graphicx seems to be missing. Include it in your preamble with the line

Code: Select all

\usepackage{graphicx}
.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
esong_98
Posts: 16
Joined: Tue Jan 14, 2014 9:34 am

Re: Picture File Won't Insert

Post by esong_98 »

Thanks, your suggestion solved the problem.
Post Reply