1

I've read questions asking about align across multiple environments, but still am stumped about how I might address this situation.

The following code:

\section*{Solutions to Practice Problems}

\begin{enumerate}
    \item Write down the meaning of the Commutative, Associative and Distributive properties.  Create an example
    that shows how each one works.\\[-2em]
    \begin{align*}
    \intertext{
    \begin{description}[noitemsep, topsep=0pt]
        \item[Commutative Property:] The order in which terms appear can be changed, but the 
            result remains unchanged.
            \begin{example*} \end{example*}
    \end{description}
            }\\[-2em]
            &&& \text{(Addition)}   &   1,000 + x \ &= \ x + 1,000 &&&\\
            &&& \text{(Multiplication)}  &  ab \ &= \ ba &&&
    \intertext{
    \begin{description}[noitemsep, topsep=0pt]
        \item[Associative Property:] The order in which terms are \emph{grouped together} can be changed, 
            but the result remains unchanged.
            \begin{example*} \end{example*}
    \end{description}
            }\\[-2em]
            &&& \text{(Addition)}   &       (1,000 + 500) + y \ &= \ 1,000 + (500 + y) &&& \\
            &&& \text{(Multiplication)} &   a(bc) \ &= \ (ab)c &&&
    \intertext{
    \begin{description}[noitemsep, topsep=0pt]
        \item[Distributive Property:] The product of the sums equals the sum of the products.
            \begin{example*} \end{example*}
    \end{description}
            }\\[-2em]
            &&& \text{(Numbers only)} &     3(40 - 2) \ &= \ 3 \cdot 40 - 3 \cdot 2 &&& \\
            &&& \text{(With variables)} &   5(x - 12) \ &= \ 5x - 60 &&& \\
    \end{align*}
\item Write down the meaning of the Additive and Multiplicative Identity properties.  Create an example that
    shows how each one works.
    \begin{align*}
    \intertext{
    \begin{description}[noitemsep, topsep=0pt]
        \item[Additive Identity:]  There exists a number 0 such that addition with 0 and another term leaves the 
            term unchanged.
            \begin{example*} \end{example*}
    \end{description}
            }\\[-2em]
            &&& \text{(Numbers)}    &   1,000 + 0 \ &= \ 1,000 &&&\\
            &&& \text{(Variables)}      &   x + 0  \ &= \ x &&&
    \intertext{
    \begin{description}[noitemsep, topsep=0pt]
        \item[Multiplicative Identity:] There exists a number 1 such that multiplication with 1 and another term 
            leaves the term unchanged.
            \begin{example*} \end{example*}
    \end{description}
            }\\[-2em]
            &&& \text{(Numbers)}    &   12 \cdot 1 \ &= \ 12 &&& \\
            &&& \text{(Variables)}  &   x \cdot 1 \ &= \ x &&&
    \end{align*}

produces this result:

Sample Result

I can fudge this enough to align equations within each item, but not across items. What I'm looking for is uniformity with left aligning the (Numbers) text across every item, and ideally aligning every equation at the = sign across items. The closest question I found to this is here. I am looking for only a slight modification to what I have here, if possible.

If not, then are there ways to set "global" align parameters throughout a document that can be across multiple align environments?

2

For code readability you may be better off to set the content using a specially-formed array:

enter image description here

\documentclass{article}
\usepackage[margin=1in]{geometry}% Just for this example
\usepackage{amsmath,array,enumitem}
\newlength{\LHS}
\newlength{\RHS}
\newenvironment{bigalign}
  {\[% http://tex.stackexchange.com/q/31672/5764
     %\renewcommand{\arraystretch}{1.5}% Stretch array vertically
     \begin{array}{p{7em}>{\raggedleft$}p{\LHS}<{$}@{}>{${}}p{\RHS}<{$}}}
  {\end{array}\]}
\begin{document}

\begin{enumerate}
  \settowidth{\LHS}{$(1\,000 + 500) + y$}% Longest left-hand side
  \settowidth{\RHS}{${}= 1\,000 + (500 + y)$}% Longest right-hand side
  \item Write down the meaning of the Commutative, Associative and Distributive properties.  Create an example
    that shows how each one works.

    \begin{description}[noitemsep, topsep=0pt]
      \item[Commutative Property:] The order in which terms appear can be changed, but the 
        result remains unchanged.

        \textbf{Example.}
          \begin{bigalign}
            \text{(Addition)}       &         1\,000 + x &= x + 1\,000 \\
            \text{(Multiplication)} &                 ab &= ba
          \end{bigalign}

      \item[Associative Property:] The order in which terms are \emph{grouped together} can be changed, 
        but the result remains unchanged.

        \textbf{Example.}
          \begin{bigalign}
            \text{(Addition)}       & (1\,000 + 500) + y &= 1\,000 + (500 + y) \\
            \text{(Multiplication)} &              a(bc) &= (ab)c
          \end{bigalign}

      \item[Distributive Property:] The product of the sums equals the sum of the products.

        \textbf{Example.}
          \begin{bigalign}
            \text{(Numbers only)}   &          3(40 - 2) &= 3 \cdot 40 - 3 \cdot 2 \\
            \text{(With variables)} &          5(x - 12) &= 5x - 60 \\
          \end{bigalign}

    \end{description}

  \item Write down the meaning of the Additive and Multiplicative Identity properties. Create an example that
    shows how each one works.

    \begin{description}[noitemsep, topsep=0pt]
      \item[Additive Identity:]  There exists a number 0 such that addition with 0 and another term leaves the 
        term unchanged.

        \textbf{Example.}
        \begin{bigalign}
          \text{(Numbers)}        &         1\,000 + 0 &= 1\,000 \\
          \text{(Variables)}      &              x + 0 &= x
        \end{bigalign}

      \item[Multiplicative Identity:] There exists a number 1 such that multiplication with 1 and another term 
        leaves the term unchanged.

        \textbf{Example.}
        \begin{bigalign}
          \text{(Numbers)}        &         12 \cdot 1 &= 12 \\
          \text{(Variables)}      &          x \cdot 1 &= x
        \end{bigalign}

    \end{description}
\end{enumerate}

\end{document}

The array (hidden inside bigalign) uses a fixed-width columns for each of the components. The first column is the left-most notation. I chose 7em since it provided a nice gap between the notation and the other content. The second column is also a fixed-width column, just like the third, but measured to the widest element across the alignments (the \settowidth commands). On the left-hand side, the widest element is (1\,000 + 500) + y, while the widest element on the right-hand side is = 1\,000 + (500 + y).

You may want to increase \arraystretch to suit your needs. I've kept it at 1 for the example.

  • Thank you this is perfect! Incidentally, I was using 'array' at first, which had much better vertical spacing, but then ran across alignment problems between items. Thank you so much again for the clarification. – Abbas Jaffary Feb 23 '15 at 17:48

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.