Defining frame-like commands
![](https://secure.gravatar.com/avatar/d246baeefae20788d6ea519b777a99c7.jpg?s=120&d=mm&r=g)
Hi, I'm feeling like I'm getting close to the daily limit of posts to the list;), but I'm just learning;). I discovered that I can use \defineframed so that I can write \defineframed[myframed][frame=off,background=myoverlay] \myframed{whatever} But I'd like to have "my" counterparts of \inframed, \mframed and \inmframed. Is there any \define-like command for that, too, or do I have to resort to plain old \def? Regards, -- Marcin Borkowski
![](https://secure.gravatar.com/avatar/93131e1e6e2204bd13501390d768dbdc.jpg?s=120&d=mm&r=g)
Am 03.08.2011 um 15:27 schrieb Marcin Borkowski:
Hi,
I'm feeling like I'm getting close to the daily limit of posts to the list;), but I'm just learning;).
I discovered that I can use \defineframed so that I can write
\defineframed[myframed][frame=off,background=myoverlay]
\myframed{whatever}
But I'd like to have "my" counterparts of \inframed, \mframed and \inmframed. Is there any \define-like command for that, too, or do I have to resort to plain old \def?
\defineframed[mathframe][align=right,top=\startmathmode,bottom=\stopmathmode] % location=low \starttext \framed{x^2} \mframed{x^2} \mathframe{x^2} \stoptext Wolfgang
![](https://secure.gravatar.com/avatar/d246baeefae20788d6ea519b777a99c7.jpg?s=120&d=mm&r=g)
Dnia 2011-08-03, o godz. 18:12:27
Wolfgang Schuster
Am 03.08.2011 um 15:27 schrieb Marcin Borkowski:
Hi,
I'm feeling like I'm getting close to the daily limit of posts to the list;), but I'm just learning;).
I discovered that I can use \defineframed so that I can write
\defineframed[myframed][frame=off,background=myoverlay]
\myframed{whatever}
But I'd like to have "my" counterparts of \inframed, \mframed and \inmframed. Is there any \define-like command for that, too, or do I have to resort to plain old \def?
\defineframed[mathframe][align=right,top=\startmathmode,bottom=\stopmathmode] % location=low
\starttext
\framed{x^2}
\mframed{x^2}
\mathframe{x^2}
\stoptext
Wolfgang
Thanks a lot! Just three questions: 1. What do (in general) top and bottom parameters do? 2. I assume that \startmathmode and \stopmathmode are necessary because the contents of the frame are set in an hbox? 3. DO I get it correctly that \inframed{...} is equivalent to \framed[location=low]{...}? TIA -- Marcin Borkowski
![](https://secure.gravatar.com/avatar/93131e1e6e2204bd13501390d768dbdc.jpg?s=120&d=mm&r=g)
Am 04.08.2011 um 21:00 schrieb Marcin Borkowski:
Just three questions:
1. What do (in general) top and bottom parameters do?
You can use them for settings which are executed at the begin and end of a frame, like before and after from other commands.
2. I assume that \startmathmode and \stopmathmode are necessary because the contents of the frame are set in an hbox?
Yes. Dependent on the settings for “align” \framed acts like \hbox or \vbox.
3. DO I get it correctly that \inframed{...} is equivalent to \framed[location=low]{…}?
Yes. Wolfgang
participants (2)
-
Marcin Borkowski
-
Wolfgang Schuster