I'm trying to make a table using the booktabs
package. Here's the code:
\documentclass[11pt,amssymb]{amsart}
\usepackage{booktabs} % Allows the use of \toprule, \midrule and \bottomrule in tables
\usepackage{amsmath}
\usepackage{caption}
\usepackage{mathtools}
\usepackage{amsthm}
\usepackage{fullpage}
\begin{document}
\begin{table}\hspace*{-1cm}
\centering
\begin{tabular}[h]{ccccccc}
\toprule
$\circ$ & $1$ & $r$ & $r^2$ & $s$ & $sr$ & $sr^2$ \\
\midrule
$1$ & $1$ & $r$ & $r^2$ & $s$ & $sr$ & $sr^2$ \\
\midrule
$r$ & $r$ & $r^2$ & $1$ & $sr^2$ & $s$ & $sr$ \\
\midrule
$r^2$ & $r^2$ & $1$ & $r$ & $sr$ & $sr^2$ & $sr$ \\
\midrule
$s$ & $s$ & $sr$ & $sr^2$ & $1$ & $r$ & $r^2$ \\
\midrule
$sr$ & $sr$ & $sr^2$ & $s$ & $r^2$ & $1$ & $r$ \\
\midrule
$sr^2$ & $sr^2$ & $s$ & $sr$ & $r$ & $r^2$ & $1$ \\
\bottomrule
\end{tabular}
\caption{Group Table for $D_6$}
\end{table}
\end{document}
Here's the output:
I would like to add vertical columns, but the package produces vertical lines that are broken by each row.
booktabs
package never to use vertical rules. :-)}[h]
tabular
does not have anh
option, unfortunately latex doesn't flag that error, it just ignores theh
(the only allowed values aret
c
orb
)\hspace*{-1cm}
directive? It causes thetabular
environment to be shifted 1cm to the left, causing a noticeably asymmetric placement of the caption.