tabularray icon indicating copy to clipboard operation
tabularray copied to clipboard

Define inner and outer meta keys

Open polgab opened this issue 2 years ago • 7 comments

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.

polgab avatar Mar 03 '22 22:03 polgab

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.

marvlg avatar Mar 04 '22 04:03 marvlg

The name could be inner style, inner theme, type, option, kind, design, appearance, meta key...

polgab avatar Mar 04 '22 06:03 polgab

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.

lvjr avatar Mar 11 '22 13:03 lvjr

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.

polgab avatar Mar 11 '22 16:03 polgab

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.

lvjr avatar Jun 19 '22 08:06 lvjr

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.

lvjr avatar Aug 22 '22 12:08 lvjr

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}

lvjr avatar Aug 22 '22 12:08 lvjr