Graphics, Figures & Tablesunexpected wide column in longtable

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
jibbah
Posts: 3
Joined: Thu Nov 14, 2019 10:00 pm

unexpected wide column in longtable

Post by jibbah »

Hi, I did a long table with 57 columns but I get a formatting I am not quit satisfied with, with the 5th column being much broader than the others, although I set it to the same width as the others. What is happening here?
I appended the example file and the pdf resulting. This example contains only two lines (the table has 83 lines otherwise).
Attachments
TabS6_new.tex
(7.14 KiB) Downloaded 207 times
TabS6_new.pdf
(31.98 KiB) Downloaded 155 times

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

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

unexpected wide column in longtable

Post by Johannes_B »

Welcome to the forum,
i can reproduce your issue, but i currently have no idea why i is happening.

Have you thought about a slightly different table design? I guess the final result will be quite hard to read.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
jibbah
Posts: 3
Joined: Thu Nov 14, 2019 10:00 pm

unexpected wide column in longtable

Post by jibbah »

Hi Johannes_B, I resolved the problem by myself: the multicolumn header and footnote to be displayed on each page after the first one were spread over more columns than I actually have, i.e. I had \multicolumn{59}{r}{\textit{Continued from previous page}} for 57 columns. I is a bit odd though, since commenting out the header and then removing commenting mark will give a different output.
I did not see any alternative design beside the one where 1.000 and 0.000 are replaced by full numbers (file appended here), but the output is a bit odd.
Attachments
TabS6_new-2.pdf
(101.02 KiB) Downloaded 228 times
TabS6_new-2.tex
(112.19 KiB) Downloaded 171 times
rais
Posts: 419
Joined: Sun Nov 16, 2014 8:51 pm

unexpected wide column in longtable

Post by rais »

I'm not sure what you expect, but p{0.02cm} is way too small to hold any text: 0.02 cm = 0.2 mm is less than 8/1000 of an inch (around 0.57 pt).
Which means your text protrudes into the space that's between the columns (\tabcolsep worth on each side of each column).

KR
Rainer
jibbah
Posts: 3
Joined: Thu Nov 14, 2019 10:00 pm

unexpected wide column in longtable

Post by jibbah »

text is displayed vertically in these columns, so it fits. The pdf output looks also nice.
Post Reply