如何在不影響牙套的情況下使A組和B組之間的水平尺變粗?我是否需要使用不同的方法來獲取大括號才能實現此目的?
\documentclass[11pt]{article}
\usepackage{amsmath,tabularx,ragged2e}
\newcolumntype{C}[1]{>{\Centering}m{#1}}
\begin{document}
\[
\begin{array}{r}
\begin{tabular}{|C{24pt}!{\vrule width1pt}C{20pt}|C{20pt}|}
\hline
a&b&c\\ \noalign{\hrule height1pt}
\end{tabular}\\
\llap{\hbox{group A}}
\left\{
\begin{tabular}{|C{24pt}!{\vrule width1pt}C{20pt}|C{20pt}|}
1&2&3\\\hline
4&5&6\\\hline
\end{tabular}
\right.\kern-\nulldelimiterspace\\
\llap{\hbox{group B}}
\left\{
\begin{tabular}{|C{24pt}!{\vrule width1pt}C{20pt}|C{20pt}|}
7&8&9\\\hline
7&8&9\\\hline
\end{tabular}
\right.\kern-\nulldelimiterspace
\end{array}
\]
\end{document}
答案1
使用套件Xhline
中定義的makecell
:
\documentclass[11pt]{article}
\usepackage{amsmath}
\usepackage{ragged2e}
\usepackage{makecell,tabularx} % <---
\newcolumntype{C}[1]{>{\Centering}m{#1}}
\begin{document}
\[
\begin{array}{r}
\begin{tabular}{|C{24pt}!{\vrule width1pt}C{20pt}|C{20pt}|}\hline
a&b&c\\
\Xhline{1pt} % <---
\end{tabular}\\
\llap{\hbox{group A}}\left\{\begin{tabular}{|C{24pt}!{\vrule width1pt}C{20pt}|C{20pt}|}
1&2&3\\ \hline
4&5&6\\ \Xhline{1pt} % <---
\end{tabular}\right.\kern-\nulldelimiterspace\\
\llap{\hbox{group B}}\left\{\begin{tabular}{|C{24pt}!{\vrule width1pt}C{20pt}|C{20pt}|}
7&8&9\\\hline
7&8&9\\\hline
\end{tabular}\right.\kern-\nulldelimiterspace
\end{array}
\]
\end{document}