There are a few options described in How can I make a table that takes up more than a single page?
I've put a MWE below using the longtable
package; I deliberately didn't put the longtable
in the table
environment so that it wouldn't float, and would show that it breaks across pages.
As described in @Werner's comment, the documentation has a lot of detail.
\documentclass{article}
\usepackage{longtable}
\usepackage{lipsum} % just for dummy text- not needed for a longtable
\begin{document}
\lipsum[1]
\lipsum[1]
\lipsum[1]
%\begin{table}[h]
%\centering
\begin{longtable}{| p{.20\textwidth} | p{.80\textwidth} |}
\hline
foo & bar \\ \hline
foo & bar \\ \hline
foo & bar \\ \hline
foo & bar \\ \hline
foo & bar \\ \hline
foo & bar \\ \hline
foo & bar \\ \hline
foo & bar \\ \hline
foo & bar \\ \hline
foo & bar \\ \hline
foo & bar \\ \hline
\caption{Your caption here} % needs to go inside longtable environment
\label{tab:myfirstlongtable}
\end{longtable}
%\end{table}
Table \ref{tab:myfirstlongtable} shows my first longtable.
\end{document}
As a side note, some folks would advocate against using vertical lines in a table- that's a separate discussion though :) Have a look at Why not use vertical lines ('|') in a tabular?
longtable
package documentation is available on CTAN. It includes one very detailed example.tabular
->longtable
will do the trick. They have perfect comformance afaict.