I use the ltxtable package to create long tables with variable width columns. Using this I want to completely remove the space between to table columns by doing this:


\begin{longtabu} to \textwidth{r@{}l}
    %\taburowcolors{white .. gray}
    sth else  & and again \\ \hline
    sth       & blabla \\ 
    else      & stupid\\ 

This works fine until I uncomment the taburowcolors which enforces some space between the columns and thus cuts some of the text.

Is there any way to fix this?

  • You can use \setlength{\tabcolsep}{0pt}. – Salim Bou Feb 12 '16 at 10:03
  • no that doesn't work. It does exactly the same as the @{} and cuts some of the text. Also, you can only set it for all columns in a table which is fine for this minimal example, but not in general. – Jonas Feb 12 '16 at 11:50

I found the solution here colortbl: \rowcolor in tables with \begin{tabular}{@{}ccc@{}}: adding a <{\kern\tabcolsep} before the @{} solves the problem.

Another solution was postet here rowcolors when space is removed with @{}. Adding >{\columncolor{white}[0pt][\tabcolsep]} after the @{} helps as well.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.