I'm trying to make a longtable and make it span two pages in memoir. I've tried for many days but it doesn't work, so I hope I can get some help here. Maybe I have conflicting packages or there is a simple trick I have overlooked (or it is in fact tricky).
My example: (changed from showing preamble to showing a working example)
\documentclass[a4paper,article,twocolumn]{memoir}
\usepackage[english]{babel}
\usepackage{lipsum}
\usepackage[utf8x]{inputenc}
\usepackage{geometry}
\usepackage{graphicx}
\usepackage[table]{xcolor}
\usepackage{microtype}
\usepackage{booktabs}
\usepackage[T1]{fontenc}
\usepackage{pdflscape}
\usepackage{pdfpages}
\usepackage{rotating}
\usepackage{float}
\newgeometry{left=2.5cm,right=2.5cm,bottom=2.5cm,top=2.5cm,head=79pt}
\usepackage{longtable}
%\usepackage{fancyhdr}
\LTchunksize=25
\definecolor{lightgray}{gray}{0.9}
% alternate rowcolors for all long-tables
\let\oldlongtable\longtable
\let\endoldlongtable\endlongtable
%\renewenvironment{longtable}{\rowcolors{2}{white}{lightgray}\oldlongtable} {
%\endoldlongtable}
\def\zza{\global\let\zz\zzb
\fullwidthcolor{lightgray}}%
\def\zzb{\global\let\zz\zza}
\def\fullwidthcolor#1{\color{#1}\leaders\vrule\hskip\textwidth\hskip-\textwidth\kern0pt}
\def\resetLTcolor{\global\let\zz\zza}
\LTleft0pt
\LTright0pt
%%%%%%
% Captions
%%%%%%
\usepackage{caption}
\captionsetup[figure]{labelfont={bf},textfont={small}}
\captionsetup[table]{labelfont={bf},textfont={small}}
\setlength{\abovecaptionskip}{10pt plus 3pt minus 2pt}
\setlength{\belowcaptionskip}{0pt plus 3pt minus 2pt}
%%%%%%
% parskip
%%%%%%
\usepackage{parskip}
\setlength{\parindent}{0cm}
\setlength{\parskip}{0.2cm plus 0.1cm minus 0.1cm}
\title{\sffamily{TITLE}}
\author{%
John Johnson \and
Jacob Jacobson
}%
\date{December 25 2016}
%--------------------------------------------------
\begin{document}
\twocolumn[
\maketitle
\hrule
\begin{onecolabstract}
Horum omnium fortissimi sunt Belgae, propterea quod a cultu atque humanitate provinciae longissime absunt, minimeque ad eos mercatores saepe commeant atque ea quae ad effeminandos animos pertinent important, proximique sunt Germanis, qui trans Rhenum incolunt, quibuscum continenter bellum gerunt.
\end{onecolabstract}
\hrule\vspace{2em}
]
%--------------------------------------------------
\lipsum[1-7]
\begin{table*}[ht!]
\centering\footnotesize
\caption{This is some text in the caption.}
\rowcolors{1}{}{lightgray}
\begin{tabular}{c p{1.5cm} p{1.5cm} p{1.5cm} p{1.5cm} p{1.5cm} p{2.5cm}}
\hline
Combination & Crit. \mbox{correlation} & Verbal \mbox{reasoning} & alpha-numeric & Matrix \mbox{reasoning} & Dice \mbox{rotation} & Items \\
\hline
1088 & 0.89 & 1 & 2 & 1 & 1 & VR4 LN33 LN58 MR47 R3D6 \\
1087 & 0.89 & 1 & 2 & 1 & 1 & VR4 LN33 LN58 MR47 R3D4 \\
1172 & 0.88 & 1 & 2 & 1 & 1 & VR4 LN34 LN58 MR47 R3D6 \\
2876 & 0.88 & 1 & 2 & 1 & 1 & VR17 LN34 LN58 MR45 R3D4 \\
1161 & 0.88 & 1 & 2 & 1 & 1 & VR4 LN34 LN58 MR45 R3D6 \\
2918 & 0.88 & 1 & 1 & 1 & 2 & VR17 LN34 MR45 R3D4 R3D6 \\
968 & 0.88 & 1 & 2 & 1 & 1 & VR4 LN7 LN58 MR47 R3D6 \\
1171 & 0.88 & 1 & 2 & 1 & 1 & VR4 LN34 LN58 MR47 R3D4 \\
2877 & 0.88 & 1 & 2 & 1 & 1 & VR17 LN34 LN58 MR45 R3D6 \\
2882 & 0.88 & 1 & 2 & 1 & 1 & VR17 LN34 LN58 MR46 R3D4 \\
1166 & 0.88 & 1 & 2 & 1 & 1 & VR4 LN34 LN58 MR46 R3D4 \\
2678 & 0.88 & 1 & 2 & 1 & 1 & VR17 LN7 LN58 MR46 R3D4 \\
1202 & 0.88 & 1 & 1 & 1 & 2 & VR4 LN34 MR45 R3D4 R3D6 \\
2875 & 0.88 & 1 & 2 & 1 & 1 & VR17 LN34 LN58 MR45 R3D3 \\
1160 & 0.88 & 1 & 2 & 1 & 1 & VR4 LN34 LN58 MR45 R3D4 \\
967 & 0.88 & 1 & 2 & 1 & 1 & VR4 LN7 LN58 MR47 R3D4 \\
1082 & 0.88 & 1 & 2 & 1 & 1 & VR4 LN33 LN58 MR46 R3D4 \\
1227 & 0.88 & 1 & 1 & 1 & 2 & VR4 LN34 MR47 R3D4 R3D6 \\
2677 & 0.88 & 1 & 2 & 1 & 1 & VR17 LN7 LN58 MR46 R3D3 \\
2672 & 0.88 & 1 & 2 & 1 & 1 & VR17 LN7 LN58 MR45 R3D4 \\
3372 & 0.88 & 1 & 2 & 1 & 1 & VR19 LN34 LN58 MR45 R3D6 \\
1263 & 0.88 & 1 & 1 & 2 & 1 & VR4 LN58 MR46 MR47 R3D4 \\
2979 & 0.88 & 1 & 1 & 2 & 1 & VR17 LN58 MR46 MR47 R3D4 \\
962 & 0.88 & 1 & 2 & 1 & 1 & VR4 LN7 LN58 MR46 R3D4 \\
2162 & 0.88 & 1 & 2 & 1 & 1 & VR16 LN34 LN58 MR45 R3D6 \\
2803 & 0.88 & 1 & 2 & 1 & 1 & VR17 LN33 LN58 MR47 R3D4 \\
\color{green} 797 & \color{green}0.88 &\color{green}2&\color{green} 1 &\color{green}1& \color{green}1 & \color{green}VR4 VR19 LN58 MR46 R3D4 \\
1193 & 0.88 & 1 & 1 & 2 & 1 & VR4 LN34 MR45 MR47 R3D6 \\
929 & 0.88 & 1 & 2 & 1 & 1 & VR4 LN7 LN34 MR45 R3D6 \\
2798 & 0.88 & 1 & 2 & 1 & 1 & VR17 LN33 LN58 MR46 R3D4 \\
\hline
\end{tabular}
\end{table*}
\normalsize
\lipsum[1-2]
\onecolumn
\begin{footnotesize}
\resetLTcolor
\begin{longtable}{ @{\zz\extracolsep{\fill}} |l | r | r | r | r | r| p{2.5cm}|}
\hline
\multicolumn{1}{@{\fullwidthcolor{yellow}\extracolsep{\fill}} |l |}
{} & Crit. cor & Verbal & alpha- & Matrix & Dice & Items \\
\multicolumn{1}{@{\fullwidthcolor{yellow}\extracolsep{\fill}} |l |}{Combination}
& {} & {reasoning} & {numeric} & {reasoning} & {rotation} & {} \endhead
\hline
1088 & 0.89 & 1 & 2 & 1 & 1 & VR4 LN33 LN58 MR47 R3D6 \\
1087 & 0.89 & 1 & 2 & 1 & 1 & VR4 LN33 LN58 MR47 R3D4 \\
1172 & 0.88 & 1 & 2 & 1 & 1 & VR4 LN34 LN58 MR47 R3D6 \\
2876 & 0.88 & 1 & 2 & 1 & 1 & VR17 LN34 LN58 MR45 R3D4 \\
1161 & 0.88 & 1 & 2 & 1 & 1 & VR4 LN34 LN58 MR45 R3D6 \\
2918 & 0.88 & 1 & 1 & 1 & 2 & VR17 LN34 MR45 R3D4 R3D6 \\
968 & 0.88 & 1 & 2 & 1 & 1 & VR4 LN7 LN58 MR47 R3D6 \\
1171 & 0.88 & 1 & 2 & 1 & 1 & VR4 LN34 LN58 MR47 R3D4 \\
2877 & 0.88 & 1 & 2 & 1 & 1 & VR17 LN34 LN58 MR45 R3D6 \\
2882 & 0.88 & 1 & 2 & 1 & 1 & VR17 LN34 LN58 MR46 R3D4 \\
1166 & 0.88 & 1 & 2 & 1 & 1 & VR4 LN34 LN58 MR46 R3D4 \\
2678 & 0.88 & 1 & 2 & 1 & 1 & VR17 LN7 LN58 MR46 R3D4 \\
1202 & 0.88 & 1 & 1 & 1 & 2 & VR4 LN34 MR45 R3D4 R3D6 \\
2875 & 0.88 & 1 & 2 & 1 & 1 & VR17 LN34 LN58 MR45 R3D3 \\
1160 & 0.88 & 1 & 2 & 1 & 1 & VR4 LN34 LN58 MR45 R3D4 \\
967 & 0.88 & 1 & 2 & 1 & 1 & VR4 LN7 LN58 MR47 R3D4 \\
1082 & 0.88 & 1 & 2 & 1 & 1 & VR4 LN33 LN58 MR46 R3D4 \\
1227 & 0.88 & 1 & 1 & 1 & 2 & VR4 LN34 MR47 R3D4 R3D6 \\
2677 & 0.88 & 1 & 2 & 1 & 1 & VR17 LN7 LN58 MR46 R3D3 \\
2672 & 0.88 & 1 & 2 & 1 & 1 & VR17 LN7 LN58 MR45 R3D4 \\
3372 & 0.88 & 1 & 2 & 1 & 1 & VR19 LN34 LN58 MR45 R3D6 \\
1263 & 0.88 & 1 & 1 & 2 & 1 & VR4 LN58 MR46 MR47 R3D4 \\
2979 & 0.88 & 1 & 1 & 2 & 1 & VR17 LN58 MR46 MR47 R3D4 \\
962 & 0.88 & 1 & 2 & 1 & 1 & VR4 LN7 LN58 MR46 R3D4 \\
2162 & 0.88 & 1 & 2 & 1 & 1 & VR16 LN34 LN58 MR45 R3D6 \\
2803 & 0.88 & 1 & 2 & 1 & 1 & VR17 LN33 LN58 MR47 R3D4 \\
\color{green} 797 & \color{green}0.88 &\color{green}2&\color{green} 1 &\color{green}1& \color{green}1 & \color{green}VR4 VR19 LN58 MR46 R3D4 \\
1193 & 0.88 & 1 & 1 & 2 & 1 & VR4 LN34 MR45 MR47 R3D6 \\
929 & 0.88 & 1 & 2 & 1 & 1 & VR4 LN7 LN34 MR45 R3D6 \\
2798 & 0.88 & 1 & 2 & 1 & 1 & VR17 LN33 LN58 MR46 R3D4 \\
\hline
\caption{This is some text in the caption.}
\label{tab:table3}
\end{longtable}
\end{footnotesize}
\twocolumn
\lipsum[1-2]
\end{document}
What I get closest with is the solutions from
here and here. The text is in two columns, but it works fine to make the table fit the whole page. I have to make the fontsize footnotesize, to make it fit the page.
Four big problems:
1 - Caption should be on top.
2 - The text in the rows is too close to the row above it. Maybe make sure there is at least 0.5mm above and below the text in each row.
3 - Be able to span this across two pages, for when I add more rows.
4 - Make the longtable continue from the normal text, instead of jumping to a new page.
With the first link I can make this: (for some reason the green row is not aligned)
\begin{table*}[ht!]
\centering\footnotesize
\caption{This is some text in the caption.}
\rowcolors{1}{}{lightgray}
\begin{tabular}{c p{1.5cm} p{1.5cm} p{1.5cm} p{1.5cm} p{1.5cm} p{2.5cm}}
\hline
Combination & Crit. \mbox{correlation} & Verbal \mbox{reasoning} & alpha-numeric & Matrix \mbox{reasoning} & Dice \mbox{rotation} & Items \\
\hline
1088 & 0.89 & 1 & 2 & 1 & 1 & VR4 LN33 LN58 MR47 R3D6 \\
1087 & 0.89 & 1 & 2 & 1 & 1 & VR4 LN33 LN58 MR47 R3D4 \\
1172 & 0.88 & 1 & 2 & 1 & 1 & VR4 LN34 LN58 MR47 R3D6 \\
2876 & 0.88 & 1 & 2 & 1 & 1 & VR17 LN34 LN58 MR45 R3D4 \\
1161 & 0.88 & 1 & 2 & 1 & 1 & VR4 LN34 LN58 MR45 R3D6 \\
2918 & 0.88 & 1 & 1 & 1 & 2 & VR17 LN34 MR45 R3D4 R3D6 \\
968 & 0.88 & 1 & 2 & 1 & 1 & VR4 LN7 LN58 MR47 R3D6 \\
1171 & 0.88 & 1 & 2 & 1 & 1 & VR4 LN34 LN58 MR47 R3D4 \\
2877 & 0.88 & 1 & 2 & 1 & 1 & VR17 LN34 LN58 MR45 R3D6 \\
2882 & 0.88 & 1 & 2 & 1 & 1 & VR17 LN34 LN58 MR46 R3D4 \\
1166 & 0.88 & 1 & 2 & 1 & 1 & VR4 LN34 LN58 MR46 R3D4 \\
2678 & 0.88 & 1 & 2 & 1 & 1 & VR17 LN7 LN58 MR46 R3D4 \\
1202 & 0.88 & 1 & 1 & 1 & 2 & VR4 LN34 MR45 R3D4 R3D6 \\
2875 & 0.88 & 1 & 2 & 1 & 1 & VR17 LN34 LN58 MR45 R3D3 \\
1160 & 0.88 & 1 & 2 & 1 & 1 & VR4 LN34 LN58 MR45 R3D4 \\
967 & 0.88 & 1 & 2 & 1 & 1 & VR4 LN7 LN58 MR47 R3D4 \\
1082 & 0.88 & 1 & 2 & 1 & 1 & VR4 LN33 LN58 MR46 R3D4 \\
1227 & 0.88 & 1 & 1 & 1 & 2 & VR4 LN34 MR47 R3D4 R3D6 \\
2677 & 0.88 & 1 & 2 & 1 & 1 & VR17 LN7 LN58 MR46 R3D3 \\
2672 & 0.88 & 1 & 2 & 1 & 1 & VR17 LN7 LN58 MR45 R3D4 \\
3372 & 0.88 & 1 & 2 & 1 & 1 & VR19 LN34 LN58 MR45 R3D6 \\
1263 & 0.88 & 1 & 1 & 2 & 1 & VR4 LN58 MR46 MR47 R3D4 \\
2979 & 0.88 & 1 & 1 & 2 & 1 & VR17 LN58 MR46 MR47 R3D4 \\
962 & 0.88 & 1 & 2 & 1 & 1 & VR4 LN7 LN58 MR46 R3D4 \\
2162 & 0.88 & 1 & 2 & 1 & 1 & VR16 LN34 LN58 MR45 R3D6 \\
2803 & 0.88 & 1 & 2 & 1 & 1 & VR17 LN33 LN58 MR47 R3D4 \\
\color{green} 797 & \color{green}0.88 &\color{green}2&\color{green} 1 &\color{green}1& \color{green}1 & \color{green}VR4 VR19 LN58 MR46 R3D4 \\
1193 & 0.88 & 1 & 1 & 2 & 1 & VR4 LN34 MR45 MR47 R3D6 \\
929 & 0.88 & 1 & 2 & 1 & 1 & VR4 LN7 LN34 MR45 R3D6 \\
2798 & 0.88 & 1 & 2 & 1 & 1 & VR17 LN33 LN58 MR46 R3D4 \\
\hline
\end{tabular}
\end{table*}
\normalsize
With the second link I can make this: (I can't figure out how to get the caption on top. Have tried different positions, but then it won't compile)
\onecolumn
\begin{footnotesize}
\resetLTcolor
\begin{longtable}{ @{\zz\extracolsep{\fill}} |l | r | r | r | r | r| p{2.5cm}|}
\hline
\multicolumn{1}{@{\fullwidthcolor{yellow}\extracolsep{\fill}} |l |}
{} & Crit. cor & Verbal & alpha- & Matrix & Dice & Items \\
\multicolumn{1}{@{\fullwidthcolor{yellow}\extracolsep{\fill}} |l |}{Combination}
& {} & {reasoning} & {numeric} & {reasoning} & {rotation} & {} \endhead
\hline
1088 & 0.89 & 1 & 2 & 1 & 1 & VR4 LN33 LN58 MR47 R3D6 \\
1087 & 0.89 & 1 & 2 & 1 & 1 & VR4 LN33 LN58 MR47 R3D4 \\
1172 & 0.88 & 1 & 2 & 1 & 1 & VR4 LN34 LN58 MR47 R3D6 \\
2876 & 0.88 & 1 & 2 & 1 & 1 & VR17 LN34 LN58 MR45 R3D4 \\
1161 & 0.88 & 1 & 2 & 1 & 1 & VR4 LN34 LN58 MR45 R3D6 \\
2918 & 0.88 & 1 & 1 & 1 & 2 & VR17 LN34 MR45 R3D4 R3D6 \\
968 & 0.88 & 1 & 2 & 1 & 1 & VR4 LN7 LN58 MR47 R3D6 \\
1171 & 0.88 & 1 & 2 & 1 & 1 & VR4 LN34 LN58 MR47 R3D4 \\
2877 & 0.88 & 1 & 2 & 1 & 1 & VR17 LN34 LN58 MR45 R3D6 \\
2882 & 0.88 & 1 & 2 & 1 & 1 & VR17 LN34 LN58 MR46 R3D4 \\
1166 & 0.88 & 1 & 2 & 1 & 1 & VR4 LN34 LN58 MR46 R3D4 \\
2678 & 0.88 & 1 & 2 & 1 & 1 & VR17 LN7 LN58 MR46 R3D4 \\
1202 & 0.88 & 1 & 1 & 1 & 2 & VR4 LN34 MR45 R3D4 R3D6 \\
2875 & 0.88 & 1 & 2 & 1 & 1 & VR17 LN34 LN58 MR45 R3D3 \\
1160 & 0.88 & 1 & 2 & 1 & 1 & VR4 LN34 LN58 MR45 R3D4 \\
967 & 0.88 & 1 & 2 & 1 & 1 & VR4 LN7 LN58 MR47 R3D4 \\
1082 & 0.88 & 1 & 2 & 1 & 1 & VR4 LN33 LN58 MR46 R3D4 \\
1227 & 0.88 & 1 & 1 & 1 & 2 & VR4 LN34 MR47 R3D4 R3D6 \\
2677 & 0.88 & 1 & 2 & 1 & 1 & VR17 LN7 LN58 MR46 R3D3 \\
2672 & 0.88 & 1 & 2 & 1 & 1 & VR17 LN7 LN58 MR45 R3D4 \\
3372 & 0.88 & 1 & 2 & 1 & 1 & VR19 LN34 LN58 MR45 R3D6 \\
1263 & 0.88 & 1 & 1 & 2 & 1 & VR4 LN58 MR46 MR47 R3D4 \\
2979 & 0.88 & 1 & 1 & 2 & 1 & VR17 LN58 MR46 MR47 R3D4 \\
962 & 0.88 & 1 & 2 & 1 & 1 & VR4 LN7 LN58 MR46 R3D4 \\
2162 & 0.88 & 1 & 2 & 1 & 1 & VR16 LN34 LN58 MR45 R3D6 \\
2803 & 0.88 & 1 & 2 & 1 & 1 & VR17 LN33 LN58 MR47 R3D4 \\
\color{green} 797 & \color{green}0.88 &\color{green}2&\color{green} 1 &\color{green}1& \color{green}1 & \color{green}VR4 VR19 LN58 MR46 R3D4 \\
1193 & 0.88 & 1 & 1 & 2 & 1 & VR4 LN34 MR45 MR47 R3D6 \\
929 & 0.88 & 1 & 2 & 1 & 1 & VR4 LN7 LN34 MR45 R3D6 \\
2798 & 0.88 & 1 & 2 & 1 & 1 & VR17 LN33 LN58 MR46 R3D4 \\
\hline
\caption{This is some text in the caption.}
\label{tab:table3}
\end{longtable}
\end{footnotesize}
\twocolumn




