# Graphics messing up array alignment?

I feel like this has probably been asked before, but I couldn't find a duplicate. I'm having some trouble with an array that I'm trying to make. The main problem has to do with graphics inclusion, but I have several other questions and I'll list them all. The array needs to consist of, from left to right:

1. The Rolfsen index of a knot
2. A picture of said knot
3. A matrix associated with the knot
4. The Jones polynomial of the knot

Here is a sample file of the array, made long enough that you can see all of the problems:

\documentclass[12pt,letterpaper]{report}
\usepackage{graphicx}
\usepackage{amsmath}

\begin{document}
\begin{small}
$\begin{array}{cccc} & \textbf{Knot with Crossings} && \\ \textbf{Knot} & \textbf{Labeled and Oriented} & \textbf{Trip Matrix} & \textbf{Jones Polynomial} \\ \text{\Large{8_{18}}} & \includegraphics[width=0.25\textwidth]{example-image.jpg} & \begin{bmatrix} 0 & 1 & 0 & 1 & 0 & 0 & 1 & 1 \\ 1 & 0 & 1 & 0 & 1 & 0 & 0 & 1 \\ 0 & 1 & 0 & 1 & 1 & 1 & 0 & 0 \\ 1 & 0 & 1 & 0 & 0 & 1 & 1 & 0 \\ 0 & 1 & 1 & 0 & 0 & 1 & 0 & 1 \\ 0 & 0 & 1 & 1 & 1 & 0 & 1 & 0 \\ 1 & 0 & 0 & 1 & 0 & 1 & 0 & 1 \\ 1 & 1 & 0 & 0 & 1 & 0 & 1 & 0 \end{bmatrix} & q^4-4q^3+6q^2-7q+9-7q^{-1}+6q^{-2}-4q^{-3}+q^{-4} \\ \text{\Large{8_{19}}} & \includegraphics[width=0.25\textwidth]{example-image.jpg} & \begin{bmatrix} 0 & 1 & 1 & 0 & 1 & 1 & 0 & 0 \\ 1 & 0 & 1 & 0 & 1 & 1 & 0 & 0 \\ 1 & 1 & 0 & 1 & 1 & 0 & 1 & 1 \\ 0 & 0 & 1 & 1 & 1 & 0 & 1 & 1 \\ 1 & 1 & 1 & 1 & 1 & 0 & 0 & 0 \\ 1 & 1 & 0 & 0 & 0 & 1 & 1 & 1 \\ 0 & 0 & 1 & 1 & 0 & 1 & 0 & 1 \\ 0 & 0 & 1 & 1 & 0 & 1 & 1 & 0 \end{bmatrix} & -q^8+q^5+q^3 \\ \text{\Large{8_{20}}} & \includegraphics[width=0.25\textwidth]{example-image.jpg} & \begin{bmatrix} 1 & 1 & 1 & 0 & 1 & 1 & 1 & 1 \\ 1 & 1 & 0 & 1 & 0 & 0 & 1 & 1 \\ 1 & 0 & 0 & 1 & 1 & 1 & 0 & 0 \\ 0 & 1 & 1 & 0 & 1 & 1 & 0 & 0 \\ 1 & 0 & 1 & 1 & 1 & 1 & 1 & 1 \\ 1 & 0 & 1 & 1 & 1 & 0 & 0 & 0 \\ 1 & 1 & 0 & 0 & 1 & 0 & 1 & 1 \\ 1 & 1 & 0 & 0 & 1 & 0 & 1 & 1 \\ \end{bmatrix} & -q+2-q^{-1}+2q^{-2}-q^{-3}+q^{-4}-q^{-5} \\ \text{\Large{8_{21}}} & \includegraphics[width=0.25\textwidth]{example-image.jpg} & \begin{bmatrix} 0 & 1 & 1 & 0 & 1 & 1 & 1 & 1 \\ 1 & 1 & 0 & 1 & 0 & 0 & 1 & 1 \\ 1 & 0 & 1 & 1 & 1 & 1 & 0 & 0 \\ 0 & 1 & 1 & 1 & 1 & 1 & 0 & 0 \\ 1 & 0 & 1 & 1 & 1 & 1 & 1 & 1 \\ 1 & 0 & 1 & 1 & 1 & 1 & 0 & 0 \\ 1 & 1 & 0 & 0 & 1 & 0 & 1 & 1 \\ 1 & 1 & 0 & 0 & 1 & 0 & 1 & 1 \\ \end{bmatrix} & 2q^{-1}-2q^{-2}+3q^{-3}-3q^{-4}+2q^{-5}-2q^{-6}+q^{-7} \end{array}$
\end{small}
\end{document}


