0

using a formula in my figure I got this error , here is my formula, how do I correct it ? thanks a lot

\begin{figure}[H]
\centering
\caption{Net = \sum w_{i} p_{i}}
\label{fig:f7}
\includegraphics[width=9cm, height=5cm]{3-7}
\end{figure}
16
  • 6
    all these questions are very similar, you may be best to step back and start with a latex tutorial. you need math mode $\mathrm{Net}=\sum w_{i} p_{i}$ Apr 3 '15 at 20:29
  • 4
    also don't use [H] unless you are sure you need it and don't specify both width and height as it will distort the image. Apr 3 '15 at 20:31
  • 2
    You find a good tutorial at dickimaw-books.com/latex/novices and also, in Italian, lorenzopantieri.net/LaTeX_files/ArteLaTeX.pdf
    – egreg
    Apr 3 '15 at 20:35
  • 2
    @Farzad64 The whole reason for the figure environment is to allow the figure to be moved by LaTeX to the place where it is best fitting without interrupting the textflow. Forcing it (more or less) at a certain position using the [H] parameters completely defeats that purpose. And given all your other questions I heavily agree with David Carlisle: Don't you think you should do yourself (and everyone else for that matter) the favour of learning the basics of LaTeX before writing a whole thesis with it!? Apr 3 '15 at 20:45
  • 4
    You do not need to read anything like 500 pages to learn the basics. In fact, I have no idea where you get that figure from. You will save time if you stop and learn the basics. Thinking not doing so will save you time is just a mistake.
    – cfr
    Apr 3 '15 at 20:54
7

You need math mode

$\mathrm{Net}=\sum w_{i} p_{i}$
2
  • I almost feel ashamed that i upvoted this kind of question/answer.
    – Johannes_B
    Apr 4 '15 at 9:36
  • 1
    @Johannes_B You shouldn't feel ashamed, you should do it more often! Apr 4 '15 at 10:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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