Decrease row height in tabularray

heighttablestabularray

\documentclass{article}

\usepackage{tabularray, xcolor}

\begin{document}

\begin{tblr}{
columns={3em, c, colsep=2pt},
rows={3em, m, rowsep=2pt},
row{2,3} = {ht=0pt, abovesep=0pt, belowsep=0pt},
column{1,2} = {wd=0.2em},
vline{1} = {1-Z}{red,solid},
vline{2} = {1-2}{solid},
vline{3,5} = {1,4}{solid} 
}
\cline{3-4}
&& text 1 & text 2 \\   
\cline{3-4}
&&& \\
\cline{2-4}
&&& \\
\cline{3-4}
&& text 3 & text 4\\
\cline{3-4}
\end{tblr}  
    
\end{document}

Red line here is just to show left border of table.

One can change the distance from vertical line (of right angle) to the table by varying width of dummy columns 1 and 2: column{1,2}={wd=0.2em}. I have already set the height and separations of dummy rows 2 and 3 both to zero (row{2,3}={ht=0pt, abovesep=0pt, belowsep=0pt}), but I want to more decrease the vertical distance from horizontal line (of right angle) to the nearby rows, i.e. make this distance about the same as horizontal one (0.2em here). So, how to minimize the row height in tabularray?

Thank you.

Best Answer

In tabular enviroment, every cell has minimal vertical space from \strut command whose size is specified by \arraystretch parameter.

The same is true for tblr environment, while the difference is that we use stretch option here. You can remove the strut by setting stretch=0.

Setting \arraystretch=0 will break the alignment in tabular environment but setting stretch=0 doesn't break the alignment in tblr environment.

\documentclass{article}

\usepackage{tabularray, xcolor}

\begin{document}

\begin{tblr}{
  columns={3em, c, colsep=2pt},
  rows={3em, m, rowsep=2pt},
  row{2,3} = {0.2em},
  column{1,2} = {0.2em},
  vline{1} = {red,solid},
  vline{2} = {1-2}{solid},
  vline{3,5} = {1,4}{solid},
  stretch = 0,
}
\cline{3-4}
&& text 1 & text 2 \\   
\cline{3-4}
&&& \\
\cline{2-4}
&&& \\
\cline{3-4}
&& text 3 & text 4\\
\cline{3-4}
\end{tblr} 
    
\end{document}

enter image description here

Related Question