On 1/12/2018 5:22 PM, Jeong Dal wrote:
Dear Hans,
Thank you for the quick answer.
Repalcing “p:=textext.rt();” and commenting out “headcommand=gobbleone…” with
your suggestion, the references are working.
However, there is a side effect.
“Theorem 1.1” appears twice, one in the frame which I expected and one at the
beginning of the framed text which I don’t want.
One more thing, is there no way to show the number of the Definition?
you can download a beta and try
\defineenumeration[Theorem]
[alternative=empty,
before=\startMyText,
after=\stopMyText]
\defineframed
[MyFramed]
[frame=off,
loffset=1ex,
roffset=1ex,
foregroundstyle=\ssbf]
\startuseMPgraphic{MyFrame}
picture p ; numeric o ; path a, b ; pair c ;
% p := textext.rt("\MyFramed{\currentconstructiontext}") ;
p :=
textext.rt("\wrappedconstruction{\MyFramed{\currentconstructiontext}}") ;
% p :=
textext.rt("\MyFramed{\wrappedconstruction{\currentconstructiontext}}") ;
% p := textext.rt("\MyFramed{\wrappedcurrentconstruction}") ;
o := BodyFontSize ;
a := OverlayBox ;
p := p shifted (2o,OverlayHeight-ypart center p) ;
drawoptions (withpen pencircle scaled 1pt withcolor .625red) ;
b := a superellipsed .95 ;
draw b ;
b := (boundingbox p) superellipsed .95 ;
fill b withcolor .85white ;
draw b ;
draw p withcolor black ;
setbounds currentpicture to a ;
\stopuseMPgraphic
\defineoverlay[MyFrame][\useMPgraphic{MyFrame}]
\defineframedtext
[MyText]
[frame=off,
background=MyFrame,
offset=\bodyfontsize,
width=\textwidth]
\starttext
\startTheorem[lem]
bla bla
\stopTheorem
Bla bla \in {Lemma} [lem] bla bla.
\stoptext
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________