I have the table below with 9 rows and 4 columns.
The first three columns are text, but the 4th columns has figures generated using Tikz. As it stands now the text aligns horizontally with the bottom of each corresponding figure in the 4th column. How do I adjust the code given below so that the text aligns with the top of each figure?
\documentclass{article}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{tikz}
\usepackage{booktabs}
\DeclareMathOperator{\rota}{rot_{90}}
\DeclareMathOperator{\rotb}{rot_{180}}
\DeclareMathOperator{\rotc}{rot_{270}}
\DeclareMathOperator{\fliph}{flip_h}
\DeclareMathOperator{\flipv}{flip_v}
\DeclareMathOperator{\flipd}{flip_d}
\DeclareMathOperator{\flipa}{flip_a}
\DeclareMathOperator{\I}{I}
\begin{document}
\begin{table}[h!]
\centering
\renewcommand{\arraystretch}{0.8}
\begin{tabular}{c | l | c | c}
\toprule
Index & Symmetry & Type \# & Example \\
\midrule
8 & none & 1 &
${
{\begin{tikzpicture}[black,line width=0.5pt, scale=0.24]
\draw (0,0) -- (3,0) -- (3,1) -- (1,1) -- (1,2) -- (0,2) -- cycle; % draw piece
\draw[step=1cm,gray,very thin] (0,0) grid (2,1); % do grid last
\end{tikzpicture}}
}$
\\
\midrule
4 & $\rotb$ & 2 &
${
{\begin{tikzpicture}[black,line width=0.5pt, scale=0.24]
\draw (1,0) -- (3,0) -- (3,1) -- (2,1) -- (2,2) -- (0,2) -- (0,1) -- (1,1) -- cycle; % draw piece
\draw[step=1cm,gray,very thin] (1,0) grid (2,2); % do grid last
\end{tikzpicture}}
}$
\\
4 & $\fliph$ or $\flipv$ & 3 &
${
{\begin{tikzpicture}[black,line width=0.5pt, scale=0.24]
\draw (0,0) -- (3,0) -- (3,1) -- (2,1) -- (2,2) -- (1,2) -- (1,1) -- (0,1) -- cycle; % draw piece
\draw[step=1cm,gray,very thin] (1,0) grid (2,1); % do grid last
\end{tikzpicture}}
}$
\\
4 & $\flipd$ or $\flipa$ & 4 &
${
{\begin{tikzpicture}[black,line width=0.5pt, scale=0.24]
\draw (0,0) -- (2,0) -- (2,1) -- (1,1) -- (1,2) -- (0,2) -- cycle; % draw piece
\draw[step=1cm,gray,very thin] (0,0) grid (1,1); % do grid last
\end{tikzpicture}}
}$
\\
\midrule
2 & $\rota$ (implies $\rotb$ and $\rotc$) & 5 &
${
{\begin{tikzpicture}[black,line width=0.5pt, scale=0.24]
\draw (1,0) -- (2,0) -- (2,1) -- (4,1) -- (4,2) -- (3,2) -- (3,4) -- (2,4) -- (2,3) -- (0,3) -- (0,2) -- (1,2) -- cycle; % draw piece
\draw[step=1cm,gray,very thin] (1,1) grid (3,3); % do grid last
\end{tikzpicture}}
}$
\\
2 & $\flipv$ and $\fliph$ (implies $\rotb$) & 6 &
${
{\begin{tikzpicture}[black,line width=0.5pt, scale=0.24]
\draw (0,0) -- (2,0) -- (2,1) -- (0,1) -- cycle; % draw piece
\draw[step=1cm,gray,very thin] (0,0) grid (2,1); % do grid last
\end{tikzpicture}}
}$
\\
2 & $\flipd$ and $\flipa$ (implies $\rotb$) & 7 &
${
{\begin{tikzpicture}[black,line width=0.5pt, scale=0.24]
\draw (0,2) -- (1,2) -- (1,1) -- (2,1) -- (2,0) -- (3,0) -- (3,1) -- (4,1) -- (4,2) -- (3,2) -- (3,3) -- (2,3) -- (2,4) -- (1,4) -- (1,3) -- (0,3) -- cycle; % draw piece
\draw[step=1cm,gray,very thin] (1,1) grid (3,3); % do grid last
\end{tikzpicture}}
}$
\\
\midrule
1 & all of the above symmetries & 8 &
${
{\begin{tikzpicture}[black,line width=0.5pt, scale=0.24]
\draw (0,0) -- (1,0) -- (1,1) -- (0,1) -- cycle; % draw piece
\end{tikzpicture}}
}$
\\
\bottomrule
\end{tabular}
\caption{Types of polyominoes depending on their non-trivial symmetry.}
\label{tab:polyominoes}
\end{table}
\end{document}
baseline={([yshift=-\ht\strutbox]current bounding box.north)}
to the options of each picture would be a start. This would put the top of the picture as high as a\strut
.booktabs
package.