# How do I write this table in LaTeX?

I want to construct the table from page 8 from this article:

I tried this

\begin{table}[h!]
\centering
$\begin{array}{@{}c|cccc@{}} \textbf{w^2}-xz & -x & y & 0 & -z & 0 & -z^2+wz \\ \textbf{wx}-yz & \textbf{w} & -x & -y & 0 & z & z^2 \\ \textbf{x^2}-wy & -z & \textbf{w} & 0 & -y & 0 & 0 \\ \textbf{xy}-z^2 & 0 & 0 & \textbf{w} & \textbf{x} & -y & yz \\ \textbf{y^2}-wz & 0 & 0 & -z & -w & \textbf{x} \textbf{w^2} \\ \hline & 0 & y & -x & textbf{w} & -z & 1 \\ & -y^2+wz & z^2 & -wy & yz & -w^2 & \textbf{x}\\ \end{array}$
\label{tab:table1}
\end{table}\\


but it doesn't work.

• Please make your code snippet compilable and explain what "does not work" mean! – Mensch Mar 28 '18 at 17:41
• You want \mathbf{w}^2 – egreg Mar 28 '18 at 17:42
• You can find more ways on bold math here For more ways see here: tex.stackexchange.com/questions/595/… – koleygr Mar 28 '18 at 18:04

There are some errors in the code of the question:

• Two columns are missing in the column specification of array.
• textbf without backslash
• Missing & at the end of the fifth row.
• Bold in math for letters are done with \mathbf.
• Exponents are usually not made bold.
• \\ after \end{table} is bad style, since table is usually a floating object, where \\ does not make any sense, if the object before is floated away.

Full example:

\documentclass{article}
\begin{document}
\begin{table}
\centering
$\begin{array}{c|cccccc} \mathbf{w}^2-xz & -x & y & 0 & -z & 0 & -z^2+wz \\ \mathbf{wx}-yz & \mathbf{w} & -x & -y & 0 & z & z^2 \\ \mathbf{x}^2-wy & -z & \mathbf{w} & 0 & -y & 0 & 0 \\ \mathbf{xy}-z^2 & 0 & 0 & \mathbf{w} & \mathbf{x} & -y & yz \\ \mathbf{y}^2-wz & 0 & 0 & -z & -w & \mathbf{x} & \mathbf{w}^2 \\ \hline & 0 & y & -x & \mathbf{w} & -z & 1 \\ & -y^2+wz & z^2 & -wy & yz & -w^2 & \mathbf{x}\\ \end{array}$
\label{tab:table1}
\end{table}
\end{document}


• Just to complete the list: \label is useless without a \caption. – egreg Mar 28 '18 at 21:13
• @egreg \pageref is still working. – Heiko Oberdiek Mar 28 '18 at 23:47