![我想创建一个这样的表格,末尾带有花括号](https://linux22.com/image/466175/%E6%88%91%E6%83%B3%E5%88%9B%E5%BB%BA%E4%B8%80%E4%B8%AA%E8%BF%99%E6%A0%B7%E7%9A%84%E8%A1%A8%E6%A0%BC%EF%BC%8C%E6%9C%AB%E5%B0%BE%E5%B8%A6%E6%9C%89%E8%8A%B1%E6%8B%AC%E5%8F%B7.png)
这是我目前得到的结果。如果有人能帮我在现有列之间插入 2^2x5 和 2x11,那就太好了。
\setlength{\tabcolsep}{12pt}
\paragraph{}
\begin{tabular}{c c c c}
$n\mod19=3$ & $n\equiv3\pmod{19}$ & $n\equiv3\pmod{19}$ & $19$\\[0.25cm]
$n\mod20=1$ & $n\equiv1\pmod{20}$ & $n\equiv2\pmod{21}$ & $3\cdot7$\\[0.25cm]
$n\mod21=2$ & $n\equiv2\pmod{21}$ & $n\equiv1\pmod{220}$ & $2^2\cdot5\cdot11$ \\[0.25cm]
$n\mod22=1$ & $n\equiv1\pmod{22}$ & $n\equiv0\pmod{23}$ & $23$\\[0.25cm]
$n\mod23=0$ & $n\equiv0\pmod{23}$ &
\end{tabular}
\paragraph{}
答案1
\documentclass{report}
\usepackage{amsmath}
\usepackage[a4paper]{geometry}
\begin{document}
{\setlength{\tabcolsep}{12pt}
$\left.
\begin{tabular}{c c c c}
$n\mod19=3$ & $n\equiv3\pmod{19}$ & $n\equiv3\pmod{19}$ & $19$\\[0.25cm]
$n\mod20=1$ & $n\equiv1\pmod{20}$ & $n\equiv2\pmod{21}$ & $3\cdot7$\\[0.25cm]
$n\mod21=2$ & $n\equiv2\pmod{21}$ & $n\equiv1\pmod{220}$ & $2^2\cdot5\cdot11$ \\[0.25cm]
$n\mod22=1$ & $n\equiv1\pmod{22}$ & $n\equiv0\pmod{23}$ & $23$\\[0.25cm]
$n\mod23=0$ & $n\equiv0\pmod{23}$ &
\end{tabular}
\right\}$
text
}
\bigskip
{\setlength{\arraycolsep}{12pt}
$\left.
\begin{array}{c c c c}
n\mod19=3 & n\equiv3\pmod{19} & n\equiv3\pmod{19} & 19\\[0.25cm]
n\mod20=1 & n\equiv1\pmod{20} & n\equiv2\pmod{21} & 3\cdot7\\[0.25cm]
n\mod21=2 & n\equiv2\pmod{21} & n\equiv1\pmod{220} & 2^2\cdot5\cdot11 \\[0.25cm]
n\mod22=1 & n\equiv1\pmod{22} & n\equiv0\pmod{23} & 23\\[0.25cm]
n\mod23=0 & n\equiv0\pmod{23} &
\end{array}
\right\}$
text
}
\end{document}
答案2
与。{NiceTabular}
nicematrix
\documentclass{article}
\usepackage{nicematrix}
\begin{document}
\setlength{\tabcolsep}{12pt}
\begin{NiceTabular}{c c c c}
$n\mod19=3$ & $n\equiv3\pmod{19}$ & $n\equiv3\pmod{19}$ & $19$\\[0.25cm]
$n\mod20=1$ & $n\equiv1\pmod{20}$ & $n\equiv2\pmod{21}$ & $3\cdot7$\\[0.25cm]
$n\mod21=2$ & $n\equiv2\pmod{21}$ & $n\equiv1\pmod{220}$ & $2^2\cdot5\cdot11$ \\[0.25cm]
$n\mod22=1$ & $n\equiv1\pmod{22}$ & $n\equiv0\pmod{23}$ & $23$\\[0.25cm]
$n\mod23=0$ & $n\equiv0\pmod{23}$ &
\CodeAfter
\SubMatrix{.}{1-1}{4-4}{\}}
\end{NiceTabular}
\end{document}
答案3
如果您不关心构造组件的垂直对齐,则简单的嵌套align
将aligned
提供:
\documentclass{article}
\usepackage{amsmath,eqparbox}
\usepackage[margin=1in]{geometry}% Just for this example
% https://tex.stackexchange.com/a/34412/5764
\makeatletter
\NewDocumentCommand{\eqmathbox}{o O{c} m}{%
\IfValueTF{#1}
{\def\eqmathbox@##1##2{\eqmakebox[#1][#2]{$##1##2$}}}
{\def\eqmathbox@##1##2{\eqmakebox{$##1##2$}}}
\mathpalette\eqmathbox@{#3}
}
\makeatother
\begin{document}
\begin{align*}
& \begin{aligned}
n \mod 19 &= 3 \\
n \mod 20 &= 1 \\
n \mod 21 &= 2 \\
n \mod 22 &= 1 \\
n \mod 23 &= 0
\end{aligned} &
& \begin{aligned}
n &\equiv 3 \pmod{19} \\
n &\equiv 1 \pmod{20} & \eqmathbox[prp1]{2^2 \cdot 5} \\
n &\equiv 2 \pmod{21} \\
n &\equiv 1 \pmod{22} & \eqmathbox[prp1]{2 \cdot 11} \\
n &\equiv 0 \pmod{23}
\end{aligned} &
&\left.\kern-\nulldelimiterspace\begin{aligned}
n &\equiv 3 \pmod{19} & \eqmathbox[prp2]{19} \\
n &\equiv 2 \pmod{21} & \eqmathbox[prp2]{3 \cdot 7} \\
n &\equiv 1 \pmod{220} & \eqmathbox[prp2]{2^2 \cdot 5 \cdot 11} \\
n &\equiv 0 \pmod{23} & \eqmathbox[prp2]{23}
\end{aligned} \right\}
\end{align*}
\end{document}