[Tex/LaTex] How to make a row in a table shorter

heighttables

I have a row of a table (tabular) that has small text (tiny). I would like to make this (first) row shorter, either automatically (automatic height) o̶r̶ ̶m̶a̶n̶u̶a̶l̶l̶y̶ ̶(̶s̶e̶t̶ ̶a̶ ̶n̶o̶n̶-̶d̶e̶f̶a̶u̶l̶t̶ ̶h̶e̶i̶g̶h̶t̶ ̶f̶o̶r̶ ̶t̶h̶a̶t̶ ̶p̶a̶r̶t̶i̶c̶u̶l̶a̶r̶ ̶r̶o̶w̶)̶.̶

I tried different tricks (like using \\[shift]) with no success.

MWE:

enter image description here

\documentclass[]{article}
\begin{document}
\begin{tabular}
{|c|c|c|c|}
{\tiny0}&{\tiny1}&{\tiny2}&{\tiny3}\\[-1mm]
\hline 0 & 4.94066e-323 & 22 & 9.78381e+199\\
\hline 
\end{tabular}
\end{document}

A simple solution using tabular is preferred but elegant solutions using pgfplotstables is also welcomed; specially since I have in mind the enumeration of columns (and eventually of rows).

Note that similar questions, like How can I reduce table row height? deal with uniform row heights adjustments.

Best Answer

An alternative solution with tblr environment of tabularray package: since there is default rowsep for a tblr table, you are free to set stretch=0 to remove the strut.

\documentclass{article}

\usepackage{tabularray}

\begin{document}

\begin{tblr}{
  colspec = {|c|c|c|c|},
  hlines,
  row{1} = {font=\tiny},
  stretch = 0,
}
  0 & 1            & 2  & 3            \\
  0 & 4.94066e-323 & 22 & 9.78381e+199 \\
\end{tblr}

\end{document}

enter image description here

Related Question