0

How can I achieve variable-height rows on a table?

Specifically, in the MWE below I would like to reduce the heights of rows 2-3 and 9-11, as indicated.

Thanks for any help!

MWE:

\documentclass[class=scrreprt,fontsize=10pt]{standalone}

\usepackage{booktabs}
\aboverulesep=0ex
\belowrulesep=0ex

\usepackage{multirow}

\usepackage{array}
\newcolumntype{?}{!{\vrule width 1pt}}

\begin{document}
\renewcommand{\arraystretch}{1.7}%
\begin{tabular}{
    @{}?r|
    >{\centering\arraybackslash\leavevmode}p{0.7cm}|
    >{\centering\arraybackslash\leavevmode}p{0.7cm}
    ?@{}%
}
\multicolumn{3}{c}{\textbf{Performance summary}}\\
\cmidrule[1.0pt]{1-3}
\multirow{2}{*}{\textbf{Technology}}&                   \multicolumn{2}{c?}{16 nm FF}\\
&                                                       \multicolumn{2}{c?}{CMOS}\\
\midrule%
\multicolumn{1}{?r|}{\textbf{Supply}}&                  \multicolumn{2}{c?}{0.9 V}\\
\midrule%
\multicolumn{1}{?r|}{\textbf{Sampling rate}}&           \multicolumn{2}{c?}{1-500 MS/s}\\
\midrule%
\multicolumn{1}{?r|}{\textbf{Resolution}}&              \multicolumn{2}{c?}{11.5 bit}\\
\midrule%
\multicolumn{1}{?r|}{\textbf{Input range}}&             \multicolumn{2}{c?}{1.8 V$_{pp,d}$}\\
\midrule%
\multicolumn{1}{?r|}{\textbf{ERBW}}&                    \multicolumn{2}{c?}{900 MHz}\\
\cmidrule[1.0pt]{1-3}
\multicolumn{1}{?r|}{\textbf{Performance}}&             \multicolumn{2}{c?}{\textbf{Reference}}\\
\multicolumn{1}{?r|}{\textbf{with Nyquist}}&            \multicolumn{2}{c?}{\textbf{regulation}}\\
\cmidrule[0.5pt]{2-3}
\multicolumn{1}{?r|}{\textbf{input}}&                   \textbf{OFF}    &\textbf{ON}\\
\cmidrule[0.5pt]{1-3}
\multicolumn{1}{?r|}{\textbf{ENOB [bit]}}&              10.16           &10.05\\
\midrule%
\multicolumn{1}{?r|}{\textbf{SNDR [dB]}}&               62.9            &62.3\\
\midrule%
\multicolumn{1}{?r|}{\textbf{SFDR [dB]}}&               75.5            &75.5\\
\midrule%
\multicolumn{1}{?r|}{\textbf{$|$THD$|$ [dB]}}&          71.7            &71.8\\
\cmidrule[1.0pt]{1-3}
\multicolumn{1}{?r|}{\textbf{Power [mW]}}&              2.8             &3.3\\
\midrule%
\multicolumn{1}{?r|}{\textbf{FoM$_{W}$ [fJ/c.s.]}}&     4.9             &6.2\\
\midrule%
\multicolumn{1}{?r|}{\textbf{FoM$_{S}$ [dB]}}&          172.4           &171.1\\
\cmidrule[1.0pt]{1-3}
\multicolumn{1}{?r|}{\textbf{Core area}}&               \multicolumn{2}{c?}{0.0084 mm$^2$}\\
\cmidrule[1.0pt]{1-3}
\end{tabular}%
\end{document}%

Output (left: actual, right: desired): enter image description here

1

2 Answers 2

1

With use of tabularray package with tblr libraries siunitx:

\documentclass[class=scrreprt,fontsize=10pt, border=3mm]{standalone}
\usepackage{tabularray}
\UseTblrLibrary{siunitx}

\begin{document}
\begin{tblr}{hline{2,8,13,Y,Z}=1pt, hline{3-7,9-12,14-16},
             vline{2,3} = {2-Z}{solid}, vline{1,Z} = {2-Z}{1pt},
             colspec = {     Q[r, wd=9em, font=\bfseries] 
                        *{2}{Q[c, si={table-format=3.2}, wd=4em]} 
                       },
            row{1}   = {font=\bfseries}
            }
\SetCell[c=3]{c} Performance summary &   &                          \\
Technology      & \SetCell[c=2]{c}  {{{\qty{16}{nm} FF, CMOS}}}                 
                                                            &       \\
Supply          & \SetCell[c=2]{c}  {{{\qty{0.9}{V} }}}     &       \\
Sampling rate   & \SetCell[c=2]{c}  {{{\qtyrange{1}{500}{MS/s} }}} 
                                                            &       \\
