Oscar Lopez wrote:
> \newcommand{\myBoxIII}[1]{\hspace{1cm}\hfill%
> \fbox{%
> \parbox{5cm}{#1}%
> }%
> \hfill%
> \parbox{0.5cm}{%
> \begin{eqnarray} \\ \\ \end{eqnarray}%
> }
> }
>
> ..........................
>
> but now my question is there exists any way to adjust automatically the
> size of the boxes ? It is a little bit painful try to adjust the size by
> hand, but if there isn't other solution, ....,
ok, here it comes ... not easy, but it's what you want ;-)
now \mybox{the lyx formula}
gives a boxed formula with a optimized frame. the value for \parbox in
\newcommand\myBox ... is no more important, but don't leave it blank,
latex needs a value. i choose the tex-code from fancybox.sty where
the Beqnarray is defined.
\renewenvironment{eqnarray}%
{% code for \begin{}
\stepcounter{equation}%
\let\@currentlabel\theequation
\def\@eqnnum{{\csname reset@font\endcsname\rm (\theequation)}}%
\global\@eqnswtrue\m@th
\global\@eqcnt\z@
\tabskip\@centering
\let\\\@eqncr
\vbox\bgroup
\halign\bgroup
\@eqnsel
\hskip\@centering
$\displaystyle\tabskip\z@{##}$%
&\global\@eqcnt\@ne
\hskip 2\arraycolsep
\hfil${##}$\hfil
&\global\@eqcnt\tw@
\hskip 2\arraycolsep
$\displaystyle\tabskip\z@{##}$%
\hfil
\tabskip\@centering
&\if@eqnsw\hskip 1em\fi
\hfil{##}\tabskip\z@
\cr%
}%
{% code for \end{}
\@@eqncr
\egroup
\global\advance\c@equation\m@ne
\egroup
\global\@ignoretrue%
}
Herbert
--
[EMAIL PROTECTED]
http://perce.de/voss