# LaTeX gives Missing { inserted error

I have written this:

``````\textcolor{blue}{? scalar alpha = 1\\
Generated scalar alpha = 1\\
? scalar omega = 1\\
Generated scalar omega = 1\\
? scalar beta1= 0.0\\
Generated scalar beta1 = 0\\
? scalar beta2 = 0.0\\
Generated scalar beta2 = 0\\
? scalar beta3 = 0.0\\
Generated scalar beta3 = 0\\
? scalar beta4 = 1\\
Generated scalar beta4 = 1\bigskip \\
? mle ll = -0.5*log(2*pi)-0.5(log(omega)+(e\$^\$2)/omega)}
``````

And LaTeX gives me this error:

``````! Missing { inserted.
``````

Double check many times, but don't know how to overcame this.

NB - Up to `\bigskip \\` works without problems.

• Welcome to TeX.SX! The `\$^\$` bit is the problem. If your aim is to reproduce some program listing or output, you should consider the `listings` package. – egreg Dec 30 '15 at 9:41

Insert `\$^2\$` instead of `\$^\$2`. Maybe you should also consider something like a `verbatim` environment for this kind of coding.
• I've left this code `\$^\$2` on purpose in order to maintain the Gretl format. Is there any possibility to force LaTex to display it? For example when I'm typing `\$\_\$` I leave the underscore space. – Francesco Bianchi Dec 30 '15 at 10:01
Well, I solved my problem using the command `\string^` in this way I can leave ^ showed in LaTeX output.