Graphics, Figures & Tablesgraphicx | Insertion of Image fails

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Soraya
Posts: 1
Joined: Wed Nov 21, 2012 5:07 am

graphicx | Insertion of Image fails

Post by Soraya »

I've been attempting to insert an image, but continuously receive this error.

Code: Select all

Undefined control sequence. 
\includegraphics 
                {OriginalFoldsDiagramStepOne}
I load the graphicx at the beginning, and that is the only fix I have been able to find on any other forums. Is there something else wrong with my text? (This is the first time I have attempted LaTeX in about a year)

Code: Select all

\documentclass{article}
\usepackage[pdftex]{graphicx}

\begin{document}
\begin{center}
\large\mdseries{The finding of the excess}
\end{center}

Beginning with a square of length $a$ x $a$, the square is folded in half to create $\frac{a}{2}$. Then, the left hand corner is folded so a crease runs from the right hand corner to the left corner of $\frac{a}{2}$.

\begin{figure}[h]
\centering
\includegraphics{OriginalFoldsDiagramStepOne}
\caption{Preliminary Folds}
\label{ProofStepOne}
\end{figure}

\end{document}
Last edited by localghost on Wed Nov 21, 2012 10:29 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

cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

graphicx | Insertion of Image fails

Post by cgnieder »

Hi Soraya,

Welcome to the LaTeX community!

Is this the only error you're getting? Or more importantly the first error? It suggests you haven't loaded graphicx but your MWE shows otherwise so I'm a bit puzzled.

Some other remarks:
  • it's better to load »graphicx« without driver. It usually does a good job detecting the right one itself.
  • Instead of $a$ x $a$ I'd write $a\times a$
  • \mdseries does not have an argument but is a font switch
Regards
site moderator & package author
Post Reply