TransWikia.com

Write list of sample space's operations

TeX - LaTeX Asked by LukeTheWolf on April 7, 2021

I’m pretty new to Latex, and I would like to copy in my notes this "table".
I have initially created a table, but, the result wasn’t as good as the picture.
Can somebody help me to translate this image in Latex?
Thanks in advice!
enter image description here

This is what I’ve done so far:

begin{center}
    begin{tabular}{ |c|c| } 
    hline
    multirow{2}{*}{Leggi Associative} & $E cup F = F cup E$
    & $E cap F = F cap E$
    hline
    multirow{2}{*}{Leggi } & $(E cup F) cup G = E cup (F cup G)$
    & $(E cap F) cap G = E cap (F cap G)$
    hline
    multirow{2}{*}{Leggi Distributive} & $E cup (F cap G) = (E cup F) cap (E cup G)$
    & $E cap (F cup G) = (E cap F) cup (E cap G)$
    hline
    multirow{2}{*}{Leggi di De Morgan} & $(E cup F)^c = E^c cap F^c$
    & $(E cap F)^c = E^c cup F^c$
    hline    
    end{tabular}
end{center}

You should consider that some of the picture’s laws have not been written yet

2 Answers

I believe that the proposed typesetting is ugly because very unbalanced.

There is no reason for right aligning the labels, nor for moving them midway between the formulas (as you tried to do with multirow).

There's no reason for aligning the equals signs, which are completely unrelated with each other (when in different groups).

A one time hack is needed for the last set of laws.

documentclass{article}
usepackage{array,booktabs}

begin{document}

begin{center}
% hack to get the alignment
defvemptyset{ooalign{hfil$emptyset$hfilcrphantom{$Omega$}cr}}

begin{tabular}{ @{} ll @{} }
toprule
Leggi associative & $E cup F = F cup E$
                  & $E cap F = F cap E$
addlinespace
Leggi di assorbimento & $(E cup F) cup G = E cup (F cup G)$
                      & $(E cap F) cap G = E cap (F cap G)$
addlinespace
Leggi distributive & $E cup (F cap G) = (E cup F) cap (E cup G)$
                   & $E cap (F cup G) = (E cap F) cup (E cap G)$
addlinespace
Leggi di De Morgan & $(E cup F)^c = E^c cap F^c$
                   & $(E cap F)^c = E^c cup F^c$
addlinespace
Leggi di identità & $Ecupvemptyset=E$
                  & $EcapOmega=E$
bottomrule
end{tabular}
end{center}

end{document}

enter image description here

Depending on the context, you may want to remove the rules above and below. Capitalization is not used in Italian.

The hack can be realized in different ways.

Correct answer by egreg on April 7, 2021

documentclass{article}
usepackage{amsmath}

begin{document}
begin{alignat*}{2}
  text{Leggi Commutative}  & qquad & E cup F          &= F cup E                   
                            &        & E cap F          &= F cap E                   [10pt]
  text{Leggi Associative}  &        & (E cup F) cup G &= E cup (F cup G)          
                            &        & (E cap F) cap G &= E cap (F cap G)          [10pt]
  text{Leggi Distributive} &        & E cup (F cap G) &= (E cup F) cap (E cup G) 
                            &        & E cap (F cup G) &= (E cap F) cup (E cap G) [10pt]
  text{Leggi di De Morgan} &        & (E cup F)^c      &= E^c cap F^c               
                            &        & (E cap F)^c      &= E^c cup F^c                
end{alignat*}
end{document}

enter image description here

Answered by leandriis on April 7, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP