Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

The first row in my longtable-environment should be left-aligned and only have a specific width. The other rows should be right-aligned. I get the error Extra alignment tab has been changed to \cr 1 & if I use >{\raggedleft}p{1cm} instead of only p{1cm}. What is wrong with my environment?

Is there also a way to align the \cmidrule centered in the middle of the whole table? An extra table in a minipage-environment does not really work (the minipage is then right-aligned).

Nanana  &\multicolumn{1}{p{3cm}}{nononononon nii nuu Ononononono}&\multicolumn{1}{p{3cm}}{nononononon nunu nnu bobobobobob}&nun&\multicolumn{1}{p{3cm}}{nono non nonors nononno nunununun}\\\midrule
\multicolumn{5}{c}{nonono,\qquad nono=0.042\quad nununu=0.011}\\
\multicolumn{5}{c}{npnpnpnpnpnpnnununuu:\qquad 2.35}\\
0   &6907   &6615   &3684   &79 \\
1   &96907  &96615  &93684  &179    \\
share|improve this question
Welcome to TeX.SE! Your write-up, I'm afraid, is a bit confusing. Are you trying the left- or right-align the contents of entire rows (which is what you write) or columns? Please clarify. –  Mico Jun 24 '12 at 18:00
Sorry for the inconvenience. It is a bit difficult for me to explain the problem. The first row (with the words) should be left-aligned. The other rows (with the numbers) should be right-aligned (but the first column should be left-aligned in each case). But additionally, the gap between the numbers should not be so big -- especially for the last column. Due to the width of the last column in the first row (the words...) I get a large gap between e.g. "3684 &79". –  Mia Jun 24 '12 at 19:48

1 Answer 1

The problem is well known and documented in the package array: if you have >{\raggedleft} in the last column either you use \tabularnewline for ending the row or say


It's also wrong to specify p{1cm} in the table preamble, while using p{3cm} in the \multicolumn: use the same dimension in both places.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.