3

I am trying to use the cases environment but I get the message, missing $ inserted.

    \begin{cases} 
      deg(u_i)  \textrm{ if u_i on primary diagonal} \\
     -1 & \textrm{ if u_i u_j adjacent} \\
      0 & \textrm{otherwise}
    \end{cases}

Is the use of subscript, the problem? Any solutions?

  • 1
    That is because you have subscripted term u_i inside a \textrm argument, which nullifies the math mode. – Steven B. Segletes May 26 '14 at 18:40
  • So what is the solution? I tried u\sb{i} without success. Any ideas? – Paramar May 26 '14 at 18:43
4

You have to place a math environment and add $ inside \textrm.

\[
\begin{cases} 
      deg(u_i)  \textrm{if $u_i$ on primary diagonal} \\
     -1 & \textrm{if $u_i$ $u_j$ adjacent} \\
      0 & \textrm{otherwise}
    \end{cases}
\]
  • 1
    I'd use \text instead of \textrm. – egreg May 26 '14 at 20:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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