I'm trying to learn tabularray and wanted to setup some custom environments. I really like the idea of being able to move some of the layout markup outside of the actual tabular code, but there are some combinations I can't get to work.
\documentclass{article} \usepackage{xcolor} \usepackage{tabularray} \NewTblrEnviron{my-tabular} \SetTblrInner[my-tabular]{ rows={font=\sffamily}, row{1} = {bg=black!10,font=\sffamily\bfseries}, } \NewColumnType{Z}{X[font=\ttfamily]} \begin{document} \begin{tblr}{ colspec={ZX}, rows={font=\sffamily}, row{1}={bg=black!10,font=\sffamily\bfseries}, } Header left & Header right \\ item 1 left & item 1 right \\ item 2 left & item 2 right \end{tblr} \begin{my-tabular}{ colspec={ZX}, % row{1}={bg=black!10,font=\sffamily\bfseries}, } Header left & Header right \\ item 1 left & item 1 right \\ item 2 left & item 2 right \end{my-tabular} \end{document} The first table is what I want, but if I try to move the rows and row{1} definitions into a custom environment, the font changing commands from the colspec take priority over the one in row{1}. (Note, repeating the row{1} setting in \begin{my-tabular} works, but it feels very clumsy.)
I'm probably missing something fairly obvious, but I can't figure out a way to have the definitions from \SetTblrInner to override the colspec font changes. Any ideas how to do this in user-friendly way, leaving the code for actual table as clean as possible?