This will be a very long list, spanning about 15 pages, that I will be adding to repeatedly over the course of my thesis, so I'd like to streamline it now. Perhaps I'm completely off base trying to do it in an array environment in the first place, and there's some better environment for it that I don't know about. The problems I'm having, in order of importance, are:

1. The array is rendering for me such that all of the text is vertically centered at the bottom of the graphic in the second column. I would like it so that the vertical centers of the entries all line up with each other, i.e. the center of the knot index lines up with the center of the picture lines up with the center of the array lines up with the center of the polynomial, or at the very least so that the bottoms line up.
2. I would like to put a line break in the middle of the Jones Polynomials sometimes so that everything can fit on the page, and I don't know how to accomplish this inside of an array. Word-wrapping with a fixed width for the column would be ideal, because like I said there will be a lot of them, and it would be annoying to have to format each one individually.
3. I would like the first column to have Large font size without manually putting in \text{\Large{$KNOT$}} every time I write an entry in the first column.
4. Page breaks that happen in the middle of the row do not move the row in question onto the next page, and I need them to do that.
5. There's a blank page showing up before the array. I suspect this will go away when I figure out #4.
6. (BONUS) If I could get it to repeat the title rows at the beginning of every page automatically that would be awesome, that seems like something someone would have programmed LaTeX to do by now, but I realize it's probably a long shot.

You probably need a longtable and to make the matrices smaller; I also suggest to split the longer polynomials over two lines.

\documentclass[12pt,letterpaper]{report}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{booktabs,longtable,array}

\newenvironment{smallbmatrix}
{\left[\smallmatrix}
{\endsmallmatrix\right]}

\begin{document}

\begin{small}
\begin{longtable}{@{}*{4}{>{$}c<{$}}@{}}

