Generallatex not showing table

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
tinez
Posts: 2
Joined: Sun Sep 21, 2008 8:33 pm

latex not showing table

Post by tinez »

Greetings!

I have a problem with making a table. I use the array package in my document. When I define a table like this:

\begin{table}[htb]
\caption{caption}
\label{label}
\centering
\begin{tabular}{|p{2cm}|p{2cm}|}
....

it's not included in .dvi file. It's there only if I make first column l, r or c but the text inside is too long and it needs to be wrapped. Can anyone tell me what am I doing wrong? :(

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

latex not showing table

Post by Stefan Kottwitz »

Hi tinez,

welcome to the board!
There's nothing wrong with this code. If I complete it to make it compilable it's working fine for me:

Code: Select all

\documentclass[a4paper,10pt]{article}
\begin{document}

\begin{table}[htb]
\caption{caption}
\label{label}
\centering
\begin{tabular}{|p{2cm}|p{2cm}|}
x & y \\
1 & 2
\end{tabular}
\end{table}

\end{document}
Perhaps try this too in order to find out if it's working on your side or not. Or post a minimal working example showing the problem.

Stefan
LaTeX.org admin
tinez
Posts: 2
Joined: Sun Sep 21, 2008 8:33 pm

Re: latex not showing table

Post by tinez »

You haven't included array package. Could You try that out?

Ok I tried to make dvi from that example and it did actually work, even with array package included. The original document has 70 pages and it's split into 7 files. Anyone wan't to take a try looking at it? :D
Post Reply