Skip to content

Other ways to distribute space for X columns #365

Description

@lvjr

Discussed in #362

Originally posted by note286 February 4, 2023

\documentclass{article}
\usepackage{showframe}
\usepackage{tabularray}
\begin{document}
\begin{table}
\centering
\caption{title}
\begin{tblr}
{
colspec = {*{6}{l}},
% colsep  = 7.5pt,
colsep  = 0pt,
hlines,vlines
}
Lorem     & ipsum      & dolor        & sit     & amet    & consectetur \\
tempor    & incididunt & ut           & labore  & et      & dolore      \\
quis      & nostrud    & exercitation & ullamco & laboris & nisi        \\
consequat & Duis       & aute         & irure   & dolor   & in          \\
cillum    & dolore     & eu           & fugiat  & nulla   & pariatur    \\
proident  & sunt       & in           & culpa   & qui     & officia     \\
\end{tblr}
\end{table}
\end{document}

image

In the table above, we set colsep = 0pt. I hope tblr can automatically complete the setting of colsep so that the table width is the specified width, such as \textwidth.

image

I try to set colsep = 7.5pt to meet the demand in this example. But this is inconvenient and not accurate. Whether there is a method to automatically complete this step. If you can provide an interface, such as width = \textwidth, colsep = autofill, it will be even better.

I know the existence of the X column format, but I don't want this. In many cases, the proportion between columns is not easy to see, so it is not very convenient to use the X column format. All I want is to set colsep automatically.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions