Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

missing $ inserted

Hi I have trubles with compiling this

    \begin{equation}
J = \sum_{j=1}^{C}
\end{equation}

I constantly gets an error

missing $ inserted

which is quite strange because I'm pretty sure that I'm in math environment I alsow tried this

\begin{equation}
J = $\sum_{j=1}^{C}$
\end{equation}

or this

\begin{equation}
J = $\sum_{$j=1$}^{$C$}$
\end{equation}

but it didnt't do the trick

EDIT The only thing above is

 \begin{equation}
 d_{ij}^2 = || x_{i} - p_{ij}||^2 = || x_{i} - (R_{j}s_{j}p_{ij}^* + t_{j}  ) ||^2

\end{equation}

However if I delete this the document compile. It seems that in this section there is some error

like image 747
nina Avatar asked Mar 05 '11 19:03

nina


People also ask

What is the meaning of missing inserted in LaTeX?

The "Missing $ inserted" is probably caused by the underscores and bars. These characters in LaTeX have special meaning in math mode (which is delimited by $ characters). Try escaping them; e.g. update\_element instead of update_element .

What does missing mean in overleaf?

A common cause of the Missing $ inserted error is using underscores ( _ ), a math mode character, outside of math mode—such as underscores present in filenames: an example of this is shown below. Using a math character, such as an underscore, in a file name: math_example. tex.

How do I write in Tex?

Writing text in a LaTeX document is easy. Once you are inside the body of the document, as described in the Document Structure section of this page, all you have to do is start typing. When you compile the code LaTeX will take care of all the text formatting based on any commands and packages used.

How do I insert symbols in LaTeX?

You may be wondering how to insert symbols in LaTeX. It is possible to add certain symbols in-text while others require LaTeX's math mode to be activated. ”, you can use the command \star in your code.


1 Answers

You have a double newline (i.e. a blank line) in the second code snippet. This causes TeX to drop out of math mode in an attempt to correct this error, hence the subsequent errors about missing $s.

like image 190
Thomas Avatar answered Sep 28 '22 19:09

Thomas