[NTG-context] Circled text in metapost

Hans Hagen j.hagen at xs4all.nl
Mon Apr 2 18:08:56 CEST 2018


On 4/2/2018 5:52 PM, Gerhard Kugler wrote:
> Thank you very much!
> 
> And if I want to place different text between the (half-)circles?

\startuseMPgraphic{followtokens-1}
     path RotPath ; RotPath := halfcircle scaled 7cm rotated 180 ;
     for i=1 upto 6 :
         draw halfcircle scaled (i*cm) rotated 180 ;
     endfor ;
     setbounds currentpicture to boundingbox halfcircle scaled 7cm 
rotated 180 ;
\stopuseMPgraphic

\startuseMPgraphic{followtokens-2}
     path RotPath ; RotPath := halfcircle scaled 6cm rotated 180 ;
     setbounds currentpicture to boundingbox halfcircle scaled 7cm 
rotated 180 ;
\stopuseMPgraphic

\startoverlay
 
{\startuseMPgraphic{followtokens}\includeMPgraphic{followtokens-1}\stopuseMPgraphic
      \followtokens{\strut Dies ist ein anderer Text\strut}}
 
{\startuseMPgraphic{followtokens}\includeMPgraphic{followtokens-2}\stopuseMPgraphic
      \followtokens{\strut Less text than before\strut}}
\stopoverlay


> On Mon, Apr 02, 2018 at 03:16:11PM +0200, Hans Hagen wrote:
>> \useMPlibrary[txt]
>>
>> \starttext
>>
>> \startuseMPgraphic{followtokens}
>>      path RotPath ; RotPath := halfcircle scaled 7cm rotated 180 ;
>>      for i=1 upto 6 :
>>          draw halfcircle scaled (i*cm) rotated 180 ;
>>      endfor ;
>> \stopuseMPgraphic
>>
>> \followtokens{Dies ist ein anderer Text}
>>
>> \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
-----------------------------------------------------------------


More information about the ntg-context mailing list