Skip to content

[Bug] \UseTblrLibrary{tikz} and in-cell \color{} do not like each other #672

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 and lualatex (works correctly with Xelatex)
  • Operating system (e.g., Gentoo Linux): Whatever overleaf uses

Please outline the bug as you have found it

This is the weirdest bug I have found so far.

\documentclass{article}
\usepackage{tabularray}
\UseTblrLibrary{tikz}  % required for the bug to happen
\usepackage{xcolor}

\begin{document}
\begin{tblr}{
  colspec={llll},
}
a & b & c & d \\ \hline
1 & {\color{red} 2} & 3 & 4 \\
\end{tblr}

\end{document}

Will create an absurdly long second cell, and with broken alignment.

Image

I get two warnings:

Package varwidth Warning: Failed to reprocess entire contents on input line 13. LaTeX Font Info: External font cmex10' loaded for size (Font) <7> on input line 13. LaTeX Font Info: External font cmex10' loaded for size (Font) <5> on input line 13.

and

Package varwidth Warning: Failed to reprocess entire contents on input line 13.

The bug disappears if we don't use the library tikz.

Obviously, the best way to change text color is with the fg cell command, so this is not a high priority bug.

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