Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I try to insert a picture using the code below

\usepackage{pgf}

\begin{figure}[h]
\centering
\includegraphics[width=2.5in]{image/Test}
\caption{Example TA}
\label{fig:Reinforcement}
\end{figure}

However, the error says Missing $ inserted; may someone help me?

share|improve this question
5  
Don't quite see how you get that error message form the given code snippet. But, while code snippets are useful in explanations, it is always best to compose a fully compilable MWE that illustrates the problem including the \documentclass and the appropriate packages so that those trying to help don't have to recreate it. –  Peter Grill Nov 15 '12 at 3:38
5  
Please add a minimal working example (MWE) that illustrates your problem. It is considered a lot better to put in some code that will compile, as it makes it a lot easier for us to copy it into our text editor and work with it, and see exactly what it is you are trying to do. –  Werner Nov 15 '12 at 3:38
    
I don't know what the pgf is for. Usually \usepackage{graphicx} is used for JPEGs and pictures in general. –  Christian Nov 15 '12 at 14:11
1  
Since you have some responses below that seem to answer your question, please consider marking one of them as ‘Accepted’ by clicking on the tickmark below their vote count (see How do you accept an answer?). This shows which answer helped you most, and it assigns reputation points to the author of the answer (and to you!). It's part of this site's idea to identify good questions and answers through upvotes and acceptance of answers. –  Martin Schröder Jan 8 '13 at 23:38
add comment

1 Answer 1

To end this I include here a complete MWE that compiles without errors (notice, that the used figure is part of package MWE you should have installed but must not be loaded). It contains everything needed to print a figure in LaTeX:

\documentclass{article}
\usepackage{graphicx}

\begin{document}

\begin{figure}%                 use [hb] only if necceccary!
  \centering
  \includegraphics[width=10cm]{example-image-a}
  \caption{test figure}
  \label{fig:test}
\end{figure}

\end{document}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.