[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
significant.

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,
-Don



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

[125]
! 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>
                \endgroup
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
-----------------------------------------------------------------------

\documentclass[11pt,A4]{report}
%%\usepackage{psfig}
\usepackage{fancyhdr} % Not a default package
\usepackage{fancybox} % Not a default package
\usepackage{latexsym}
\usepackage{graphicx}
\usepackage{url}
\usepackage{amsmath}
\usepackage{verbatim}
\usepackage{moreverb}
\usepackage{./uitlistings}
%%\usepackage{pdfsync}
%%\usepackage{hyperref}

%% [snip]

\newlength{\InitialBLS}
\setlength{\InitialBLS}{\baselineskip}
\setlength{\parindent}{0cm}
\pagenumbering{roman}
%%
%% [snip]
%%
\include{definitions}
\include{phdfancydefs}
\include{addresses}
\pagestyle{fancy}
\setlength{\leftmargini}{4mm}
\setlength{\leftmarginii}{4mm}
\setlength{\leftmarginiii}{4mm}

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

\renewcommand{\headrulewidth}{0.0pt}
\renewcommand{\footrulewidth}{0.0pt}
\setlength{\topmargin}{-5mm}
\setlength{\oddsidemargin}{15mm}
\setlength{\evensidemargin}{15mm}


%% [snip]
\include{lecttitle}
\include{cs1ack}
\include{courseguide}
\include{lectintro}

%%  \include{cs1dack}
%%  \include{phddeclaration}
%%  \include{phdded}
   \tableofcontents
   \setcounter{tocdepth}{2}
   \listoffigures
   \listoftables
   \uitlistoflistings

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

\end{document}




-- 
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