0

I have a long table in latex. I used the commands:

\begin{table}[ht]
\begin{center}
\begin{tabular}{cccccccc}

(..the table..)


\end{tabular}
\end{center}
\end{table}

However the table length exceeds the page margins and the boundaries and it cuts it off... I would like to continue it on the next page. I have tried the longtable package , the \pagebreak and \newpage but nothing works.

I would appreciate any help!!

ekyr
  • 45
  • Related: http://tex.stackexchange.com/questions/26462/make-a-table-span-multiple-pages?rq=1 –  Aug 01 '14 at 11:20
  • A minimal working example would help to help. – Bernard Aug 01 '14 at 11:22
  • 'longtable' will work if you do it right. Remember not to put the longtable inside a 'table'-environment. 'longtable' has its own caption-command. – Sveinung Aug 01 '14 at 11:36
  • @Sveinung : Yes, I have put the longtable inside the table environment. The outcome is the same as before.. A long table on a single page which exceeds the page boundaries.

    \begin{table}[ht] \begin{center} \begin{longtable}[c]{lclccccc}

    ....

    \end{longtable} \end{center} \end{table}

    There are no errors it just doesn't work.

    – ekyr Aug 01 '14 at 11:48
  • @ekyr you mis-read the comment (and the longtable documentation) do not use a table environment with longtable. – David Carlisle Aug 01 '14 at 11:54
  • @DavidCarlisle @Sveinung Yes you are right. My apologies, I did misread the comment. However now I am getting this error: ! Misplaced \noalign. \hline ->\noalign {\ifnum 0=`}\fi \penalty @M \futurelet @let@token \LT@@h... l.607 \hline

    ?

    the same happens when I use \hline instead. Do you know why this is?

    – ekyr Aug 01 '14 at 12:07
  • @ekyr that is not a complete error message (and the comment formatting makes it hard to see) presumably you used toprule in the wrong place. This is why all questions should have a complete document that reproduces the problem and in the case of errors the question should have the full error text from ! to ? in a code block so we can see it. – David Carlisle Aug 01 '14 at 12:09
  • I had edited my comment above. The commands of hline and toprule work fine when I use \begin{tabular}. I did not get this error before.

    In my table I also use midrule and cmidrule

    – ekyr Aug 01 '14 at 12:12
  • Nevermind, I was able to get it to work. Thank you for all your help @DavidCarlisle. I appreciate it! :) – ekyr Aug 01 '14 at 12:14

0 Answers0