Hi everyone. I'm trying to make a basic 4x3 table. How do I do this?

Printable View

- Jan 31st 2011, 06:27 AMVonNemo19Array Help
Hi everyone. I'm trying to make a basic 4x3 table. How do I do this?

- Jan 31st 2011, 06:42 AMAckbeet
Hmm. Double-click this:

$\displaystyle \begin{tabular}{c|c|c}

1 &3 &7\\ \hline

3 &6 &0

\end{tabular}$

The {c|c|c} part is an argument to the tabular environment telling LaTeX that you want three centered columns (you could use l or r for left or right justified, although I'm not sure how well that's translating in MHF.), and that you want single vertical lines in-between the columns. The \hline command gives you a horizontal line in-between the two lines. Compare:

$\displaystyle \begin{tabular}{|l|c|r|}

1+x &3-x^{2}-\sqrt{y} &7+\ln(r\theta)\\

3+y+z &6 &0

\end{tabular}$

Hope this helps.