Graphics, Figures & Tables ⇒ Table problem
Table problem
I an very new to Latex documentation
The table I am making is overriding the page dimension and whole table is on the one page and not shifting the table to other page when the page dimensions gets over.
Even the table is not a floating table but table starts from the new page.
\begin{table}[!ht]
\centering
\begin{tabular}{|p{0.8cm}|p{1.8cm}|p{1.5cm}|p{1.5cm}|p{2.8cm}|p{4cm}|}
.....
.....
.....
\hline
\end{tabular}
\end{table}
\clearpage
Kindly help in making the table.
I sahll be very thankful for your kind help
Wishes
Hemant
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Table problem
When you say that your table is "overriding" the page dimensions, do you mean in lenght or in width???
If your table is wider than your page, you should ajust the width of each column. To avoid having to always calculate to match the page width, why don't you use p{0.25\textwidth}.
If your table is longer than one page, then you need to use the longtable environment instead of table:
Code: Select all
\usepackage{longtable}
\begin{longtable}
and the rest the same.
\end{longtable}
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Table problem
There are several possible solution to this issue.
- Adapt the page dimensions by using geometry.
Code: Select all
\usepackage{includeheadfoot,margin=2cm]{geometry}
- Decrease the font size of the table.
Code: Select all
\begin{table}[!ht] \centering\small \begin{tabular}{|p{0.8cm}|p{1.8cm}|p{1.5cm}|p{1.5cm}|p{2.8cm}|p{4cm}|} % table contents \end{tabular} \end{table}
- Rotate the table by using the sidewaystable environment from rotating.
Note that this environment opens a new page with the table occupying it completely.
Code: Select all
\begin{sidewaystable} \centering \begin{tabular}{|p{0.8cm}|p{1.8cm}|p{1.5cm}|p{1.5cm}|p{2.8cm}|p{4cm}|} % table contents \end{tabular} \end{sidewaystable}
Best regards and welcome to the board
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10