# longtable+ltxtable = ! Extra alignment tab has been changed to \cr

How to fix it?

I lost any & or newline ?

The error:

! Extra alignment tab has been changed to \cr.

l.16            h1 &
h2 & h3 \\


The code:

\documentclass[a4paper,12pt]{article}
\usepackage[]{booktabs}         % to improve tables
\usepackage{tabularx}           % to add width in tables
\usepackage{ltxtable}           % to mixing tabularx + longtable
\usepackage{longtable}          % to permit big tables over pages
\usepackage{multirow}           % to set multirows in tables

\begin{document}
\begin{longtable}{cXX}
\label{tab:qualityCriteria} \\
\caption{Criteria to qualify.} \\
\toprule

h1 & h2 & h3 \\

\midrule

c1 & c2 & c3 \\

c4 & c5 & c6 \\

\bottomrule

\end{longtable}
\end{document}


I couldn't understand what's happening with ltxtable and longtable, but I suggest loading ltablex which seems to have the same functionality (extending the capabilities of longtable to tabularx), and allows your code to work:

\documentclass[a4paper,12pt]{article}
\usepackage{booktabs} % to improve tables
\usepackage{ltablex} % to mixing tabularx + longtable
\usepackage{multirow} % to set multirows in tables

\begin{document}

\begin{table}[!htp]\keepXColumns
\begin{tabularx}{0.5\linewidth}{cXX}
\label{tab:qualityCriteria} \\
\caption{Criteria to qualify.} \\
\toprule
h1 & h2 & h3 \\
\midrule

• Another point that resolve my question was this: the ltxtable package should be used with 2 different texs files where, first is the main, and the second is the table itself. AND the main tex should refers to the table by the command \LTXtable – paulolimac Jun 25 '15 at 0:52