Skip to content

Styles set for out-of-bound cell may be applied to wrong cell #418

@muzimuzhi

Description

@muzimuzhi

In example below, style font=\Huge is set for cell (2,3) in a 3x2 tblr tabular. It should have no effect because (2,3) is out of bound. But now the style is applied to a wrong cell (3,1).

\documentclass{article}
\usepackage{tabularray}

\SetTblrInner{
  cells={preto={(\therownum, \thecolnum)}},
  hline{1,Z},
  vline{1,Z},
}

\begin{document}
\begin{tblr}{cell{2}{3}={font=\Huge}}
  & \\ \\ \\
\end{tblr}
\end{document}

image

My findings so far

Additional checks for overflow row or col numbers is needed, perhaps in \__tblr_data_item:nnnn and \__tblr_data_gput:nnnnn, where row and col numbers are available and not combined into a single index of some intarray.

Currently there's only an intarray-beyond-bound check in \__tblr_intarray_gset:Nnn. But if a cell is indeed out-of-bound but its index in intarray is not, corresponding style settings for this cell is not ignored.

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