3

I have an array that I had past help on and now I am attempting to modify that array. However, when doing so, parts of my "theorem" keep getting shifted to the next line.

Here is a MWE:

\documentclass{article}
\usepackage{amsmath,array}% http://ctan.org/pkg/{amsmath,array}
\newcommand{\twolinebrace}{\rlap{$\smash{\raisebox{.5\height}{\bigg\}}}$}}
\newlength{\LHS}\newlength{\RHS}
\newcolumntype{M}{>{$}p{\LHS}<{$}}
\newcolumntype{N}{>{$}p{\RHS}<{$}}
\begin{document}
\begin{theorem}
Let $\{A_{\alpha \colon \alpha \in A}\}$ and $\{B_{\beta \colon \beta \in  B}\}$ be families of subsets if a set $X$. Then:
\[
\renewcommand{\arraystretch}{1.1}
\begin{array}{@{}l@{\quad}l@{}}
\left.\kern-\nulldelimiterspace\\
             \begin{array}                                                                       {>{\bfseries}p{2em}@{\quad}M@{\quad$=$\quad}N}
  (a) & \big(\bigcup_{\alpha\in A} A_{\alpha}\big) \cup \big(\bigcup_{\beta\in B} B_{\beta}\big) & \bigcup_{(\alpha,\beta)} A_{\alpha} \cup B_{\beta}\\
  (b) & \bigg(\bigcap_{\alpha \in A A_{\alpha}} \bigg) \cap \bigg(\bigcap_{\beta \in B B_{\beta}} \bigg) &  \bigcap_{(\alpha,\beta)} A_{\alpha} \cap B_{\beta} 
\end{array}\right\} & {\text{Associative Laws}} \\
\left.\kern-\nulldelimiterspace\begin{array}{>{\bfseries}p{2em}@{\quad}M@{\quad$=$\quad}N}
  (c) & X \cup (Y \cup Z) & (X \cup Y) \cup Z \\
  (d) & X \cap (Y \cap Z) & (X \cap Y) \cap Z 
\end{array}\right\} & {\text{Associative Laws}} \\
\left.\kern-\nulldelimiterspace\begin{array}{>{\bfseries}p{2em}@{\quad}M@{\quad$=$\quad}N}
  (e) & X \cup (Y \cap Z) & (X \cup Y) \cap (X \cup Z) \\
  (f) & X \cap (Y \cup Z) & (X \cap Y) \cup (X \cap Z)
\end{array}\right\} & {\text{Distributive Laws}} \\
\end{array}
\]
\end{theorem}
\end{document}

I needed to add to my array, and now I am having additional problems. Now, the "text" 'Associative Laws', 'Distributive Laws', and 'de Morgan's Laws' are not being displayed correctly. Here is my latest MWE:

\documentclass{article}
\usepackage{amsmath,array}% http://ctan.org/pkg/{amsmath,array}
\newcommand{\twolinebrace}{\rlap{$\smash{\raisebox{.5\height}{\bigg\}}}$}}
\newlength{\LHS}\newlength{\RHS}
\newcolumntype{M}{>{$}p{\LHS}<{$}}
\newcolumntype{N}{>{$}p{\RHS}<{$}}
\begin{document}
\begin{theorem}
Let $\{A_{\alpha \colon \alpha \in A}\}$ and $\{B_{\beta \colon \beta \in  B}\}$ be families of subsets of a set~$X$. Then:
\[
\renewcommand{\arraystretch}{1.25}
\begin{array}{@{}l@{\quad}l@{}}
\left.\kern-\nulldelimiterspace\begin{array}{>{\bfseries}p{2em}@{\quad}M@{\quad$=$\quad}N}
(a) & X \cup Y &  Y \cup X \\
  (b) & X \cap Y &  X \cap Y
\end{array}\right\} & {\text{Commutative Laws}} \\
\left.\kern-\nulldelimiterspace\begin{array}{>{\bfseries}p{2em}@{\quad}M@{\quad$=$\quad}N}
(c) & X \cup (Y \cup Z) & (X \cup Y) \cup Z \\
  (d) & X \cap (Y \cap Z) & (X \cap Y) \cap Z 
\end{array}\right\} & {\text{Associative Laws}} \\
\left.\kern-\nulldelimiterspace\begin{array}{>{\bfseries}p{2em}@{\quad}M@{\quad$=$\quad}N}
(e) & X \cup (Y \cap Z) & (X \cup Y) \cap (X \cup Z) \\
  (f) & X \cap (Y \cup Z) & (X \cap Y) \cup (X \cap Z)
\end{array}\right\} & {\text{Distributive Laws}} \\
\end{array}
\]
\end{theorem}

