Kai Johannes Keller schrieb:

> So, do you think it's possible to frame some of the formulas and display the others
> without frame - maybe some new environment: "framed equation" - do you have any
> experiences in sucher things? -because I don't.


attached a LyX layout file addons.inc. Insert it
into ~/.lyx/layouts/article.layout (or stdclass.inc
if you want to have it in all classes) with

\Input addons.inc

restart LyX and you should have from the layout list
a "framedEquation". If you write default text with this
style you get it as a warning in blue (see example).
But it doesn't hurt it is printed as default text.

Everytime when you want to frame an equation choose
from the list layout framedEquation, that's all.
Switching back to default -> change layout to standard

Herbert


-- http://www.pstricks.de/

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

\layout Standard

The next paragraph is a Style framedEquation
\layout FramedEquation


\begin_inset Formula \begin{equation}
\alpha=\frac{\partial\beta}{\partial\gamma}\label{eq:1}\end{equation}

\end_inset 


\layout Standard

To take reference on equation 
\begin_inset LatexCommand \prettyref{eq:1}

\end_inset 

 is as easy as before.
\layout Standard

And it doesn't matter how big or small the equation is:
\layout Standard


\begin_inset Formula \begin{equation}
\left(\frac{\sum\limits 
_{k=0}^{\infty}A_{k}}{2\frac{5}{7}}\exp\left[\frac{rst}{\alpha\beta\gamma}\right]\right)=\left\{
 \begin{array}{c}
213\quad k=\alpha\\
25398\quad k=\beta\\
0\quad k=\gamma\end{array}\right.\end{equation}

\end_inset 


\layout Standard

Again a framed one
\layout FramedEquation


\begin_inset Formula \begin{equation}
\left(\frac{\sum\limits 
_{k=0}^{\infty}A_{k}}{2\frac{5}{7}}\exp\left[\frac{rst}{\alpha\beta\gamma}\right]\right)=\left\{
 \begin{array}{c}
213\quad k=\alpha\\
25398\quad k=\beta\\
0\quad k=\gamma\end{array}\right.\end{equation}

\end_inset 


\the_end

# Extended textclass definition file. 
# Author : Herbert Voss <[EMAIL PROTECTED]> 20030809
# 
#===================================================================
# Style FramedEquation - Herbert Voss 20030809
#===================================================================
Style FramedEquation
  Margin                Static
  LatexType             Command
  LatexName             framedEquation
  Font
    Shape               Normal
    Color               blue
  EndFont
  Preamble
    \newsavebox{\ggbox}
    \let\OldEquation\equation
    \let\OldEndEquation\endequation
    \def\restoreEquation{%
      \let\equation\OldEquation
      \let\endequation\OldEndEquation
    }
    \def\framedEquation#1{%
      \def\equation{%
        $$\refstepcounter{equation}%
        \begin{lrbox}{\ggbox}%
        $\displaystyle%
     }
     \def\endequation{%
       $\end{lrbox}%
       \fbox{\usebox{\ggbox}}%
       \eqno [EMAIL PROTECTED]@ignoretrue%
       \restoreEquation%
     }
     #1%
     \restoreEquation%
    }
  EndPreamble
End


Reply via email to