tabularray
tabularray copied to clipboard
Define inner and outer meta keys
Add the style
key and the \DefTblrInnerStyle
macro to use styles (combination of several inner keys) in the tblr
inner specification.
Note: \NewTblrEnviron
and \SetTblrInner
allow to define a kind of unique style for a new table environment. But you can't mix two environments...
See my proposal at TeX.se.
I really like this idea, but the name style is already used in the template system. This would be very confusing, the feature should go by a different name.
The name could be inner style
, inner theme
, type
, option
, kind
, design
, appearance
, meta key
...
I would rather make tabularray
expand macros and parse the specifications in them, this approach applies to both inner and outer specifications, and doesn't need a new key or a new command.
The macro approach is less user friendly.
With a style
(or any other name) key, you can use style=beautiful table
or style=old style
...
With macro approach, you must use \mytblrstylebeautifultable
or \mytblrstyleoldstyle
...
Of course, I can always continue to use my code proposal for my own documents. Or even publish a tabularray-style
package on CTAN.
I would rather make
tabularray
expand macros and parse the specifications in them, this approach applies to both inner and outer specifications, and doesn't need a new key or a new command.
After asking a question on TeX.SX, I discovered there is a related pull request https://github.com/latex3/latex3/pull/1048 to f
-expand key names. Therefore we only need to patiently wait for the change in LaTeX3.
The pull request https://github.com/latex3/latex3/pull/1048 has been discarded. At first I thought it was a bad news, but later I realized that the planned change might interfere with tabularray
because this package omits key names in many cases.
I decide to provide commands \DefTblrInnerKey
and \DefTblrOuterKey
in the near future.
Or maybe I only need to provide one command:
\DefTblrMetaKey{inner}{keya}{some specs}
\DefTblrMetaKey{outer}{keyb}{other specs}