Graphics, Figures & Tables ⇒ Mispaced \noalign in longtable
Mispaced \noalign in longtable
Hello everybody,
I have a longtable with \centering in a latex document and it appears always the same error:
! Misplaced \noalign.
\hline ->\noalign
{\ifnum 0=`}\fi \penalty \@M \futurelet \@let@token \LT@@h
l.680 \hline
Well, I already done some research and I know that this error is common in longtables.
Thus, I already substituted all the \\ in the longtable for \tabularnewline.
And the error remains. I don't know what else to do. Can somebody please give me some suggestions?
Thank you. Best regards
I have a longtable with \centering in a latex document and it appears always the same error:
! Misplaced \noalign.
\hline ->\noalign
{\ifnum 0=`}\fi \penalty \@M \futurelet \@let@token \LT@@h
l.680 \hline
Well, I already done some research and I know that this error is common in longtables.
Thus, I already substituted all the \\ in the longtable for \tabularnewline.
And the error remains. I don't know what else to do. Can somebody please give me some suggestions?
Thank you. Best regards
NEW: TikZ book now 40% off at Amazon.com for a short time.

Mispaced \noalign in longtable
Hi,
please post a reduced, minimal version of your code (in the sense of a minimal working example) allowing us to reproduce the error.
please post a reduced, minimal version of your code (in the sense of a minimal working example) allowing us to reproduce the error.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Mispaced \noalign in longtable
Hi. This is an example of the code of my longtable:
Instead of \tabularnewline I had first \\, but with both the same error appears:
! Misplaced \noalign.
\hline ->\noalign
{\ifnum 0=`}\fi \penalty \@M \futurelet \@let@token \LT@@h
l.680 \hline
And suggestions are welcome.
Best regards.
Code: Select all
\begin{center}
\footnotesize
\setlongtables
\renewcommand{\arraystretch}{1.5}
\renewcommand{\multirowsetup}{\centering}
\centering
\setlength{\tabcolsep}{2mm}
\begin{longtable}{|>{\centering}m{2.6cm}|>{\centering}m{2.5cm}|>{\centering}m{2.1cm}|>{\centering}m{3cm}|>{\centering}m{3cm}|}
\caption{Example LongTable}
\hline
\textbf{title 1} & \textbf{title 2} & \textbf{title 3} & \textbf{title 4} & \textbf{title 5} \tabularnewline
\hline
Data 1 & Data 2 & Data 3 & Data 4 & Data 5 \tabularnewline\hline
Data 1 & Data 2 & Data 3 & Data 4 & Data 5 \tabularnewline\hline
Data 1 & Data 2 & Data 3 & Data 4 & Data 5 \tabularnewline\hline
\end{longtable}
\label{tab:TabResumo}
\end{center}
! Misplaced \noalign.
\hline ->\noalign
{\ifnum 0=`}\fi \penalty \@M \futurelet \@let@token \LT@@h
l.680 \hline
And suggestions are welcome.
Best regards.
Mispaced \noalign in longtable
Please, next time post complete, minimal and compilable code and not just snippets. In a longtable environment You must place a line change command \\ (or \tabularnewline) after the \caption command:
Code: Select all
...
\caption{Example LongTable} \tabularnewline
...
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Mispaced \noalign in longtable
Ok. Thanks, that resolved this error.
But now I'm having another error. Hope this time that I posted the code right.
I'm having the error:
Missing { inserted
realted to the first row of the longtable with a raisebox.
I need the raisebox to align the text with the rest of the text from the same row.
Hope someone understand my doubt and can help me.
Best regards
But now I'm having another error. Hope this time that I posted the code right.
I'm having the error:
Missing { inserted
realted to the first row of the longtable with a raisebox.
Code: Select all
\begin{document}
\begin{center}
\footnotesize
\setlongtables
\renewcommand{\arraystretch}{1.5}
\renewcommand{\multirowsetup}{\centering}
\centering
\setlength{\tabcolsep}{2mm}
\begin{longtable}{|>{\centering}m{2.6cm}|>{\centering}m{2cm}|>{\centering}m{2.6cm}|>{\centering}m{2.2cm}|>{\centering}m{1.6cm}|>{\centering}m{1.8cm}|}
\caption{Example LongTable}
\tabularnewline\hline
\textbf{title 1} & \textbf{title 2} & \textbf{title 3} & \textbf{title 4} & \textbf{title 5} & \textbf{title 6}
\endfirsthead
\multicolumn{6}{c}%
{{\bfseries \tablename\ \thetable{} -- Continuation from previous page}} \tabularnewline\hline
\textbf{title 1} & \textbf{title 2} & \textbf{title 3} & \textbf{title 4} & \textbf{title 5} & \textbf{title 6}
\tabularnewline
\endhead
\hline
\multicolumn{6}{|r|}{{Continue in next page}} \tabularnewline\hline
\endfoot
\endlastfoot
\multirow{3}{2.6cm}{Data 1} & \multirow{3}{2cm}{Data 2} & Data 3 & Data 4 & Data 5 & \raisebox{-1.6ex}{D}\tabularnewline\cline{4-7}
&& Data 3 & Data 4 & Data 5 & \raisebox{-1.6ex}{D}\tabularnewline\cline{4-7}
&& Data 3 & Data 4 & Data 5 & D \tabularnewline\hline
\end{longtable}
\label{tab:TabResumo}
\end{center}
\end{document}
Hope someone understand my doubt and can help me.
Best regards
Re: Mispaced \noalign in longtable
Ok. I already discovered my error. I had a extra } in the line.
Sorry that I bothered you with this subject.
But now in the same line that I told you before, I have this error:
! Extra alignment tab has been changed to \cr.
<template> \endtemplate
Can somebody help me solve this problem. Thanks a lot all the help.
Best regards
Sorry that I bothered you with this subject.
But now in the same line that I told you before, I have this error:
! Extra alignment tab has been changed to \cr.
<template> \endtemplate
Can somebody help me solve this problem. Thanks a lot all the help.
Best regards
Mispaced \noalign in longtable
You declared six columns for your table so you cannot use
use
instead.
Code: Select all
\cline{4-7}
Code: Select all
\cline{4-6}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Re: Mispaced \noalign in longtable
Hi. Thank you so much. That resolved my problem.
In the image I attached, you can see part of the longtable I have.
My problem is that in the last column the title and some letters appeared higher or lower than the rest of the text from the longtable.
I know that if I have only one letter I can use \raisebox to align the text, but what should I use in a whole word to achieve the alignment?
Best regards

In the image I attached, you can see part of the longtable I have.
My problem is that in the last column the title and some letters appeared higher or lower than the rest of the text from the longtable.
I know that if I have only one letter I can use \raisebox to align the text, but what should I use in a whole word to achieve the alignment?
Best regards
- Attachments
-
- Untitled.png (42.35 KiB) Viewed 24629 times
Mispaced \noalign in longtable
I am getting tired of asking you to accompany your questions with minimal, compilable code, in other words, with a minimal working example.
1,1,2,3,5,8,13,21,34,55,89,144,233,...