# ! Missing $inserted.<inserted text>$ \textbf{Basic} & \textbf{x_1}

I am new to TEX world . I am now working on thesis in TEX . I have the following code to show a table .

                              \begin{center}
\begin{tabular}{ | l | c |  r | l | c | r|  l | c |  }
\hline
\textbf{Basic} & \textbf{x_1} & \textbf{x_2} & \textbf{x_3} & \textbf{s_1}  & \textbf{s_2}  & \textbf{s_3} &    \textbf{b} \\ \hline
s1 &    2 & 1 & 0 & 1 & 0 & 0 & 10 \\ \hline
s2 & 1 & 2  & -2 &  0 & 1 & 0 & 20 \\ \hline
s3 & 0 & 1 & 2 & 0 & 0 & 1 & 5 \\ \hline
Z & -2 & 1 & -2 & 0 & 0 & 0 & 0 \\ \hline
\hline
\end{tabular}
\end{center}


But TexMaker IDE shows the following error .

! Missing $inserted.<inserted text>$ \textbf{Basic} & \textbf{x_1}


A snapshot of my error is provided below :

Here is my code :

Where is the error ?

• subscripts need math mode so \textbf{$x_1$} but then you need math bold fonts. – percusse Jun 18 '14 at 11:24
• _ is a math-char. I would suggest you to do: $\mathbf{x_1}$ for the xs. It however, requires amsmath. Also all numbers should be typeset in  to get mathematical fonts, see tex.stackexchange.com/questions/185193/… – zeroth Jun 18 '14 at 11:25
• You also can use \textsubscript from the subscript package (in the LaTeX bundle fragments). – Bernard Jun 18 '14 at 11:55
• @DavidCarlisle I didn't say it wasn't ;) I also always have it! But if the OP didn't want to use it, for whatever reason... :) I can now see that however was a bad wording, English is not my primary language. I'll note that wording. – zeroth Jun 18 '14 at 14:03

x_index

$x_index$