I am certainly new to latex and have this error in a high frequency in my code. The error is claiming I have a missing $ sign in many places, and I imagine that my syntax usage of $ is off.

My compiler is returning this error screen:

Missing $ inserted.
<inserted text> 
l.275 $$I_
          0+di1+di2+di3\dots din=O_0 \text{where} I_0 \text{is the input and...
I've inserted a begin-math/end-math symbol since I think
you left one out. Proceed, with fingers crossed.

! You can't use `\eqno' in math mode.
\endmathdisplay@a ...\df@tag \@empty \else \veqno 
                                                  \alt@tag \df@tag \fi \ifx ...
l.276 $$\end{equation}
Sorry, but I'm not programmed to handle this case;
I'll just pretend that you didn't ask for it.
If you're in the wrong mode, you might be able to
return to the right one by typing `I}' or `I$' or `I\par'.

for the code I have written:

$$I_0+di1+di2+di3\dots din=O_0 \text{where} I_0 \text{is the input and} O_0 \text{the output}. $$

I have attempted adding '$' signs in most of the obvious spots e.g. everywhere that is not text- and no luck; Any help would be greatly appreciated, even a short tutorial of using the display math signs;

  • 4
    You cant use $$ in the equation environment since it is already in math mode and on another note avoid using $$. Simply remove these $$
    – azetina
    May 28, 2015 at 15:31
  • I would like a line skipped after the equation? What would be the best manner to have that happen? May 28, 2015 at 15:33
  • 1
    remove the \newline after \end{equation}. the definition of equation should provide some extra space below the display. some (rather concise) documentation can be had with texdoc amsmath (the user's guide for amsmath). May 28, 2015 at 16:31

1 Answer 1


Your code, which is of the form

\begin{equation} $$ <math-mode material> $$ \end{equation}

is guaranteed to produce two sets of errors, both very serious:

  1. The equation environment acts as a carefully designed "wrapper" around TeX's $$ ... $$ device for generating displayed equations. The instruction \begin{equation} (eventually) executes a $$ directive to switch over to TeX's display-math mode. Since TeX is in display-math mode after \begin{equation} is executed, your first $$ directive serves to terminate rather than initiate display-math mode. As a result, the stuff in <math-mode material> is processed as text material rather than as math material, leading to the first group of complaints you've reproduced in your posting.

  2. The next $$ directive in your code re-initiates -- rather than terminates -- display-math mode, but without all the careful setup provided by \begin{equation}. The next instruction, \end{equation}, is therefore guaranteed to confuse LaTeX to no end, leading it to remark "Sorry, but I'm not programmed to handle this case".

In short, do follow the advice already provided in the comments: do not use a pair of $$ statements inside an equation environment.

Separately, I would not try to place the string where $I_0$ is the input and $O_0$ the output inside the display-math environment. Instead, I'd treat it as regular text-mode material:

enter image description here

\dots~some text before the equation.
I_0+di_1+di_2+di_3+\dots+di_n=O_0 \,,
where $I_0$ is the input and $O_0$ the output.

And here's the text of the next paragraph \dots

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .