[Tex/LaTex] longtable does not break

longtablepage-breaking

I am using a longtable environment to put some graph images in (perfectly works in all the other figures with tabular environments that i have produced already) However, when in comes to the longtable, the page is not breaking and i cannot find the issue. Any help appreciated.


\begin{figure} [htbp]
\begin{center}
\begin{longtable}{l l}
\endfirsthead
{{\bfseries \tablename\ \thetable{} -- continued from previous page}} \\
\endhead
\endfoot
\endlastfoot
\textbf{a)} & \textbf{b)} \\
\includegraphics[width=\figwidth]{images/FAs1} & \includegraphics[width=\figwidth]{images/FAs2}\\
\textbf{c)} & \textbf{d)} \\
\includegraphics[width=\figwidth]{images/FAs3} & \includegraphics[width=\figwidth]{images/FAs4}\\
\textbf{e)} & \textbf{f)} \\
\includegraphics[width=\figwidth]{images/FAs5} & \includegraphics[width=\figwidth]{images/FAs6}\
\newpage

\textbf{g)} & \textbf{h)} \\
\includegraphics[width=\figwidth]{images/FAs7} & \includegraphics[width=\figwidth]{images/FAs8}\\
\textbf{i)} & \textbf{j)} \\
\includegraphics[width=\figwidth]{images/FAs9} & \includegraphics[width=\figwidth]{images/FAs10}\\
\caption{Fatty acids found in \nig in \wt and \crt }
\label{fig:FAs}
\end{longtable}
\end{center}
\end{figure}

Many thanks!

Best Answer

As already pointed out by @David Carlisle, you should not put a longtable into a figure environment. Here is the new code. I had to change the width for not knowing what you used there. Just change it back. I also switched off the commands in the caption.

% arara: pdflatex

\documentclass{article}
\usepackage{longtable}
\usepackage[%
    ,demo
    ]{graphicx}

\begin{document}
\begin{longtable}{l l}
\endfirsthead
{{\bfseries \tablename\ \thetable{} -- continued from previous page}} \\
\endhead
\endfoot
\endlastfoot
\textbf{a)} & \textbf{b)} \\
\includegraphics[width=5cm]{images/FAs1} & \includegraphics[width=5cm]{images/FAs2}\\
\textbf{c)} & \textbf{d)} \\
\includegraphics[width=5cm]{images/FAs3} & \includegraphics[width=5cm]{images/FAs4}\\
\textbf{e)} & \textbf{f)} \\
\includegraphics[width=5cm]{images/FAs5} & \includegraphics[width=5cm]{images/FAs6}\\
%
\newpage
%
\textbf{g)} & \textbf{h)} \\
\includegraphics[width=5cm]{images/FAs7} & \includegraphics[width=5cm]{images/FAs8}\\
\textbf{i)} & \textbf{j)} \\
\includegraphics[width=5cm]{images/FAs9} & \includegraphics[width=5cm]{images/FAs10}\\
\caption{Fatty acids found in %\nig in \wt and \crt % commented out for not knowing what that is.
}
\label{fig:FAs}
\end{longtable}
\end{document}
Related Question