localghost wrote:kostka wrote:[...] I suppose using the framed environment would work as well, as long as the functionality is identical to fbox, but I'd still like to know if the scenario in the OP is possible.
Don't suppose, just test. The
framed package as suggested by
frabjous is the solution to your scenario. But for emphasized equations the
empheq package from the
mh bundle is better.
Best regards
Thorsten
Thanks for mentioning the empheq package, which I was not aware of.
Anyhow, the framed environment does not seem to work as 1) it resets the paragraph indentation for the next line, even if no space is skipped and 2) it adds too much space (though this point can likely be fixed).
The empheq package doesn't seem to be able to box both the equation and its number, which is what I'm after.
For now I suppose I'll have to settle for using
Code: Select all
\newcommand{\boxedeqn}[1]{%
\[\fbox{%
\addtolength{\linewidth}{-2\fboxsep}%
\addtolength{\linewidth}{-2\fboxrule}%
\begin{minipage}{\linewidth}%
\begin{equation}#1\end{equation}%
\end{minipage}%
}\]%
}
which produces exactly the behavior I want, even though it makes boxed equations look different in the .tex file from normal equations.
Thanks for all the comments.
