0

I would like to fix the table in which each cell contains the whole mathematical expression inside the cell, not exceed it. The following code produces this

enter image description here

\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}
4
  • Your narrow columns (3cm) with the large \tabcolsep cause the boxed equations not to fit. So change this. And then, your code doesn't compile because \boxed puts its contents in math mode, so you shouldn't use $ inside it. Oct 10, 2022 at 11:44
  • I tried to do so with no luck
    – Educ
    Oct 10, 2022 at 12:00
  • Can you please add the real contents of the second row?
    – egreg
    Oct 10, 2022 at 12:39
  • The second row will also contain complex mathematical expressions.
    – Educ
    Oct 10, 2022 at 12:58

1 Answer 1

1

Like this?

enter image description here

  • Used is tabularray package
  • In table is used \small font size
  • Macro boxed is moved in math environments
\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}

You must log in to answer this question.

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