Gerion Entrup schrieb am 02.08.2024 um 14:10:
Am Freitag, 2. August 2024, 07:42:29 MESZ schrieb Pablo Rodriguez via ntg- context:
On 8/2/24 01:13, Gerion Entrup wrote:
Ok, I think I understand that in principal. Thanks for the explanation. Can I somehow know in advance that a margin note makes use of \framed? Hi Gerion,
there is an \ifinframed conditional, such as in: ... This may help to achieve what you want.
Just in case it helps, Thanks for the answer, but we misunderstood. I'll try to formulate it clearer: If I get it right, to set margin notes, you need to specify \setupmargindata in any case. However, on the one hand, there might be notes that follow the style of the "style" argument within \setupmargindata. And on the other hand, there might be notes that internally uses \framed and follow the "style" argument within a separately specified \setupmarginframed.
My question is, whether I have any chance to get in advance (when writing down the document styling) which style argument my future (not yet written) margin notes will follow to know if I need to specify a \setupmarginframed at all.
Is it the style argument of \setupmargindata or \setupmarginframed or is it a good practice to _always_ specify \setupmarginframed with the same style argument as given to \setupmargindata?
I have no idea what your question is but you should use \setupmarginframed only when the setup requires it, e.g. to change the alignment for blocks which use the framed mechanism. The example below shows which predefined margin blocks rely only on margindata where you can change the alignment with \etupmargindata and also the ones which require \setupmarginframed. %%%% begin example \setuppapersize[A4][A3] \setuplayout[location=middle] \starttext \doloopoverlist{ inleftmargin, inrightmargin, inoutermargin, ininnermargin, inleftedge, inrightedge, inouteredge, ininneredge, atleftmargin, atrightmargin, } { \setupmargindata[\recursestring][align=middle] \title{\tex{\recursestring}} \samplefile{lorem} \margindata[\recursestring]{Text in the margin!} \samplefile{lorem} } \doloopoverlist{ inleft, inright, inouter, ininner, inmargin, inother, } { %\setupmargindata[\recursestring][align=middle] \setupmarginframed[\recursestring][align=middle] \title{\tex{\recursestring}} \samplefile{lorem} \margindata[\recursestring]{Text in the margin!} \samplefile{lorem} } \stoptext %%%% end example Wolfgang