Am 03.11.2011 um 21:35 schrieb Idris Samawi Hamid ادريس سماوي حامد:
What am I doing wrong? or should we just officially forget about the marginframed mechanism and stick to margindata only??
Just to be clear, the name of the whole thing is margin data and you define a new command with \definemargindata. To describe what’s the difference between \setupmargindata and \setupmarginframed is a wrote a very simple version of \inmargin. \def\imrand#1% {\vadjust {\llap {\smash[h]{\inframed{#1}}% \hskip\leftmargindistance}}} \starttext \showframe text text text text \imrand{margin} text text text text text text text text text text text text text text text text text text text text text text text text text text \stoptext You can split my \imrand command in two parts, the first \vadjust{\llap{…}} which puts the argument in the margin, to make changes at this part you use \setupmargindata where you can control with the “location” key on which side the text should appear (“left” for the left margin, “right” for the right margin, “inner” for the inner margin etc.) and in which block (“margin=edge” for the edge and “margin=margin” for the margin). The second part is \framed, to make changes at this part you can use the \setupmarginframed command (e.g. to disable/enable the frame). The question is now why not only one command for both but the answer is simple, both have keys with the same name (e.g. location) which expect different argument and only when you use different setup commands total control about the environment is possible. You can find a overview about all keys and their values in my new command reference: https://bitbucket.org/wolfs/commands/downloads Wolfgang