I'm getting an error on latex and don't understand why …
The purpose was to create some tables on latex, but it is getting me some error which i don't really understand …
Any hint for me please ?
Thank you 🙂
error:
! LaTeX Error: Illegal character in array arg.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.5 \begin{tabular}{ | 1 | p{5cm} |}
code:
\documentclass[12pt,a4paper]{article}
\usepackage[portuguese]{babel}
\usepackage[applemac]{inputenc}
\begin{document}
\begin{tabular}{ | 1 | p{5cm} |}
\hline
Nome & Manuel da Silva
\\ \line
Data de nascimento & 1977 \\ \line
Data de falecimento & 2011 \\ \line
\end{tabular}
\begin{tabular}{ | 1 | p{5cm} |}
\hline
Nome & Ana da Silva
\\ \line
Data de nascimento & 2006 \\ \line
\end{tabular}
\begin{tabular}{ | 1 | p{5cm} |}
\hline
Nome & Maria Felisbina
\\ \line
Data de nascimento & 1980 \\ \line
\end{tabular}
\end{document}
Best Answer
The error comes from using
1
(the number one) instead of anl
(the letter l, for left) in the column specification. The valid column specifiers, without loading any packages, arel
(left aligned content),c
(centered content),r
(right aligned content) andp{<width>}
(content set in a\parbox
of width<width>
).You also have to change
\line
to\hline
.