Hi all,
I have a rather strange problem with the tabular env. I am trying to make a table and I need some vertical lines around the table so I m using the | character. for example:
\begin{tabular}{|r|l|}
\hline
7C0 & hexadecimal \\
3700 & octal \\ \cline{2-2}
11111000000 & binary \\
\hline \hline
1984 & decimal \\
\hline
\end{tabular}
When I compile the .tex I receive a message saying
! Use of \@array doesn't match its definition.
\new@ifnextchar ...served@d = #1\def \reserved@a {
#2}\def \reserved@b {#3}\f...
l.92 \begin{tabular}{|r|l|} etc etc
So, I delete the | characters and everything works fine except that I don't have the vertical lines of course. I put them back and again the same problem.
I tried to use different languages in my keyboard but nothing really worked. I tried to copy and paste tables from the net but again the same problem. So, it seems to me that texshop for some strange reason doesn't recognize the |. I am using the TeX distribution and texshop. Everything is up to date. Any ideas why this happens? Do i need to add something in the preamble of the document?
Thanks in advance
Thanos
TeXShop ⇒ Strange problem with tabular enviroment!
- Stefan Kottwitz
- Site Admin
- Posts: 10290
- Joined: Mon Mar 10, 2008 9:44 pm
Strange problem with tabular enviroment!
Hi Thanos,
welcome to the board!
This code raises no error when I test it. Just show a complete minimal example that's producing the compiler error. A complete example looks like
but this one doesn't show the error.
Stefan
welcome to the board!
This code raises no error when I test it. Just show a complete minimal example that's producing the compiler error. A complete example looks like
Code: Select all
\documentclass[a4paper,10pt]{article}
\begin{document}
\begin{tabular}{|r|l|}
\hline
7C0 & hexadecimal \\
3700 & octal \\ \cline{2-2}
11111000000 & binary \\
\hline \hline
1984 & decimal \\
\hline
\end{tabular}
\end{document}
Stefan
LaTeX.org admin
-
- Posts: 1
- Joined: Sat Apr 02, 2011 12:26 am
Re: Strange problem with tabular enviroment!
Hi,
Just in case anyone is still looking for an answer, for me it was a conflict between the ltxdoc document style and the tabular environment. I switched to a4paper and it was fine.
Just in case anyone is still looking for an answer, for me it was a conflict between the ltxdoc document style and the tabular environment. I switched to a4paper and it was fine.