[texhax] problem with align environment

Don Gingrich gingrich at rmit.edu.au
Tue Feb 17 23:47:28 CET 2009

This one is a bit strange since the problem manifests
as an error in the *second* use of the environment
even though it looks like the real problem is in the
*first* use of the environment. It's no a showstopper
since pdflatex eventually sorts out something that
works after generating 8 error messages.

I've tried to include enough information -- and hopefully
not too much. The information abut setup and packages,
possibly even order of packages, seemed likely to be

I've tried plain LaTeX on the source and it barfs
all over the place, so AFAIK it needs to be pdflatex.

Also, note that I have inherited the code from someone
else. While looking at the following Boolean algebra
in the text, (which was originally done in \tt with
a stack of $...$ markers) I concluded that it would
look a lot better in a proper math environment.
Align looked like the best choice, but I could be
wrong in this conclusion.

Thanks for looking at this -- my current theory is
that my problem may have something to do with comments
in text that then go back into math mode in the align
section that runs from line 465-473, but I cannot see 
any obvious solution -- when I tried fiddling this,
the whole thing "blew up"

Thanks again,

the code: (line numbers in [square brackets] )

\begin{align*}      % [465]
Z &= A.B.C + A.\overline{B}.(\overline{\overline{A}.\overline{C}})  && \text{; de Morgan's theorem} \\
 &= A.B.C + A.\overline{B}.(\overline{\overline{A}} + \overline{\overline{C}})  &&\text{ ; }A = \overline{\overline{A}} \\
 &= A.B.C + A.\overline{B}.(A + C) && \text{ } \\
 &= A.B.C + A.\overline{B}.A + A.\overline{B}.C && \text{; multiply out} \\
 &= A.B.C + A.\overline{B} + A.\overline{B}.C &&  \text{; since } A.A = A \\
 &= A.C(B + \overline{B}) + A.\overline{B}  && \text{; common factor}  AC, B + \overline{B} = 1\\
 &= A.C + A.\overline{B} \\
\end{align*}   % [473]

\subsubsection{Simplification example}

Trace the operations of the following example, and make sure that you can relate each
operation to the rules above.

\begin{align*}  % [482]
        Z &= \overline{(\overline{A}.\overline{B} + C)} + (B.C) \\
          &= (\overline{\overline{A}.\overline{B}}.\overline{C}) + B.C    \\
          &= (\overline{\overline{A}} + \overline{\overline{B}}).$\overline{C} + BC \\
          &= (A + B).\overline{C} + B.C \\
          &= A.\overline{C} + B.\overline{C} + B.C \\
          &= A.\overline{C} + B.(\overline{C} + C)\\
          &= A.\overline{C} + B \\
\end{align*}  % [490 ]

error messages from pdflatex follow: (I just keep hitting <enter>
until the processing resumes since I don't have a clue what the 
processor is complaining about.)
Underfull \hbox (badness 10000) in paragraph at lines 453--454

! Missing } inserted.
<inserted text>
l.490 \end{align*}

! Missing $ inserted.
<inserted text>
l.490 \end{align*}

! Missing { inserted.
<inserted text>
l.490 \end{align*}

! Missing } inserted.
<inserted text>
l.490 \end{align*}

! Missing $ inserted.
<inserted text>
l.490 \end{align*}

! Missing \endgroup inserted.
<inserted text>
l.490 \end{align*}

! Misplaced \omit.
<recently read> \omit

l.490 \end{align*}

! Missing { inserted.
<inserted text>
l.490 \end{align*}



Header and wrapper file that has all of the \usepackage directives:
(it had a stack of comments that I've dropped for brevity

\usepackage{fancyhdr} % Not a default package
\usepackage{fancybox} % Not a default package

%% [snip]

%% [snip]

%% This ends the preamble.  Start the document and initialize the
%% specific header style.  Also set the pagestyle to fancy


%% [snip]

%%  \include{cs1dack}
%%  \include{phddeclaration}
%%  \include{phdded}

\include{phdemptypage}  %(For booklet: Acts as \newpage)
%% Fix the header now that we are in the chapter sections
%% Go to arabic page numbers
%% the rest of the chapters include here


Don Gingrich
gingrich at rmit.edu.au       School of CSIT, RMIT Melbourne, Au
gingrich at acm.org           don.gingrich at member.sage-au.org.au
http://www.cs.rmit.edu.au/~gingrich for gpg public key

More information about the texhax mailing list