\caption{Knots}\label{tab:knots} \\
\midrule[\heavyrulewidth]
\textbf{Knot} &
\textbf{%
\begin{tabular}{@{}c@{}}
Knot with \\
Crossings Labeled \\
and Oriented
\end{tabular}%
} &
\textbf{Trip Matrix} &
\multicolumn{1}{c}{\textbf{Jones Polynomial}}
\\
\midrule
\caption*{Knots (continued} \\
\midrule[\heavyrulewidth]
\textbf{Knot} &
\textbf{%
\begin{tabular}{@{}c@{}}
Knot with \\
Crossings Labeled \\
and Oriented
\end{tabular}%
} &
\textbf{Trip Matrix} &
\multicolumn{1}{c}{\textbf{Jones Polynomial}}
\\
\midrule
\bottomrule
\endfoot

8_{18}
&
\includegraphics[valign=c,width=0.25\textwidth]{example-image.jpg}
&
\begin{smallbmatrix}
0 & 1 & 0 & 1 & 0 & 0 & 1 & 1 \\
1 & 0 & 1 & 0 & 1 & 0 & 0 & 1 \\
0 & 1 & 0 & 1 & 1 & 1 & 0 & 0 \\
1 & 0 & 1 & 0 & 0 & 1 & 1 & 0 \\
0 & 1 & 1 & 0 & 0 & 1 & 0 & 1 \\
0 & 0 & 1 & 1 & 1 & 0 & 1 & 0 \\
1 & 0 & 0 & 1 & 0 & 1 & 0 & 1 \\
1 & 1 & 0 & 0 & 1 & 0 & 1 & 0
\end{smallbmatrix}
&
\begin{aligned}
q^4 & -4q^3+6q^2-7q+9 \\
& -7q^{-1}+6q^{-2}-4q^{-3}+q^{-4}
\end{aligned}
\\
8_{19}
&
\includegraphics[valign=c,width=0.25\textwidth]{example-image.jpg}
&
\begin{smallbmatrix}
0 & 1 & 1 & 0 & 1 & 1 & 0 & 0 \\
1 & 0 & 1 & 0 & 1 & 1 & 0 & 0 \\
1 & 1 & 0 & 1 & 1 & 0 & 1 & 1 \\
0 & 0 & 1 & 1 & 1 & 0 & 1 & 1 \\
1 & 1 & 1 & 1 & 1 & 0 & 0 & 0 \\
1 & 1 & 0 & 0 & 0 & 1 & 1 & 1 \\
0 & 0 & 1 & 1 & 0 & 1 & 0 & 1 \\
0 & 0 & 1 & 1 & 0 & 1 & 1 & 0
\end{smallbmatrix}
&
-q^8+q^5+q^3
\\
8_{20}
&
\includegraphics[valign=c,width=0.25\textwidth]{example-image.jpg}
&
\begin{smallbmatrix}
1 & 1 & 1 & 0 & 1 & 1 & 1 & 1 \\
1 & 1 & 0 & 1 & 0 & 0 & 1 & 1 \\
1 & 0 & 0 & 1 & 1 & 1 & 0 & 0 \\
0 & 1 & 1 & 0 & 1 & 1 & 0 & 0 \\
1 & 0 & 1 & 1 & 1 & 1 & 1 & 1 \\
1 & 0 & 1 & 1 & 1 & 0 & 0 & 0 \\
1 & 1 & 0 & 0 & 1 & 0 & 1 & 1 \\
1 & 1 & 0 & 0 & 1 & 0 & 1 & 1 \\
\end{smallbmatrix}
&
\begin{aligned}
-q & +2-q^{-1}+2q^{-2}\\
& -q^{-3}+q^{-4}-q^{-5}
\end{aligned}
\\
8_{21}
&
\includegraphics[valign=c,width=0.25\textwidth]{example-image.jpg}
&
\begin{smallbmatrix}
0 & 1 & 1 & 0 & 1 & 1 & 1 & 1 \\
1 & 1 & 0 & 1 & 0 & 0 & 1 & 1 \\
1 & 0 & 1 & 1 & 1 & 1 & 0 & 0 \\
0 & 1 & 1 & 1 & 1 & 1 & 0 & 0 \\
1 & 0 & 1 & 1 & 1 & 1 & 1 & 1 \\
1 & 0 & 1 & 1 & 1 & 1 & 0 & 0 \\
1 & 1 & 0 & 0 & 1 & 0 & 1 & 1 \\
1 & 1 & 0 & 0 & 1 & 0 & 1 & 1 \\
\end{smallbmatrix}
&
\begin{aligned}
2q^{-1} & -2q^{-2}+3q^{-3}-3q^{-4} \\
& +2q^{-5}-2q^{-6}+q^{-7}
\end{aligned}
\\
\end{longtable}
\end{small}

\end{document}


• your tale is to wide to be fit on page
• with use mathtools package is possible break long math expression oin the last column in two lines
• for vertical adjustment images in table i suggest to use adjustbox package
• for more vertical space around matrices i suggest to use macro \makegapedcells from makecell package:

\documentclass[12pt,letterpaper]{report}
\usepackage{mathtools}          % <--- changed
\usepackage{makecell}
\setcellgapes{3pt}

\begin{document}
\begingroup\small
\makegapedcells
\begin{array}{cccc} \text{\thead[b]{Knot}} & \text{\thead[b]{Knot with Crossings\\ Labeled and Oriented}} & \text{\thead[b]{Trip Matrix}} & \text{\thead{Jones Polynomial}} \\ \text{\Large 8_{18}} & \includegraphics[width=0.25\textwidth, valign=c]{example-image.jpg} & \begin{bmatrix} 0 & 1 & 0 & 1 & 0 & 0 & 1 & 1 \\ 1 & 0 & 1 & 0 & 1 & 0 & 0 & 1 \\ 0 & 1 & 0 & 1 & 1 & 1 & 0 & 0 \\ 1 & 0 & 1 & 0 & 0 & 1 & 1 & 0 \\ 0 & 1 & 1 & 0 & 0 & 1 & 0 & 1 \\ 0 & 0 & 1 & 1 & 1 & 0 & 1 & 0 \\ 1 & 0 & 0 & 1 & 0 & 1 & 0 & 1 \\ 1 & 1 & 0 & 0 & 1 & 0 & 1 & 0 \end{bmatrix} & \begin{multlined} q^4 - 4q^3 + 6q^2 - 7q + 9 - \\ 7q^{-1} +6q^{-2}-4q^{-3}+q^{-4} \end{multlined} \\ \text{\Large{8_{19}}} & \includegraphics[width=0.25\textwidth,valign=c]{example-image.jpg} & \begin{bmatrix} 0 & 1 & 1 & 0 & 1 & 1 & 0 & 0 \\ 1 & 0 & 1 & 0 & 1 & 1 & 0 & 0 \\ 1 & 1 & 0 & 1 & 1 & 0 & 1 & 1 \\ 0 & 0 & 1 & 1 & 1 & 0 & 1 & 1 \\ 1 & 1 & 1 & 1 & 1 & 0 & 0 & 0 \\ 1 & 1 & 0 & 0 & 0 & 1 & 1 & 1 \\ 0 & 0 & 1 & 1 & 0 & 1 & 0 & 1 \\ 0 & 0 & 1 & 1 & 0 & 1 & 1 & 0 \end{bmatrix} & -q^8+q^5+q^3 \\ \text{\Large{8_{20}}} & \includegraphics[width=0.25\textwidth,valign=c]{example-image.jpg} & \begin{bmatrix} 1 & 1 & 1 & 0 & 1 & 1 & 1 & 1 \\ 1 & 1 & 0 & 1 & 0 & 0 & 1 & 1 \\ 1 & 0 & 0 & 1 & 1 & 1 & 0 & 0 \\ 0 & 1 & 1 & 0 & 1 & 1 & 0 & 0 \\ 1 & 0 & 1 & 1 & 1 & 1 & 1 & 1 \\ 1 & 0 & 1 & 1 & 1 & 0 & 0 & 0 \\ 1 & 1 & 0 & 0 & 1 & 0 & 1 & 1 \\ 1 & 1 & 0 & 0 & 1 & 0 & 1 & 1 \\ \end{bmatrix} & \begin{multlined} -q+2 - q^{-1} + 2q^{-2} - \\ q^{-3} + q^{-4} -q^{-5} \end{multlined} \\ \text{\Large{8_{21}}} & \includegraphics[width=0.25\textwidth,valign=c]{example-image.jpg} & \begin{bmatrix} 0 & 1 & 1 & 0 & 1 & 1 & 1 & 1 \\ 1 & 1 & 0 & 1 & 0 & 0 & 1 & 1 \\ 1 & 0 & 1 & 1 & 1 & 1 & 0 & 0 \\ 0 & 1 & 1 & 1 & 1 & 1 & 0 & 0 \\ 1 & 0 & 1 & 1 & 1 & 1 & 1 & 1 \\ 1 & 0 & 1 & 1 & 1 & 1 & 0 & 0 \\ 1 & 1 & 0 & 0 & 1 & 0 & 1 & 1 \\ 1 & 1 & 0 & 0 & 1 & 0 & 1 & 1 \\ \end{bmatrix} & \begin{multlined} 2q^{-1} - 2q^{-2} + 3q^{-3} - \\ 3q^{-4} + 2q^{-5} - 2q^{-6} + q^{-7} \end{multlined} \end{array}
\endgroup
\end{document}


(red lines indicate your page layout)

• For all +1. Very nice work. Mar 2, 2018 at 8:20

\newcommand{\vchbox}[1]{\ensuremath{\vcenter{\hbox{#1}}}}

\vchbox{\includegraphics[...]{..}}