7

Let's say I have a text block like this:

Within the field of texture analysis, a number of categories of methods exist, and even if we restrict ourselves to statistical methods, a large number of methods are available. \begin{equation} f(x) = x + 3 \end{equation} Statistical approaches are considered to be generally applicable and work well for natural textures present in images.

Here the \begin{equation} f(x) = x + 3 \end{equation} won't work. Could someone please help me?

doncherry
  • 54,637
KiloWatt
  • 1,673

2 Answers2

20

Use dollar symbols:

...a large number of methods are available. $f(x) = x + 3$ Statistical 
approaches are considered to be...

Note that equations should be part of a sentence. Also, you might like to read the Not So Short Introcution to LaTeX2e.

doncherry
  • 54,637
Ian Thompson
  • 43,767
16

While dollar signs work, it's better to use \( and \):

\documentclass{article}
\begin{document}
Within the field of texture analysis, a number of categories of methods exist, and even
if we restrict ourselves to statistical methods, a large number of methods are
available. \( f(x) = x + 3 \) Statistical approaches are considered to be generally
applicable and work well for natural textures present in images.
\end{document}

For the reasoning behind that and more information, see Are \( and \) preferable to dollar signs for math mode?. In this thread, Will Robertson suggests that you should only use this syntax in combination with the fixltx2e package.

Furthermore, I agree with Ian: In-line equations should be properly embedded in the sentence structure.

doncherry
  • 54,637