Skip to content

Table align columns function adds row #3789

@jcasale

Description

@jcasale

Environment

  • TeXstudio: 4.8.2
  • Qt: 6.7.2
  • OS: Windows 11 23H2
  • TeX distribution: miktex

Expected behavior

Aligning the columns of a table based on the tblr environment should work without adding an extra ampersand (&), resulting in an extra column.

Actual behavior

The table in the repro below results in the following additional ampersand getting added:

before

after

How to reproduce

Select the columns in the table below and choose LaTeX -> Manipulate Table -> Align Columns

\documentclass[letterpaper]{report}

\usepackage[sfdefault]{roboto}
\usepackage[table,dvipsnames,x11names]{xcolor}
\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{table}[H]
  \begin{tblr}{
      colspec = {X[7,r,m]X[1,c,m]X[7,l,m]},
      width = \linewidth,
      row{1} = {c,font=\sffamily\bfseries,bg=azure5,fg=white},
      hlines = {azure5,solid,0.4pt},
      vlines = {azure5,solid,0.4pt},
      vline{2-3} = {1}{white,solid,0.4pt},
      row{even} = {bg=azure9}
    }
    ColA & ColB & ColC \\
    aaaaaaa & bbb & ccc \\
    aaaa & bbbbb & ccccccc \\
    aaaaaaaa & bbbbbbbb & ccccccc \\
    aaaaaa & bbbb & cccccc \\
    aa & bb & ccccc \\
    a & b & cc \\
    aaaaaaa & bbbbbb & cccc \\
    aaaa & bbbbb & c \\
    aaaaaaaaa & bbbbbbb & cccccccc \\
    aa & bbb & ccc
  \end{tblr}
  \caption{My Caption}\label{tab:my-lable}
\end{table}

\end{document}

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