![数学表达式超出单元格](https://linux22.com/image/455956/%E6%95%B0%E5%AD%A6%E8%A1%A8%E8%BE%BE%E5%BC%8F%E8%B6%85%E5%87%BA%E5%8D%95%E5%85%83%E6%A0%BC.png)
我想修复表格,其中每个单元格包含单元格内的整个数学表达式,但不超过它。以下代码生成此
\documentclass[12pt,a4paper]{report}
%\usepackage[a4paper,margin=0.5in]{geometry}
\usepackage{amsmath, amssymb, amsthm, mathtools, amsfonts, mathrsfs, mathtools,}
\usepackage[showframe,a4paper,margin=0.5in]{geometry}
\usepackage{array,multirow,makecell}
\setcellgapes{5pt}
\makegapedcells
\newcolumntype{R}[1]{>{\raggedleft\arraybackslash }b{#1}}
\newcolumntype{L}[1]{>{\raggedright\arraybackslash }b{#1}}
\newcolumntype{C}[1]{>{\centering\arraybackslash }b{#1}}
%\setlength{\arrayrulewidth}{0.5mm}
\setlength{\tabcolsep}{43pt}
%\renewcommand{\arraystretch}{1.5}
\begin{document}
\begin{center}
\begin{tabular}{|C{3cm}|C{3cm}|C{3cm}|}
\hline
\multicolumn{3}{|c|}{Measure theory} \\
\hline
$\mathcal{C}\subset \mathcal{P}(\Omega)$ est un \textbf{Clan} sur $\Omega$
& $\mathcal{A}\subset \mathcal{P}(\Omega)$ est une \textbf{Algébre de Boole} sur $\Omega$
&$\mathcal{F}\subset \mathcal{P}(\Omega)$ est une \textbf{Tribu} ou $\sigma$-\textbf{algébre} sur $\Omega$ \\
\hline
Cell 1 & Cell 2 & Cell 3 \\
\hline
\boxed{$\begin{cases}
A\in \mathcal{C} \implies A^{c}\in\mathcal{C} &\\
A,B\in \mathcal{C} \implies A\cup B\in\mathcal{C} &\\
\end{cases}$}
&
\boxed{$\begin{cases}
\emptyset \in \mathcal{A} &\\
A\in \mathcal{A} \implies A^{c}\in\mathcal{A} &\\
A,B\in \mathcal{A} \implies A\cup B\in\mathcal{A} &\\
\end{cases}$}
&
\boxed{$\begin{cases}
\emptyset \in \mathcal{A} &\\
A\in \mathcal{A} \implies A^{c}\in\mathcal{A} &\\
\{A_{n},\;n\in\mathbb{N} \}\subset \mathcal{F}\implies \bigcup\limits_{n\in\mathbb{N}}A_{n}\in\mathcal{F}&\\
\end{cases}$}
\\
\hline
\end{tabular}
\end{center}
\end{document}
答案1
像这样?
- 使用的是
tabularray
包 - 表格中使用的
\small
字体大小 - 宏
boxed
在数学环境中移动
\documentclass[12pt,a4paper]{report}
\usepackage[a4paper,margin=0.5in]{geometry}
\usepackage{amssymb, amsthm, mathtools, mathrsfs,}
\usepackage{tabularray}
\begin{document}
\begin{center}
\small
\begin{tblr}{hlines, vlines,
colspec = {X[0.9,c] X[0.9c] X[c] },
row{1} = {mode=text},
colsep = {4pt},
rowsep = {5pt}
}
\SetCell[c=3]{c} Measure theory \\
%
{$\mathcal{C}\subset\mathcal{P}(\Omega)$ est un\\
\textbf{Clan} sur $\Omega$}
& {$\mathcal{A}\subset \mathcal{P}(\Omega)$ est une\\
\textbf{Algébre de Boole} sur $\Omega$}
& {$\mathcal{F}\subset \mathcal{P}(\Omega)$ est une\\
\textbf{Tribu} ou $\sigma$-\textbf{algébre} sur $\Omega$} \\
Cell 1 & Cell 2 & Cell 3 \\
$\boxed{\left\{\begin{array}{r@{\,}l}
A\in \mathcal{C} & \implies A^{c}\in\mathcal{C} \\
A,B\in \mathcal{C} & \implies A\cup B\in\mathcal{C} \\
\end{array}\right.}$
& $\boxed{\left\{\begin{array}{r@{\,}l}
\emptyset & \in \mathcal{A} \\
A & \in \mathcal{A}\implies A^{c}\in\mathcal{A} \\
A,B & \in \mathcal{A}\implies A\cup B\in\mathcal{A} \\
\end{array}\right.}$
& $\boxed{\left\{\begin{array}{r@{\,}l}
\emptyset & \in \mathcal{A}\\
A & \in \mathcal{A} \implies A^{c}\in\mathcal{A} \\
\left\{\begin{gathered}
A_{n},\\
n\in\mathbb{N}
\end{gathered}\right\}
& \subset \mathcal{F} \implies \bigcup\limits_{n\in\mathbb{N}}A_{n}\in\mathcal{F}
\end{array}\right.}$ \\
\end{tblr}
\end{center}
\end{document}