答案1
这是一个解决方案blkarray
:
\documentclass{article}
\usepackage[utf8]{inputenc} %
\usepackage{blkarray}
\usepackage{eqparbox} \newcommand{\ub}[1]{\underline{\bfseries#1}}
\begin{document}
\setlength\BAextrarowheight{1pt}
\begin{blockarray}{ccl}
\BAhline
\begin{block}{c\BAmulticolumn{2}{c}}
N\textsuperscript{o} & Rank \\
\end{block}%
\BAhline \begin{block}{c c\}\BAmultirow{\eqboxwidth{L}}}
1 & \itshape\ub{8} & \eqmakebox[L]{run length = 2}\\
2 & \itshape\ub{9} & {}\\%
\end{block}%
\begin{block}{c c\}\BAmultirow{\eqboxwidth{L}}}
3 & \ub{7} & run length = 2\\
4 & \ub{6} & {}\\%
\end{block}%
5 & 2 & \\%
6 & 16 \\
19 & 14 \\
20 & 4\\ 21 & 13 \\
22 & 26 \\
28 & 24 \\%
\begin{block}{c c\}\BAmultirow{\eqboxwidth{L}}}
29& 22 & run length = 3 \\
30 & 21 \\
31 & 20 \\
\end{block}
\BAhline
\end{blockarray}
\end{document}
答案2
对于偶数“游程长度”,我将一个$\left.<array>\right\}<text>$
构造放置在下线上并.5\normalbaselineskip
升到位(确保结果没有高度/深度)。对于奇数“游程长度”,我将一个类似的构造放置在中间/中心线上,并且\smash
它:
\documentclass{article}
\usepackage{booktabs}
\begin{document}
\begin{tabular}{ @{} r l @{} }
\toprule
No & \multicolumn{1}{c @{}}{Rank} \\
\midrule
1 & \underline{\itshape\bfseries 8} \\
2 & \underline{\itshape\bfseries 9}%
\raisebox{.5\normalbaselineskip}[0pt][0pt]{$\left.\begin{array}{@{}c@{}} \mathstrut \\ \mathstrut \end{array}\right\}
\mbox{run length = 2}$} \\
3 & \underline{\bfseries 7} \\
4 & \underline{\bfseries 6}%
\raisebox{.5\normalbaselineskip}[0pt][0pt]{$\left.\begin{array}{@{}c@{}} \mathstrut \\ \mathstrut \end{array}\right\}
\mbox{run length = 2}$} \\
5 & 28 \\
6 & 16 \\
19 & 15 \\
20 & 4 \\
21 & 13 \\
22 & 26 \\
28 & 24 \\
29 & \underline{\itshape\bfseries 22} \\
30 & \underline{\itshape\bfseries 21}%
\smash{$\left.\begin{array}{@{}c@{}} \mathstrut \\ \mathstrut \\ \mathstrut \end{array}\right\}
\mbox{run length = 3}$} \\
31 & \underline{\itshape\bfseries 20} \\
\bottomrule
\end{tabular}
\end{document}