tikzto demonstrate the problem for example ?) but you have not posted any code that anyone can run to see the problem. Please fix the examples not to load unneeded packages and to be a complete single document that does not work as you expect. If you want the caption at the top why did you enter it at the bottom? Also it is not clear what your longtableexample is showing, it can not be related to your multi-page table question? – David Carlisle Mar 03 '16 at 14:30tikz, but I don't know if there should be some weird interaction with another package (which is why I wrote it down). I'll update with a MWE. Also, the reason why I didn't put the caption at the top, as I wrote it wouldn't compile, no matter the position I tried (maybe you could help me out instead?). – user38934 Mar 03 '16 at 14:54\onecolumninvolves a\clearpageso I quess you are out of luck. Perhaps you should use normal one column mode and then use themulticolpackage to add two columns when you need them, then it can finish a page earlier (and adjusted) and then start the long tables. – daleif Mar 03 '16 at 15:17\onecolumninvolves a\clearpage. I have tried to use\begin{table*}and\end{table*}, which should work fine for having a table (or figure) to use the width of both columns, and resume the text afterwards, but for some reason doesn't work in this example. – user38934 Mar 03 '16 at 18:16table*is a box so can not be broken over a page so can't work withlongtable. I don't think this is answerable as it stands, voting to close as unclear, if you still need help feel free to edit to make a smaller, but complete, example that does not work as you expect, but that people can test. – David Carlisle May 11 '16 at 20:15