I've just discovered tabularray and i love it.
The use of keys to parameter my (x300) tables is made easy.
However, I miss something in the documentation.
We can define
\NewTblrTheme{fancy}{
\DefTblrTemplate{conthead}{default}{[Continued]}
\SetTblrStyle{firsthead}{font=\bfseries}
\SetTblrStyle{firstfoot}{fg=blue2}
\SetTblrStyle{middlefoot}{\itshape}
\SetTblrStyle{caption-tag}{red2}}
for some features of the tables that can be used by callin [theme = fancy].
But how can I create something (like styles) for other elements
mystyle1/.style = {
colspec = {rX[c]X[c]X[c]},
width = 0.75\linewidth,
row{1} = {font=\bfseries},
column{1} = {font=\bfseries},
row{odd} = {green!10},
row{even} = {green!20},
}
mystyle2/.style = {
colspec = {rXXX},
width = \linewidth,
% row{1} = {font=\bfseries},
% column{1} = {font=\bfseries},
row{odd} = {blue!10},
row{even} = {blue!20},
}
Can I also control inside this style the behavior of \toprule, \midrule and \bottomrule ?
MWE
\documentclass{article}
\usepackage{xcolor}
\usepackage{tabularray}
\UseTblrLibrary{booktabs}
\begin{document}
\begin{longtblr}{ %mystyle1 %mystyle2
colspec = {rX[c]X[c]X[c]},
width = 0.75\linewidth,
row{1} = {font=\bfseries},
column{1} = {font=\bfseries},
row{odd} = {green!10},
row{even} = {green!20},
}
\toprule
& S\&P & Fitch & Moody's \\
\midrule
Prime & AAA & AAA & Aaa \\
\multirow{3}{*}{High grade} & AA+ & AA+ & Aa1 \\
& AA & AA & Aa2 \\
& AA- & AA- & Aa3 \\
\multirow{3}{*}{Upper medium grade} & A+ & A+ & A1 \\
& A & A & A2 \\
& A- & A- & A3 \\
\multirow{3}{*}{Lower medium grade} & BBB+ & BBB+ & Baa1 \\
& BBB & BBB & Baa2 \\
& BBB- & BBB- & Baa3 \\
\bottomrule
\end{longtblr}
\end{document}



\multirow{3}{*}{...}will be with new realize oftabularray(at March 1st) obsolete. Usetabularrayreplacement\SetCell[r=3]{bg=green!10} ...instead. – Zarko Feb 19 '22 at 22:16