Skip to content

[Bug] Longtblr and preto on multiline cell #671

Description

@mariuslp

Tell us about the system on which the bug was produced

  • Distribution and year (e.g., TeXLive 2025): TexLive2025
  • Engine used (e.g., LuaLaTeX): pdfLatex
  • Operating system (e.g., Gentoo Linux): Whatever Overleaf uses

Please outline the bug as you have found it

In a longtblr, the preto command conflicts with width computation when dealing with a multiline. The issue persists with the dev branch.

\documentclass{article}
\usepackage{tabularray}

\begin{document}
\begin{longtblr}[]{
   cell{arrow} = {preto={\hspace{1em}$\hookrightarrow$ }},
   vlines,
}
    a & b & c \\
    \SetChild{class=arrow}{Text on\\ several lines} &1& 2
\end{longtblr}
\end{document}
Image

We see all the white space here that more or less corresponds to the width of the multiline cell, if it were displayed on one line.

Also, is there a way to add a leftsep, or any kind of margin, to a single cell? Ideally in the MWE above I'd like the newline of text to be aligned with the arrow.

Ensure you have filled out all the necessary details

  • System information
  • Outline of the bug, including MWE for reproduction

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions