1

I have the feeling I cant use columns in a correct way. I often have a slide with two tables next to each other and it looks like that: enter image description here

The code of the frame is this one:

\begin{frame}{Nyttige regler for sett}
\begin{columns}
    \begin{column}{0.25\textwidth}
        \begin{tabular}{l|c}
        Ekvivalens & Navn \\ \hline
        $A \cap U = A$ & Identity\\
        $A \cup \emptyset = A$ \\ \hline
        
        $A \cup U = U$ & Domination\\
        $A \cap \emptyset = \emptyset$\\ \hline
        
        $A \cup A = A$ & Idempotent\\
        $A \cap A = A$ \\ \hline
        
        $A = (A^C)^C$ & Negation\\ \hline
        
        $A \cup B = B \cup A$ & Commutative\\
        $A \cap B = B \cap A$ \\

    \end{tabular}
    \end{column}
    \begin{column}{0.58\textwidth}
        \begin{tabular}{l|c}
        Ekvivalens & Navn \\ \hline
        
        $(A \cup B) \cup C = A \cup (B \cup C)$ & Associative\\
        $(A \cap B) \cap C = A \cap (B \cap C)$ \\ \hline
        
        $A \cup (B \cap C) = (A \cup B) \cap (A \cup C)$ & Distributive\\
        $A \cap (B \cup C) = (A \cap B) \cup (A \cap C)$ \\ \hline
        
        $(A \cap B)^C = A^C \cup B^C$ & De Morgan \\
        $(A \cup B)^C = A^C \cap B^C$ \\ \hline
        
        $A \cup (A \cap B) = A$ & Absorption \\
        $A \cap (A \cup B) = A$ \\ \hline
        
        $A \cup A^C = U$ & Negation \\
        $A \cap A^C = \emptyset$ \\
        \end{tabular}
    \end{column}
\end{columns}
\end{frame}

Independent from how I adjust the width-parameters, it doesnt look good. They are either growing into each other or going into the right edge.

Is there a way to fix that? Can I left align tables in a column?

1 Answer 1

1

I think that using column environments may be getting in the way of finding appropriate sizes for the tabular environments. For sure, once I got rid of the column overhead, it was a matter of experimenting around with relative font sizes until I hit on \footnotesize as what was needed, along with reducing the parameter \tabcolsep to 3pt (default value: 6pt).

enter image description here

\documentclass{beamer}
\usepackage[norsk]{babel}
\usepackage{array}

\begin{document}
\begin{frame}[c]{Nyttige regler for sett}
\setlength{\tabcolsep}{3pt} % default value: 6pt
\footnotesize
\begin{tabular}[t]{@{}l|c@{}}
        Ekvivalens & Navn \\ \hline
        $A \cap U = A$ & Identity\\
        $A \cup \emptyset = A$ \\ \hline
        
        $A \cup U = U$ & Domination\\
        $A \cap \emptyset = \emptyset$\\ \hline
        
        $A \cup A = A$ & Idempotent\\
        $A \cap A = A$ \\ \hline
        
        $A = (A^C)^C$ & Negation\\ \hline
        
        $A \cup B = B \cup A$ & Commutative\\
        $A \cap B = B \cap A$ \\
\end{tabular}%
\hspace{\fill}
\begin{tabular}[t]{@{}l|c@{}}
        Ekvivalens & Navn \\ \hline
        
        $(A \cup B) \cup C = A \cup (B \cup C)$ & Associative\\
        $(A \cap B) \cap C = A \cap (B \cap C)$ \\ \hline
        
        $A \cup (B \cap C) = (A \cup B) \cap (A \cup C)$ & Distributive\\
        $A \cap (B \cup C) = (A \cap B) \cup (A \cap C)$ \\ \hline
        
        $(A \cap B)^C = A^C \cup B^C$ & De Morgan \\
        $(A \cup B)^C = A^C \cap B^C$ \\ \hline
        
        $A \cup (A \cap B) = A$ & Absorption \\
        $A \cap (A \cup B) = A$ \\ \hline
        
        $A \cup A^C = U$ & Negation \\
        $A \cap A^C = \emptyset$ \\
\end{tabular}

\end{frame}
\end{document} 
1
  • Super weird code but nice result :) Thank you for your answer :)
    – Hemmelig
    May 12, 2022 at 8:26

You must log in to answer this question.

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