Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have error

! Missing } inserted. } l.9 { -1+2/[1+3\exp(-2|J|/k_BT)],& $T

MWE

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{eqnarray}  \label{eq:Cd}
\tilde C(T)=
\begin{cases}
{ -1+2/[1+3\exp(-2|J|/k_BT)],& $T<T_e$;\cr\cr 0,& $T\ge T_e$.\cr}
\end{cases}
\end{eqnarray}

\end{document}

When i comment \usepackage{amsmath} there is no error. I can't understand how to fix it, without \usepackage{amsmath} commenting.

share|improve this question
2  
When I remove the brackets and the dollar signs, the document compiles with amsmath. –  Andrew Uzzell Nov 28 '12 at 12:00
add comment

1 Answer

up vote 5 down vote accepted

The problem is you are trying to use math inside math: $T<T_e$. Take off those $$:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{eqnarray}  \label{eq:Cd}
\tilde C(T)=
\begin{cases}
    -1+2/[1+3\exp (-2|J|/k_BT)], & T<T_e \\ 0,& T\ge T_e.    \end{cases}
\end{eqnarray}

\end{document}
share|improve this answer
3  
correct, the $ signs are definitely not needed. a couple more suggestions: this would work as well (and perhaps better) with equation instead of eqnarray, and the final \` isn't needed at the end of cases` (it would leave a probably-unwanted blank line). –  barbara beeton Nov 28 '12 at 13:55
    
Of course you are right, thank you for pointing it out, I just focused on the main issue with code compilation. –  fmonegaglia Dec 1 '12 at 9:24
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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