Skip to content

Tabularray tables are not parsed correctly #3831

@jcasale

Description

@jcasale

Environment

  • TeXstudio: 4.8.5alpha1
  • Qt: 6.7.2
  • OS: Windows 11
  • TeX distribution: miktex

Expected behavior

Tabularray tables are parsed correctly without reporting erroneous missing columns, and they can be aligned automatically.

Actual behavior

The following code triggers a missing column inspection on the newline marks and adds an invalid empty column when aligned.

Adding a linebreak after the colspec definition fixes the automatic alignment, but the inspection is not resolved.

\documentclass[letterpaper]{article}

\usepackage[sfdefault]{roboto}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[left=0.5in,right=0.5in,top=0.5in,bottom=0.65in]{geometry}
\usepackage{tabularray}

\begin{document}

\begin{tblr}{colspec = {Q[1,r,m]Q[1,l,m]},width = 0.4\linewidth,column{1} = {font=\bfseries}}
  Row 1 & Value 1 \\
  Row 2 & Value 2 \\
  Row 3 & Value 3 \\
  Row 4 & Value 4 \\
  Row 5 & Value 5 \\
  Row 6 & Value 6
\end{tblr}

\end{document}

How to reproduce

Open the above code in TexStudio:

  1. Notice the invalid columns inspection is triggered
  2. Automatically align it, and notice the extra column added
  3. Undo the above and add a line break after the colspec:
    \begin{tblr}{colspec = {Q[1,r,m]Q[1,l,m]},
        width = 0.4\linewidth,column{1} = {font=\bfseries}}
      Row 1 & Value 1 \\
      Row 2 & Value 2 \\
      Row 3 & Value 3 \\
      Row 4 & Value 4 \\
      Row 5 & Value 5 \\
      Row 6 & Value 6
    \end{tblr}
  4. Automatically align it, and notice no extra column is added
  5. The inspection is still triggered
    Screenshot 2024-10-05 100307

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions