[texhax] fbox in align environment

Sebastian Canagaratna s-canagaratna at onu.edu
Tue Jun 16 17:52:15 CEST 2009


Phil: 
   Thanks for the note. Shortly after I posted my comments about
Krishnan's
code, I tried to add a further boxed equation of different length, a = b
+ c + d. The boxes, and the other unboxed equations don't behave well at
all. Even with your suggestion, the behavior is not good.

   Your code is robust, even when more then one boxed equation is used.
I noticed though, that trying to change the size of the box with
\fboxsep created some problems. It would be nice the have some option to
be able to change the size of the box, without interfering with the
alignment.

Sebastian.


On Tue, Jun 16, 2009 at 10:10:30AM +0200, Philip G. Ratcliffe wrote:
> >    \usepackage{amsmath}
> > 
> >    \begin{equation*}
> >      \setlength{\arraycolsep}{0pt}
> >      \renewcommand{\arraystretch}{1.25}
> >      \begin{array}{r@{\;}c@{\;}r@{\;}}
> >        x+y+2    & = & 1\\
> >        2x+3y-4z & = & 2\\
> >        \hline
> >        \multicolumn{1}{|r@{\;}}{3x-2y+z}
> >        & \multicolumn{1}{c@{\;}}{=}
> >        & \multicolumn{1}{r@{\;}|}{3}\\
> >        \hline
> >      \end{array}
> >    \end{equation*}
> 
> A couple of comments:
> 
> 1. the alignment of the third column ought to be with "l" (not "r");
> 2. if, e.g., the r.h.s. of one of the first two equations is longer (say,
> 1+p) then the output looks a little odd since the box is always as wide as
> the table and not a given entry (the same is also true w.r.t. the l.h.s.).
> 
> Cheers,  Phil
> 


More information about the texhax mailing list