Graphics, Figures & Tablesxtab | Horizontal Lines not complete from second Page on

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Toty
Posts: 10
Joined: Fri Apr 13, 2012 1:40 am

xtab | Horizontal Lines not complete from second Page on

Post by Toty »

Hi,

I'm having a problem with a large table. I need to extend it over several pages and also make it on landscape mode. On the first page the table is usually fine, but starting on the second page, the \hline command generates a line that doesn't cover all columns.

Also, if you have some hints on how to make these tables look nicer I'd appreciate! See the code below for details.

Code: Select all

\documentclass[a4paper]{article} 
\usepackage{amsmath} 
\usepackage{xtab} 
\usepackage{lscape} 
\begin{document}

\renewcommand\tabcolsep{2pt}
\begin{landscape}
\tablecaption{xxxxxxxxxxxxxx}
\label{tab:Program}

\tablefirsthead{\hline
xxx. &xxx&xxx &xxxx.&xxxxx.&xxxxx xxxx&xxxx&xxxxx&xxxxxx&\multicolumn{10}{l}{xxxxx xxxxxxxx xx xxxxxxx xxxx [xxxxx]}\\
xxxx&xxxxx&xxx&xx&xxxx&[xxx/&[xxxx/&[-]&[-]&xx&xx&xxx&xxx&xxx&xx&xxxx&xxx&xxx&xxxxx\\
&[x]&[x]&&&xxx]&xxx$\cdot$x]&&&&&&&&&&[$\cdot$xx$^{xx}$]&[$\cdot$xx$^{xx}$]&[$\cdot$xx$^{xx}$]\\
\hline}

\tablehead{\multicolumn{21}{l}{(Table1 continued)}\\
\hline
xxx. &xxx&xxx &xxxx.&xxxxx.&xxxxx xxxx&xxxx&xxxxx&xxxxxx&\multicolumn{10}{l}{xxxxx xxxxxxxx xx xxxxxxx xxxx [xxxxx]}\\
xxxx&xxxxx&xxx&xx&xxxx&[xxx/&[xxxx/&[-]&[-]&xx&xx&xxx&xxx&xxx&xx&xxxx&xxx&xxx&xxxxx\\
&[x]&[x]&&&xxx]&xxx$\cdot$x]&&&&&&&&&&[$\cdot$xx$^{xx}$]&[$\cdot$xx$^{xx}$]&[$\cdot$xx$^{xx}$]\\
\hline}

\tablelasthead{\multicolumn{21}{l}{(Table2 conclu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xx&xxxx&xxx&xxxx&\\
xxxx-x&x&x&xxx&xxx&xxxx&xxxx&xxx&xxxx&xxxx&xxx&xxx&xxx&xxxx&xxxx&xxx&xxxx&xxx&xxxx&\\
xxxx-x&x&x&xxx&xxx&xxxx&xxxx&xxx&xxxx&xxxx&xxx&xxx&xxx&xxxx&xxxx&xxx&xxxx&xxx&xxxx&\\
xxxx-x&x&x&xxx&xxx&xxxx&xxxx&xxx&xxxx&xxxx&xxx&xxx&xxx&xxxx&xxxx&xxx&xxxx&xxx&xxxx&\\
xxxx-x&x&x&xxx&xxx&xxxx&xxxx&xxx&xxxx&xxxx&xxx&xxx&xxx&xxxx&xxxx&xxx&xxxx&xxx&xxxx&\\
xxxx-x&x&x&xxx&xxx&xxxx&xxxx&xxx&xxxx&xxxx&xxx&xxx&xxx&xxxx&xxxx&xxx&xxxx&xxx&xxxx&\\
\end{xtabular}
\end{landscape}
\end{document}
Does anyone has a fix for it?
Thanks a lot!

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Toty
Posts: 10
Joined: Fri Apr 13, 2012 1:40 am

Re: xtab | Horizontal Lines not complete from second Page on

Post by Toty »

Although no one could help me on that, I found the solution to the problem: the number of columns defined in the headeres was not correct.

thanks for trying anyways
Post Reply