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 would like to draw table,

correct table

I tried,

\begin{equation}
\begin{array}{c}
z \\ 
s_1 \\
s_2 \\
s_3 
\end{array}
\begin{bmatrix}
\begin{array}{c|ccccc|c}
  z & x_1 & x_2 & s_1 & s_2 & s_3 & b \\ \hline
  1 & 0 & 0 & 1.6 & 2.2 & 0 & 544 \\ \hline
  0 & 1 & 1 & 0.4 & -0.2 & 0 & 16  \\
  0 & 0 & 1 & -0.2 & 0.6 & 0 & 72 \\
  0 & 0 & 0 & -0.4 & 0.2 & 1 & 19 \\
\end{array}
\end{bmatrix}
\end{equation}

However I get, with an allignment issue on the left,

incorrect

share|improve this question

1 Answer 1

up vote 2 down vote accepted

As soon as I posted the question i realized by adding another item in the first array I could move it down,

\begin{equation}
\begin{array}{c}
\\
z \\ 
s_1 \\
s_2 \\
s_3 
\end{array}
\begin{bmatrix}
\begin{array}{c|ccccc|c}
  z & x_1 & x_2 & s_1 & s_2 & s_3 & b \\ \hline
  1 & 0 & 0 & 1.6 & 2.2 & 0 & 544 \\ \hline
  0 & 1 & 1 & 0.4 & -0.2 & 0 & 16  \\
  0 & 0 & 1 & -0.2 & 0.6 & 0 & 72 \\
  0 & 0 & 0 & -0.4 & 0.2 & 1 & 19 \\
\end{array}
\end{bmatrix}
\end{equation}

Is this the best method however?

share|improve this answer

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.