Am Sam, 2003-08-09 um 09.55 schrieb Herbert Voß: > there is no difference in using fbox directly > > \equationbox{\int\limits_2^{\infty}\frac{1}{x}dx=0.25} > \fbox{$\displaystyle\int\limits_2^{\infty}\frac{1}{x}dx=0.25$} > > You always use inline math, which is very easy to frame > and so there is no need for an separate box. > A problem is a framed display math. There is a solution > with package varwidth >
I don't know exacly why, but the solution I introduced in the last message works for the centered mathboxes (I think that's what "display math" means), too. So just to be sure we are talking about the same thing, I've attached a LyX-example-file. Would be grateful, if you could tell me why it works. -Kai- PS: There needs to be the \newsavebox{ggbox} in the document header, I don't know if this is part of the lyx-file or of my environment. -- Kai Johannes Keller <[EMAIL PROTECTED]>
#LyX 1.3 created this file. For more info see http://www.lyx.org/ \lyxformat 221 \textclass book \begin_preamble \usepackage{amssymb,bbm,mathrsfs} \input{/home/kai/LaTeX-Pakete/slashed.sty} \renewcommand{\vec}[1]{\mathbf{#1}} \newcommand{\Nabla}{\boldsymbol{\nabla}} \newcommand{\bs}[1]{\boldsymbol{#1}} \newcommand{\id}{\mathrm{id}} \newcommand{\hodge}{\star} \newcommand{\diag}{\rm{diag}} \newcommand{\openone}{\mathbbm 1} \newcommand{\grad}{\mathrm{grad }} \newcommand{\rot}{\mathrm{rot }} \newcommand{\dbar}{\slashed{d}} \newcommand{\extr}{\rm{extr}} \newcommand{\ubar}[1]{\underbar{#1}} %%Physikalische Einheiten: \newcommand{\m}{\rm{m}} \newcommand{\kg}{\rm{kg}} \newcommand{\s}{\rm{s}} \newcommand{\K}{\rm{K}} \newcommand{\Pa}{\rm{Pa}} \newcommand{\atm}{\rm{atm}} %%Alphabetisches \newcommand{\E}{\mathcal E} \newsavebox{\ggbox} \end_preamble \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 2.5cm \rightmargin 2cm \secnumdepth 2 \tocdepth 3 \paragraph_separation skip \defskip medskip \quotes_language english \quotes_times 2 \papercolumns 1 \papersides 2 \paperpagestyle default \layout Standard \begin_inset FormulaMacro \newcommand{\eqbox}[1]{\savebox{\ggbox}{${\displaystyle #1}$}\fbox{\usebox{\ggbox}}} \end_inset \layout Standard \begin_inset Formula \begin{equation} \eqbox{\alpha=\frac{\partial\beta}{\partial\gamma}}\label{eq:}\end{equation} \end_inset \layout Standard To take reference on equation \begin_inset LatexCommand \prettyref{eq:} \end_inset is as easy as before. \layout Standard And it doesn't matter how big or small the equation is: \begin_inset Formula \begin{equation} \eqbox{\left(\frac{\sum_{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.}\label{eq2}\end{equation} \end_inset \the_end