Any additional help would be greatly appreciated in this matter.

  • 1
    for a beginning, the two new lengths, \LHS and \RHS, haven't been assigned any values, so those lengths are effectively zero. there may be other problems as well, but zero lengths are useful only in very special circumstances, and as widths for table columns isn't one of those. – barbara beeton Nov 3 '13 at 11:25
  • as in your original example, \LHS and \RHS are still zero width. this new example would benefit from either of the answers that have already been given. or you could \setlength{\LHS}{.75in}\setlength{\RHS}{1.5in} and at least get something that doesn't overprint. – barbara beeton Dec 23 '13 at 20:35
  • @barbarabeeton In my preamble file, I had the following: \newlength{\LHS}\newlength{\RHS} and added your suggested code below that, yet when I compiled I still had the "overprinting" problem. Or am I still doing something wrong? – Michael Dykes Dec 26 '13 at 21:42
2
+50

Perhaps the following is a little cleaner:

enter image description here

\documentclass{article}
\usepackage{amsmath,amsthm,array}% http://ctan.org/pkg/{amsmath,amsthm,array}
\newcommand{\twolinebrace}{\left.\kern-\nulldelimiterspace\begin{array}{@{}c@{}}\\\\\end{array}\right\}}
\newtheorem{theorem}{Theorem}
\begin{document}
\begin{theorem}
Let $\{A_{\alpha \colon \alpha \in A}\}$ and $\{B_{\beta \colon \beta \in  B}\}$ be families of subsets if a set~$X$. Then:
\[
  \renewcommand{\arraystretch}{1.25}
  \begin{array}{@{}l@{\quad}l@{}}
    \begin{array}{>{\bfseries}p{2em}@{\quad}r@{{}={}}l}
      (a) & 
        \big(\bigcup_{\alpha\in A} A_{\alpha}\big) \cup \big(\bigcup_{\beta\in B} B_{\beta}\big) & % LHS
        \bigcup_{(\alpha,\beta)} A_{\alpha} \cup B_{\beta} \\ % RHS
      (b) & 
        \big(\bigcap_{\alpha \in A} A_{\alpha} \big) \cap \big(\bigcap_{\beta \in B} B_{\beta} \big) & % LHS
        \bigcap_{(\alpha,\beta)} A_{\alpha} \cap B_{\beta} % RHS
    \end{array} & \twolinebrace\text{Associative Laws} \\
    \begin{array}{>{\bfseries}p{2em}@{\quad}r@{{}={}}l}
      (c) & 
        X \cup (Y \cup Z) & % LHS
        (X \cup Y) \cup Z \\ % RHS
      (d) & 
        X \cap (Y \cap Z) & % LHS
        (X \cap Y) \cap Z % RHS
    \end{array} & \twolinebrace\text{Associative Laws} \\
    \begin{array}{>{\bfseries}p{2em}@{\quad}r@{{}={}}l}
      (e) & 
        X \cup (Y \cap Z) & % LHS
        (X \cup Y) \cap (X \cup Z) \\ % RHS
      (f) & 
        X \cap (Y \cup Z) & % LHS
        (X \cap Y) \cup (X \cap Z) % RHS
    \end{array} & \twolinebrace\text{Distributive Laws}
  \end{array}
\]
\end{theorem}
\end{document}

Note that using an array like this (or even just setting the content in a display \[...\]) it can't be broken across the page boundary. If you wish to overcome this limitation, you'll have to set the display as a list rather, or break it up into separate chunks containing each "law pair", allowing content to break inbetween.

2

Just a different flavor to the above though I do not recommend it for multiple uses. The reason being that you would have to adjust the labels each time. But anyhow here it is:

\documentclass{article}
\usepackage{amsmath,amsthm}% http://ctan.org/pkg/{amsmath,array}
\usepackage{picture}
\usepackage{enumitem}
\newtheorem{theorem}{Theorem}
\begin{document}
\begin{theorem}
Let $\{A_{\alpha \colon \alpha \in A}\}$ and $\{B_{\beta \colon \beta \in  B}\}$ be families of subsets if a set $X$. Then:
\begin{enumerate}[label=\bfseries(\alph*)]
    \item $\big(\bigcup_{\alpha\in A} A_{\alpha}\big) \cup \big(\bigcup_{\beta\in B} B_{\beta}\big) = \bigcup_{(\alpha,\beta)} A_{\alpha} \cup B_{\beta}$
    \item $\big(\bigcap_{\alpha \in A} A_{\alpha} \big) \cap \big(\bigcap_{\beta \in B} B_{\beta} \big)=\bigcap_{(\alpha,\beta)} A_{\alpha} \cap B_{\beta}$
                \makebox(0,0){\put(0,10ex){%
               $\left.\rule{0pt}{5ex}\right\}$ Associative Laws}}
    \item $X \cup (Y \cup Z)= (X \cup Y) \cup Z$  
  \item $X \cap (Y \cap Z) = (X \cap Y) \cap Z$
                \makebox(0,0){\put(7em,10ex){%
               $\left.\rule{0pt}{5ex}\right\}$ Associative Laws}}
  \item $X \cup (Y \cap Z) = (X \cup Y) \cap (X \cup Z)$
  \item $X \cap (Y \cup Z) = (X \cap Y) \cup (X \cap Z)$
                \makebox(0,0){\put(4.25em,10ex){%
               $\left.\rule{0pt}{5ex}\right\}$ Distributive Laws}}
\end{enumerate}
\end{theorem}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.