TransWikia.com

How to adjust longtable horizontal padding for first and last columns only

TeX - LaTeX Asked by mk1138 on November 5, 2020

I’m reading longtable documentation trying to find a way to change the horizontal padding / column spacing for only the first and last columns.

As shown in the image (red line), default spacing is creating a “gap” that’s quite prominent when using the horizontal line separators (I’m using booktabs package for separators):

enter image description here

I’d like to pull this left to the beginning where the blue line is, and push the last text column all the way to the right. But at the same time keep what’s in the middle with some breathing space.

So far I tried adjusting tabcolsep:

setlengthtabcolsep{2.5pt}

But as expected, as I approach the left margin, the spacing between the remaining columns disappears as well, making the text illegible.

Is it possible to control this padding on per column basis?

And please don’t hold it against me that I’m not submitting the full source code. It’s more of a general question.

One Answer

You can pull longtable to the left as defined in the book with the help of [l] in the horizontal definitionHPos of the table

begin{longtable} [HPos] {column definition }
. . . & . . . & . . . 
end{longtable}

See the example number 3 in the image below

enter image description here

Answered by js bibra on November 5, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP