Karsten Wutzke
2006-07-21 16:04:49 UTC
Hello all!
This error makes me mad.
I have a simple document with just one longtable:
-------------------------------------------------
\documentclass[a4paper, 11pt, oneside]{article}
\usepackage[ngerman]{babel}
\usepackage[ansinew]{inputenc}
\usepackage{array}
\usepackage{longtable}
\pagestyle{empty}
\begin{document}
\textbf{I N V O I C E}
%\begin{longtable}{||>{\raggedleft}p{20mm}
% |>{\raggedright}p{50mm}
% |>{\raggedleft}p{20mm}
% |>{\raggedleft}p{20mm}||}
\begin{longtable}{||r|l|r|r||}
foo1 & bar1 & car1 & cdr1 \\
foo2 & bar2 & car2 & cdr2 \\
foo3 & bar3 lohl kj lk jh lkjhdghj h lkj hlkj hlkjk lkj. & car3 & cdr3
\\
foo4 & bar4 & car4 & cdr4 \\
foo5 & bar5 & car5 & cdr5
\end{longtable}
\end{document}
-------------------------------------------------
This code works fine, but I want to specify the column width AND its
alignment. For this purpose, I (try to) use the \begin{longtable}...
outcommented above.
I'm not sure, but the array syntax seems allright to me...
The lower \begin works as desired, but the one above gives errors and
produces unwanted results. This probably has to do with wrong longtable
use. I've tried all day and I have no more ideas.
Latex gives me 3 errors on compilation with the upper \begin (all the
MIDDLE lines! foo2, foo3, and foo4):
.
.
.
! Extra alignment tab has been changed to \cr.
<recently read> \endtemplate
l.22 foo2 &
bar2 & car2 & cdr2 \\
? r ****** <---- I entered r always to see the crappy result******
OK, entering \nonstopmode...
! Extra alignment tab has been changed to \cr.
<recently read> \endtemplate
l.23 ... kj lk jh lkjhdghj h lkj hlkj hlkjk lkj. &
car3 & cdr3 \\
You have given more \span or & marks than there were
in the preamble to the \halign or \valign now in progress.
So I'll assume that you meant to type \cr instead.
! Extra alignment tab has been changed to \cr.
<recently read> \endtemplate
l.24 foo4 & bar4 & car4 &
cdr4 \\
You have given more \span or & marks than there were
in the preamble to the \halign or \valign now in progress.
So I'll assume that you meant to type \cr instead.
Can anyone help me correct it with longtable to have fixed width
columns AND alignment per column set? How to achieve this (-> code)?
TIA
Karsten
PS: I'm quite new to Latex...
This error makes me mad.
I have a simple document with just one longtable:
-------------------------------------------------
\documentclass[a4paper, 11pt, oneside]{article}
\usepackage[ngerman]{babel}
\usepackage[ansinew]{inputenc}
\usepackage{array}
\usepackage{longtable}
\pagestyle{empty}
\begin{document}
\textbf{I N V O I C E}
%\begin{longtable}{||>{\raggedleft}p{20mm}
% |>{\raggedright}p{50mm}
% |>{\raggedleft}p{20mm}
% |>{\raggedleft}p{20mm}||}
\begin{longtable}{||r|l|r|r||}
foo1 & bar1 & car1 & cdr1 \\
foo2 & bar2 & car2 & cdr2 \\
foo3 & bar3 lohl kj lk jh lkjhdghj h lkj hlkj hlkjk lkj. & car3 & cdr3
\\
foo4 & bar4 & car4 & cdr4 \\
foo5 & bar5 & car5 & cdr5
\end{longtable}
\end{document}
-------------------------------------------------
This code works fine, but I want to specify the column width AND its
alignment. For this purpose, I (try to) use the \begin{longtable}...
outcommented above.
I'm not sure, but the array syntax seems allright to me...
The lower \begin works as desired, but the one above gives errors and
produces unwanted results. This probably has to do with wrong longtable
use. I've tried all day and I have no more ideas.
Latex gives me 3 errors on compilation with the upper \begin (all the
MIDDLE lines! foo2, foo3, and foo4):
.
.
.
! Extra alignment tab has been changed to \cr.
<recently read> \endtemplate
l.22 foo2 &
bar2 & car2 & cdr2 \\
? r ****** <---- I entered r always to see the crappy result******
OK, entering \nonstopmode...
! Extra alignment tab has been changed to \cr.
<recently read> \endtemplate
l.23 ... kj lk jh lkjhdghj h lkj hlkj hlkjk lkj. &
car3 & cdr3 \\
You have given more \span or & marks than there were
in the preamble to the \halign or \valign now in progress.
So I'll assume that you meant to type \cr instead.
! Extra alignment tab has been changed to \cr.
<recently read> \endtemplate
l.24 foo4 & bar4 & car4 &
cdr4 \\
You have given more \span or & marks than there were
in the preamble to the \halign or \valign now in progress.
So I'll assume that you meant to type \cr instead.
Can anyone help me correct it with longtable to have fixed width
columns AND alignment per column set? How to achieve this (-> code)?
TIA
Karsten
PS: I'm quite new to Latex...