Resolution      & \SetCell[c=2]{c}  {{{\qty{11.5}{bit} }}}  &       \\
Input range     & \SetCell[c=2]{c}  {{{\qty{1.8}{V_{pp,d}} }}}     
                                                            &       \\
ERBW            & \SetCell[c=2]{c}  {{{\qty{900}{MHz} }}}   &       \\
\SetCell[r=2]{r}
Performance with Nyquist input 
                & \SetCell[c=2]{c}  \textbf{Reference regulation}
                                                            &       \\
                & \textbf{OFF}  &   \textbf{ON}                     \\
ENOB [bit]      &   10.16       &   10.05                           \\
SNDR [dB]       &   62.9        &   62.3                            \\
SFDR [dB]       &   75.5        &   75.5                            \\
$|$THD$|$ [dB]  &   71.7        &   71.8                            \\
Power [mW]      &    2.8        &    3.3                            \\
FoM\textsubscript{W} [fJ/c.s.]
                &    4.9        &    6.2                            \\
FoM\textsubscript{S} [dB]
                &  172.4        &  171.1                            \\
Core area       & \SetCell[c=2]{c}  {{{\qty{0.0084}{mm^2} }}}   &   \\
\end{tblr}
\end{document}

enter image description here

1
  • Thanks for the comprehensive answer, Zarko. It took me a while to decrypt what's going on there, but switching to tabularray/tblr does solve this problem quite elegantly. Thanks!
    – dontpanic
    Nov 27, 2021 at 6:47
1

Using makecell

\documentclass[class=scrreprt,fontsize=10pt]{standalone}

\usepackage{booktabs}
\aboverulesep=0ex
\belowrulesep=0ex

\usepackage{multirow}
\usepackage{array}
\newcolumntype{?}{!{\vrule width 1pt}}

\usepackage{makecell}

\begin{document}
\renewcommand{\arraystretch}{1.7}%
\begin{tabular}{
    @{}?r|
    >{\centering\arraybackslash\leavevmode}p{0.7cm}|
    >{\centering\arraybackslash\leavevmode}p{0.7cm}
    ?@{}%
}
\multicolumn{3}{c}{\textbf{Performance summary}}\\
\cmidrule[1.0pt]{1-3}
\textbf{Technology}&\multicolumn{2}{c}{\makecell{16 nm FF \\ CMOS}}\\
\midrule%
\multicolumn{1}{?r|}{\textbf{Supply}}&                  \multicolumn{2}{c?}{0.9 V}\\
\midrule%
\multicolumn{1}{?r|}{\textbf{Sampling rate}}&           \multicolumn{2}{c?}{1-500 MS/s}\\
\midrule%
\multicolumn{1}{?r|}{\textbf{Resolution}}&              \multicolumn{2}{c?}{11.5 bit}\\
\midrule%
\multicolumn{1}{?r|}{\textbf{Input range}}&             \multicolumn{2}{c?}{1.8 V$_{pp,d}$}\\
\midrule%
\multicolumn{1}{?r|}{\textbf{ERBW}}&                    \multicolumn{2}{c?}{900 MHz}\\
\cmidrule[1.0pt]{1-3}
\multirow{2}{*}{\textbf{\makecell[r]{Performance\\ with Nyquist\\ Input}}}& \multicolumn{2}{c?}{\textbf{\makecell{Reference\\ regulation}}}\\
\cmidrule[0.5pt]{2-3}
&                   \textbf{OFF}    &\textbf{ON}\\
\cmidrule[0.5pt]{1-3}
\multicolumn{1}{?r|}{\textbf{ENOB [bit]}}&              10.16           &10.05\\
\midrule%
\multicolumn{1}{?r|}{\textbf{SNDR [dB]}}&               62.9            &62.3\\
\midrule%
\multicolumn{1}{?r|}{\textbf{SFDR [dB]}}&               75.5            &75.5\\
\midrule%
\multicolumn{1}{?r|}{\textbf{$|$THD$|$ [dB]}}&          71.7            &71.8\\
\cmidrule[1.0pt]{1-3}
\multicolumn{1}{?r|}{\textbf{Power [mW]}}&              2.8             &3.3\\
\midrule%
\multicolumn{1}{?r|}{\textbf{FoM$_{W}$ [fJ/c.s.]}}&     4.9             &6.2\\
\midrule%
\multicolumn{1}{?r|}{\textbf{FoM$_{S}$ [dB]}}&          172.4           &171.1\\
\cmidrule[1.0pt]{1-3}
\multicolumn{1}{?r|}{\textbf{Core area}}&               \multicolumn{2}{c?}{0.0084 mm$^2$}\\
\cmidrule[1.0pt]{1-3}
\end{tabular}%
\end{document}%

enter image description here

1
  • Thanks so much for the answer, Dan; this is a quick workaround that solves the problem!
    – dontpanic
    Nov 27, 2021 at 6:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .