Hi, I'm trying to make my document in ConTeXt and in I have some problem. Problem is in my environment for theorems. Every theorem has name and number. I had defined "enumeration" for them. Theorem-text is typed in framedtext, with backround. Theorem's title is defined by \setMPtext, and is typed in MPgraphic (\MPstring). I want to type also theorem's number (Theorem 1, ...) instead of "Here", but there is a problem: \MPstring{TheoremCaption} is empty. Where I'm making mistake? Zrejme robim niekde nejaku elementarnu chybu. Vychadzal som z prikladu v MetaFun Manuale, ktory som si upravoval. Mozem poprosit o nakopnutie? Je dost mozne, ze sa uberam uplne zlym smerom? Thanks for your help, Marcel \setupoutput[pdf] \setupcolors[state=start] \setupinteraction[state=start] \defineoverlay[TheoremFrame][\useMPgraphic{TheoremFrame}] \defineframedtext[TheoremText][frame=off,background=TheoremFrame,width=\hsize] \def\StartTeoFrame{\startTheoremText} \def\StopTeoFrame {\stopTheoremText} \def\FrameTheoremTitle#1{\setMPtext{TheoremFrame}{\hbox spread 1em{\hss\strut#1\hss}}} \setMPtext{TheoremFrame}{} \def\FrameTheoremCaption#1{\setMPtext{TheoremCaptionFrame}{\hbox spread 1em{\hss\strut#1\hss}}\useMPgraphic{TheoremCaption}} \setMPtext{TheoremCaptionFrame}{} \startuseMPgraphic{TheoremFrame} picture p, s; path a, b; pair c; p := textext.rt(\MPstring{TheoremFrame}); a := unitsquare xyscaled(OverlayWidth, OverlayHeight); o := BodyFontSize ; p := p shifted (2o,OverlayHeight-ypart center p) ; drawoptions (withpen pencircle scaled 1pt withcolor .625red) ; b := a randomized (o/2) ; fill b withcolor .95white ; draw b ; c := center p; c := b intersectionpoint (c shifted (0,-o)--c shifted(0,o)) ; p := p shifted (c-center p) ; b := (boundingbox p) randomized (o/8) ; fill b withcolor .85white ; draw b ; draw p withcolor black; setbounds currentpicture to a ; \stopuseMPgraphic \startuseMPgraphic{TheoremCaption} picture p; p := textext.rt("Here"); % p := textext.rt(\MPstring{TheoremCaption}); draw p rotated 90 withcolor blue; draw (5mm, 0)..(-2mm, 0mm) withcolor red; \stopuseMPgraphic \defineenumeration [Theorem] [location=right, headstyle=bold, text=Theorem , command=\FrameTheoremCaption, location=inleft, before={\StartTeoFrame}, after={\StopTeoFrame}] \starttext \FrameTheoremTitle{Immerman} \startTheorem[3t9.4.00] Theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem theorem \stopTheorem \stoptext