Hello,

I'm probably missing something, but what is wrong with the \boxed{} command in AMS? In the QT version you even see the box in LyX.

Amir.

Kai Johannes Keller wrote:
Hello everybody,

for everybody who wants some frame DIRECTLY AROUND THE EQUATION, and not
over the whole width of the page, AND NUMBERING OUTSIDE THE FRAME, this
may be interesting: I've modified some solution (by Phillip Helbig) from
the Googlegroups-mail-archieve, which draws the frame in an
LaTeX-document, so that it can be used in LyX. All one has to do is:

1. define the following "savebox" the document-header:

\newsavebox{\ggbox}

2. define a new macro by typing:

\newcommand{\equationbox}[1]
{\savebox{\ggbox}{$\displaystyle #1$}\fbox{\usebox{\ggbox}}},

(afterwards marking it and typing C-m)

Of course there are disadvantages, especially the ERT displayed around the framed equation in LyX-output, but I hope th fix this somehow - perhaps somebody of you has an idea how to implement this better.


I think it works, because the argument of \fbox is no longer some "equation code" (\alpha,\frac etc.), but another box.

And best thing is: One can theres no problem with the references, because of
two defined eqnarrays in two boxes like its on the previous solution (see the last mails concerning this topic). References are easily handeled, like before with the
LyX-menu.


-Kai-





#LyX 1.2 created this file. For more info see http://www.lyx.org/
\lyxformat 220
\textclass article
\language english
\inputencoding auto
\fontscheme default
\graphics default
\paperfontsize default
\spacing single 
\papersize a4paper
\paperpackage a4
\use_geometry 0
\use_amsmath 1
\use_natbib 0
\use_numerical_citations 0
\paperorientation portrait
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language english
\quotes_times 2
\papercolumns 1
\papersides 1
\paperpagestyle default

\layout Standard

Framed equation without numbering
\begin_inset Formula \[
\boxed {a+b=c}\]

\end_inset 

and framed equation with numbering
\begin_inset Formula \begin{equation}
\boxed {a+\frac{b}{c}=d}\end{equation}

\end_inset 


\the_end

Reply via email to