0

I'm trying to add a tilde over some letters of an equation. Yet, the program tells me that

Missing { inserted. 
<to be read again> 
    \gdef l.253 ...B =\widetilde{b}+ \widetilde{A} x_\bar{b}
                                                             \\

This the disfonctionning part of my program:

\begin{equation*}
\begin{cases}
  x_B =\widetilde{b}+ \widetilde{A} x_\bar{b}\\
  z =\underbrace{\alpha}_{scalaire}+\tilde{C}^T x_\bar{B}\\
  x_B,x_\bar{b}\ge 0\\
\end{cases}
x_B=
\end{equation*}

It seems either to be a fool mistake which I can't find or to be an error above in the document, isnt't it? Can you give me some help?

4
  • 3
    You should write x_{\bar b}.
    – Sigur
    Jan 21, 2016 at 14:46
  • Yes, It worked! But why? I thought it was unecessary for single elements, and x_\bar b is a single element isn't it? Jan 21, 2016 at 14:47
  • No, the single is \bar.
    – Sigur
    Jan 21, 2016 at 14:48
  • 2
    unrelated but _{scalaire} should be _{\mathit{scalaire}} the default math font is designed to make adjacent letters not look like a word but as a product of variables. Jan 21, 2016 at 14:51

1 Answer 1

2

You should use braces for the subscript: x_{\bar b}.

Also, you can use \\[1ex] for example to increase a little the vertical space between lines in cases.

I'd use \text{} from amsmath package to write text in math mode.

Finally, notice that you should use & to insert conditional cases.

I think that what you want is almost this:

\begin{equation*}
x_B = \begin{cases}
       x_B =\widetilde{b}+ \widetilde{A} x_{\bar b} \\[1ex]
         z =\underbrace{\alpha}_{\text{scalaire}}+\tilde{C}^T x_{\bar B} \\[1ex]
      x_B, & x_{\bar b}\ge 0
\end{cases}
\end{equation*}

enter image description here

2
  • I'd write {}+\tilde{C}^T in the second line; otherwise the C is too close to the +. Given the length of the word "scalaire" a \mathclap from mathtools may be nice too.
    – campa
    Jan 21, 2016 at 15:06
  • @campa, yes, there are many improvements to be done in the code.
    – Sigur
    Jan 21, 2016 at 15:08

You must log in to answer this question.

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