Hi, 

I got a partial solution to suppress the automatic display by changing 
“text=theorem,” to “text=,” and “number=yes” to “number=no”.
But, I couldn’t remove a blank line before the main text.
So it is a partial solution.

> 1. to put “Theorem #.#” inside the FrameTitle?(#.# means that chapter 
> number.theorem number)
> 2. to suppress the automatically display of “Thm #” inside the text?

The command
\FrameTitle{Theorem \getmarking[chapternumber].\recurselevel}
shows “Theorem 1.1”, but the it shows the chapternumber -1 not the real 
chapternumber.
Also I don’t know how to put the theorem counter after chapternumber instead of 
\recurselevel.

Here is a sample code.

Thank you for reading.

Best regards,

Dalyoung

%%%%%%%% framed Text copied from MetaFun manual
\startuseMPgraphic{FunnyFrame} 
picture p ; numeric o ; path a, b ; pair c ; 
p := textext.rt(\MPstring{FunnyFrame}) ; 
o := BodyFontSize ; 
a := unitsquare xyscaled (OverlayWidth,OverlayHeight) ; 
p := p shifted (2o,OverlayHeight-ypart center p) ; 
drawoptions (withpen pencircle scaled 1pt withcolor .625red) ; 
b := a superellipsed .95 ; 
%fill b withcolor .85white ; 
draw b ; 
b := (boundingbox p) superellipsed .95 ; 
fill b withcolor .85white ;  %.425green;%.
draw b ; 
draw p withcolor black ;
setbounds currentpicture to a ; 
\stopuseMPgraphic 

\defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}] 
\defineframedtext[FunnyText][frame=off,background=FunnyFrame, 
offset=\bodyfontsize, width=\textwidth]%\overlaywidth]%
\def\FrameTitle #1% 
{\setMPtext{FunnyFrame}{\hbox spread 1em{\hss\strut\ss\bf #1\hss}}} 

\defineenumeration[Thm]
   [text=,
    style=,
    title=no,
    prefix=yes,
    prefixsegments={chapter},
    way=bychapter,
    number=no,
    before={\FrameTitle {Theorem \getmarking[chapternumber].\recurselevel} 
\startFunnyText},
    after={\stopFunnyText\blank}]

%\define[2]\thm{\FrameTitle{#1}
%\startFunnyText #2 \stopFunnyText}

\starttext

\dorecurse{3}
{\chapter{Chapter Title}
    
{\FrameTitle{Fort's space test}
\startFunnyText
Let $X$ be a uncountable set. Let $\infty$ is a fixed point of $X$. Let 
$\mathcal T$ be the family of subsets $G$ such that either (i) $\infty \notin 
G$ or (ii) $\infty \in G \text{ and } G^c$ is finite. The space $(X, {\mathcal 
T} )$ is called {\bf Fort's space}.
\stopFunnyText}

{\getmarking[chapternumber]}.\recurselevel}%

\startThm
    Fort's space is a compact and Hausdorff topological space.
\stopThm

\stoptext
 


___________________________________________________________________________________
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
___________________________________________________________________________________

Reply via email to