[texhax] fbox in align environment

E. Krishnan ekmath at asianetindia.com
Wed Jun 17 19:45:54 CEST 2009


On Tue, 16 Jun 2009, Sebastian Canagaratna wrote:

> Can it be made to work directly with pdflatex?

How about this?

   \usepackage{calc}

   \newlength{\eqwd}
   \newlength{\eqht}
   \newlength{\eqdp}
   \newlength{\shift}

   \newcommand{\mkeqbx}[1]{%
   \settowidth{\eqwd}{$#1$}%
   \settoheight{\eqht}{$#1$}%
   \settodepth{\eqdp}{$#1$}%
   \setlength{\shift}{\eqwd+3pt}
   \hspace{-\shift}%
   \framebox{\rule[-\eqdp]{0pt}{\eqht+\eqdp}\hphantom{$#1$}}}


   \begin{align*}
     x+y+2    & = 1\\
     2x+3y-4z & = 2\\
     3x-2y+z  & =3%
     \mkeqbx{3x-2y+z=3}\\
     a        & = b+c+d%
     \mkeqbx{a=b+c+d}\\
   \end{align*}





-- 
Krishnan


More information about the texhax mailing list