I recently played with tabularray package. It's an awesome, very powerful, easily customizable table and matrix builder. But I'm intrigued about how this package handle stretch. As the minimum example, here are two exactly same tables, but one is put as float, the other as longtblr (imagine this table can get very long:
\documentclass{article}
\usepackage{tabularray}
\usepackage{setspace}
\setstretch{1.5}
\begin{document}
\begin{table}[htbp]
\centering
\begin{talltblr}[
caption = {Sample Data with Footnotes},
label = {tab:sample},
note{a} = {Measured at standard conditions},
note{b} = {Adjusted for humidity},
note{c} = {Gauge pressure readings},
]{
colspec = {lcc},
stretch = 1.0,
hline{1} = {1.2pt},
hline{2} = {0.8pt},
hline{Z} = {1.2pt},
row{1} = {font=\bfseries, abovesep = 4pt, belowsep = 2pt},
row{2} = {abovesep = 4pt},
row{Z} = {belowsep = 2pt},
}
Parameter & Value A\TblrNote{a} & Value B\TblrNote{b} \\
Temperature & 25°C & 30°C \\
Pressure\TblrNote{c} & 1.2 atm & 1.5 atm \\
Flow Rate & 15 L/min & 20 L/min \\
\end{talltblr}
\end{table}
\begin{longtblr}[
caption = {Sample Data with Footnotes},
label = {tab:sample2},
note{a} = {Measured at standard conditions},
note{b} = {Adjusted for humidity},
note{c} = {Gauge pressure readings},
]{
colspec = {lcc},
stretch = 1.0,
hline{1} = {1.2pt},
hline{2} = {0.8pt},
hline{Z} = {1.2pt},
row{1} = {font=\bfseries, abovesep = 4pt, belowsep = 2pt},
row{2} = {abovesep = 4pt},
row{Z} = {belowsep = 2pt},
}
Parameter & Value A\TblrNote{a} & Value B\TblrNote{b} \\
Temperature & 25°C & 30°C \\
Pressure\TblrNote{c} & 1.2 atm & 1.5 atm \\
Flow Rate & 15 L/min & 20 L/min \\
\end{longtblr}
\end{document}
Which outputs to this (using LuaLaTeX 2024, on overleaf public):

Even with exactly the same stretch of 1.0, the former respect the value, but the latter instead use the globally defined \setstretch{1.5}. To remedy it, I should wrap the second table inside a curly bracket, and insert \setstretch{1.0} for the scope of that table only.
Is this an intended behavior, or will this be repaired in the future?
Many thanks for your attention!
\documentclass{article} \usepackage{tabularray} \usepackage{setspace} \setstretch{1.5} \usepackage{lipsum} \begin{document} \begin{table}[htbp] \centering \lipsum[2] \end{table} \lipsum[2] \end{document}stretch = 1.0doesn't change the stretch of the text?\arraystretch(no package).