Skip to content

Treat \empty as a table command #328

@lvjr

Description

@lvjr

Based on discussion #321, I think it would be good for users if tabularray treats \relax and \empty as table commands by default.

\NewTableCommand\empty{}
\NewTableCommand\relax{}

Update 1: Adding \NewTableCommand\empty{} is safe. But adding \NewTableCommand\relax{} causes an error even for a simple example:

> Step: build the whole table.

! Missing font identifier.
<to be read again> 
                   OT1/cmr/m/n/10 
l.11 \end
         {tblr}
I was looking for a control sequence whose
current meaning has been defined by \font.

Update 2: The error is due to the failure in restoring the original definition of \relax.

> Step: execute table commands.
> \relax=\protected macro:->\__cmd_start_expandable:nNNNNn
{}\__tblr_table_command_relax_saved:w  \__tblr_table_command_relax_saved:w 
\__tblr_table_command_relax_saved:w code ?{}.
> \empty=macro:->.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions