ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Circled text in metapost
@ 2018-03-29  9:28 Gerhard Kugler
  2018-03-29  9:52 ` Henri Menke
  0 siblings, 1 reply; 21+ messages in thread
From: Gerhard Kugler @ 2018-03-29  9:28 UTC (permalink / raw)
  To: ntg-context

Hi,

in documentations I can find various examples of circled text. But
copying them I had no success till now.

I want to place text in half circles of various radiuses. Is there
anywhere a simple example?

My greatest problems seem to be in the embedding code.

Gerhard


-- 
Gerhard Kugler
Bensheim
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Circled text in metapost
  2018-03-29  9:28 Circled text in metapost Gerhard Kugler
@ 2018-03-29  9:52 ` Henri Menke
  2018-03-29 10:17   ` Hans Hagen
  0 siblings, 1 reply; 21+ messages in thread
From: Henri Menke @ 2018-03-29  9:52 UTC (permalink / raw)
  To: Gerhard Kugler,
	ntg-context@ntg.nl >> mailing list for ConTeXt users

On 03/29/2018 10:28 PM, Gerhard Kugler wrote:
> Hi,
> 
> in documentations I can find various examples of circled text. But
> copying them I had no success till now.
> 
> I want to place text in half circles of various radiuses. Is there
> anywhere a simple example?

The Metafun experts would probably tear this apart...


\startuniqueMPgraphic{half circle}
  path p, q ;
  p := fullcircle scaled OverlayWidth;
  q := (p cutafter (point .5 along p)) shifted (0,-.5BodyFontSize) ;
  fill q -- cycle withcolor lightgray ;
  draw q withpen pencircle scaled 2pt withcolor darkred ;
  setbounds currentpicture to boundingbox p ;
\stopuniqueMPgraphic

\defineoverlay[half circle][\uniqueMPgraphic{half circle}]

\starttext

\framed[background=half circle,frame=off]{Text width half circle.}

\stoptext


> 
> My greatest problems seem to be in the embedding code.
> 
> Gerhard
> 
> 

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

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Circled text in metapost
  2018-03-29  9:52 ` Henri Menke
@ 2018-03-29 10:17   ` Hans Hagen
  2018-03-29 10:43     ` Gerhard Kugler
  0 siblings, 1 reply; 21+ messages in thread
From: Hans Hagen @ 2018-03-29 10:17 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Henri Menke, Gerhard Kugler

On 3/29/2018 11:52 AM, Henri Menke wrote:
> On 03/29/2018 10:28 PM, Gerhard Kugler wrote:
>> Hi,
>>
>> in documentations I can find various examples of circled text. But
>> copying them I had no success till now.
>>
>> I want to place text in half circles of various radiuses. Is there
>> anywhere a simple example?
> 
> The Metafun experts would probably tear this apart...
>  
> \startuniqueMPgraphic{half circle}
>    path p, q ;
>    p := fullcircle scaled OverlayWidth;
>    q := (p cutafter (point .5 along p)) shifted (0,-.5BodyFontSize) ;
>    fill q -- cycle withcolor lightgray ;
>    draw q withpen pencircle scaled 2pt withcolor darkred ;
>    setbounds currentpicture to boundingbox p ;
> \stopuniqueMPgraphic
> 
> \defineoverlay[half circle][\uniqueMPgraphic{half circle}]
> 
> \starttext
> 
> \framed[background=half circle,frame=off]{Text width half circle.}
> 
> \stoptext

Well, if you really want a tear down ...

\startuniqueMPgraphic{half circle}
     path p ; p := halfcircle scaled OverlayWidth shifted center 
OverlayBox ;
     path q ; q := p shifted (0,-StrutDepth)  ;
     draw image (
         fill q -- cycle withcolor OverlayColor ;
         draw q          withcolor OverlayLineColor ;
     ) withpen pencircle scaled 2pt ;
     setbounds currentpicture to boundingbox OverlayBox ;
\stopuniqueMPgraphic

\defineoverlay[half circle][\uniqueMPgraphic{half circle}]

\starttext

\framed
   [background=half circle,
    frame=off,
    framecolor=red,
    backgroundcolor=lightgray]
   {Text width half circle.}

\framed
   [background=half circle,
    frame=off,
    framecolor=red,
    backgroundcolor=lightgray]
   {Text width half circle and more.}

\stoptext


>>
>> My greatest problems seem to be in the embedding code.
>>
>> Gerhard
>>
>>
> 
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
> 


-- 

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

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Circled text in metapost
  2018-03-29 10:17   ` Hans Hagen
@ 2018-03-29 10:43     ` Gerhard Kugler
  2018-03-29 13:11       ` Alan Braslau
  0 siblings, 1 reply; 21+ messages in thread
From: Gerhard Kugler @ 2018-03-29 10:43 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Thank you very much for these examples. The most important hints are
given now. Perhaps I am able to apply them.

One misunderstanding made by my post: I want to write the text curved
as a (half-)circle.

Gerhard

-- 
Gerhard Kugler
Bensheim
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Circled text in metapost
  2018-03-29 10:43     ` Gerhard Kugler
@ 2018-03-29 13:11       ` Alan Braslau
  2018-03-29 16:05         ` Gerhard Kugler
  0 siblings, 1 reply; 21+ messages in thread
From: Alan Braslau @ 2018-03-29 13:11 UTC (permalink / raw)
  To: Gerhard Kugler; +Cc: mailing list for ConTeXt users

On Thu, 29 Mar 2018 12:43:56 +0200
Gerhard Kugler <G.W.Kugler@posteo.de> wrote:

> One misunderstanding made by my post: I want to write the text curved
> as a (half-)circle.

Take a look at the Metafun manual.

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

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Circled text in metapost
  2018-03-29 13:11       ` Alan Braslau
@ 2018-03-29 16:05         ` Gerhard Kugler
  2018-03-30 11:31           ` Gerhard Kugler
  2018-03-30 23:22           ` Henri Menke
  0 siblings, 2 replies; 21+ messages in thread
From: Gerhard Kugler @ 2018-03-29 16:05 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Thu, Mar 29, 2018 at 07:11:50AM -0600, Alan Braslau wrote:
> On Thu, 29 Mar 2018 12:43:56 +0200
> Gerhard Kugler <G.W.Kugler@posteo.de> wrote:
> 
> > One misunderstanding made by my post: I want to write the text curved
> > as a (half-)circle.
> 
> Take a look at the Metafun manual.
> 

In the manual is an example on page 233 with the following content:

-----

\def\rotatetokens#1#2#3#4% delta extra radius tokens
{\vbox\bgroup
\MPtoks\emptytoks
\resetMPdrawing
\startMPdrawing
picture pic[] ;
numeric wid, len[], rot ;
numeric delta, extra, radius, n, r ;
len[0] := n := 0 ;
delta := #1 ; extra := #2 ; radius := #3 ;
\stopMPdrawing
\handletokens#4\with\processrotationtoken
\startMPdrawing
r := len[n]/Pi ;
for i=1 upto n :
wid := abs(xpart lrcorner pic[i] -
xpart llcorner pic[i]) ;
rot := extra + delta -
((len[i]-.5wid)/len[n]) * (180+2delta) ;
draw pic[i]
rotatedaround (origin,-270) shifted (-r-radius,
ypart -.5[ulcorner pic[i], llcorner pic[i]])
rotatedaround (origin,rot) ;
endfor ;
\stopMPdrawing
\MPdrawingdonetrue
\getMPdrawing
\resetMPdrawing
\egroup}

\startcombination[3*1]
{\rotatetokens {0} {0}{0}{Does it work ok?}} {A}
{\rotatetokens{20} {0}{0}{Does it work ok?}} {B}
{\rotatetokens{20}{30}{0}{Does it work ok?}} {C}
\stopcombination

-----

But I cannot see what part calls what parts and how they can be
embedded.

Gerhard


-- 
Gerhard Kugler
Bensheim
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Circled text in metapost
  2018-03-29 16:05         ` Gerhard Kugler
@ 2018-03-30 11:31           ` Gerhard Kugler
  2018-03-30 14:44             ` Alan Braslau
  2018-03-30 23:22           ` Henri Menke
  1 sibling, 1 reply; 21+ messages in thread
From: Gerhard Kugler @ 2018-03-30 11:31 UTC (permalink / raw)
  To: ntg-context

Hello,

my problem is that in other programming langguages there is a main
procedure which calls others. In metapost in the context of ConteXt I
can use \starttext ... \stoptext or \startMPpage ... \stopMPpage or
\beginfig ... \endfig

And it seems not to be transparent how procedures are called.

Gerhard


-- 
Gerhard Kugler
Bensheim
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Circled text in metapost
  2018-03-30 11:31           ` Gerhard Kugler
@ 2018-03-30 14:44             ` Alan Braslau
  2018-03-30 15:51               ` Gerhard Kugler
  0 siblings, 1 reply; 21+ messages in thread
From: Alan Braslau @ 2018-03-30 14:44 UTC (permalink / raw)
  To: Gerhard Kugler; +Cc: mailing list for ConTeXt users

Hello,

luatex includes the MetaPost library MPlib, so MetaPost code is called
and then injected into the output stream. As a user, it is useful to
know that MP is in fact called in two passes, thus twice, and this can
have some unexpected consequences when not programmed cleanly. Global
variable storage, for example, can reflect the multiple passes. Take
the following (silly) example:

\starttext

\startMPcode
if unknown n : n := 0 ; fi
n := n + 1 ;
draw textext(decimal n) ;
\stopMPcode

\startMPcode
n := n + 1 ;
draw textext(decimal n) ;
\stopMPcode

\stoptext

yielding:
1
3

(perhaps Hans or Taco can explain why one does not get 2 4)


This side effect is somewhat handled by the fact that each call to MP
is treated as a group : begingroup  ... endgroup so

\startMPcode
save n ; n := 0 ;
...
\stopMPcode

works as expected, but n is then local and becomes unknown (or keeps
its global value) for subsequent calls to MP.

What should be understood is that calls to MP returns a bounding box to
TeX, and space is reserved for this bounding box. Likewise, calls
within MP to TeX, for example textext() or label(), or btex ... etex
returns a bounding box to MP, and this (picture) object is placed in
the graphic. Mechanisms exist allowing the passing of values of
variables via lua (as strings, in fact). This is a more advanced
subject.


Now, there are a number of ways of calling MP from TeX, directly as
above, but also as unique MP graphics or as reusable MP graphics, ...
This is another subject all together.

Hopefully this helps some.

Alan



On Fri, 30 Mar 2018 13:31:30 +0200
Gerhard Kugler <G.W.Kugler@posteo.de> wrote:

> Hello,
> 
> my problem is that in other programming langguages there is a main
> procedure which calls others. In metapost in the context of ConteXt I
> can use \starttext ... \stoptext or \startMPpage ... \stopMPpage or
> \beginfig ... \endfig
> 
> And it seems not to be transparent how procedures are called.
> 
> Gerhard
> 
> 

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

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Circled text in metapost
  2018-03-30 14:44             ` Alan Braslau
@ 2018-03-30 15:51               ` Gerhard Kugler
  0 siblings, 0 replies; 21+ messages in thread
From: Gerhard Kugler @ 2018-03-30 15:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Thank you,

this seems a very informative explanation for me, and now I will try
to transpose it for my intention.

Gerhard

On Fri, Mar 30, 2018 at 08:44:23AM -0600, Alan Braslau wrote:
> Hello,
> 
> luatex includes the MetaPost library MPlib, so MetaPost code is called
> and then injected into the output stream...


-- 
Gerhard Kugler
Bensheim
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Circled text in metapost
  2018-03-29 16:05         ` Gerhard Kugler
  2018-03-30 11:31           ` Gerhard Kugler
@ 2018-03-30 23:22           ` Henri Menke
  2018-03-30 23:25             ` Henri Menke
  1 sibling, 1 reply; 21+ messages in thread
From: Henri Menke @ 2018-03-30 23:22 UTC (permalink / raw)
  To: ntg-context

On Thu, 2018-03-29 at 18:05 +0200, Gerhard Kugler wrote:
> On Thu, Mar 29, 2018 at 07:11:50AM -0600, Alan Braslau wrote:
> > 
> > On Thu, 29 Mar 2018 12:43:56 +0200
> > Gerhard Kugler <G.W.Kugler@posteo.de> wrote:
> > 
> > > 
> > > One misunderstanding made by my post: I want to write the text curved
> > > as a (half-)circle.
> > Take a look at the Metafun manual.
> > 
> In the manual is an example on page 233 with the following content:

Nah!  Don't use those macros.  They are only for demonstration.  Use the builtin
\followtokens instead:


\loadmarkfile{meta-imp-txt} % is this supposed to be loaded like that?
\starttext

\startuseMPgraphic{followtokens}
  path RotPath ; RotPath := reverse halfcircle ;
\stopuseMPgraphic
\followtokens{Text on a half circle}

\stoptext


> 
> -----
> 
> \def\rotatetokens#1#2#3#4% delta extra radius tokens
> {\vbox\bgroup
> \MPtoks\emptytoks
> \resetMPdrawing
> \startMPdrawing
> picture pic[] ;
> numeric wid, len[], rot ;
> numeric delta, extra, radius, n, r ;
> len[0] := n := 0 ;
> delta := #1 ; extra := #2 ; radius := #3 ;
> \stopMPdrawing
> \handletokens#4\with\processrotationtoken
> \startMPdrawing
> r := len[n]/Pi ;
> for i=1 upto n :
> wid := abs(xpart lrcorner pic[i] -
> xpart llcorner pic[i]) ;
> rot := extra + delta -
> ((len[i]-.5wid)/len[n]) * (180+2delta) ;
> draw pic[i]
> rotatedaround (origin,-270) shifted (-r-radius,
> ypart -.5[ulcorner pic[i], llcorner pic[i]])
> rotatedaround (origin,rot) ;
> endfor ;
> \stopMPdrawing
> \MPdrawingdonetrue
> \getMPdrawing
> \resetMPdrawing
> \egroup}
> 
> \startcombination[3*1]
> {\rotatetokens {0} {0}{0}{Does it work ok?}} {A}
> {\rotatetokens{20} {0}{0}{Does it work ok?}} {B}
> {\rotatetokens{20}{30}{0}{Does it work ok?}} {C}
> \stopcombination
> 
> -----
> 
> But I cannot see what part calls what parts and how they can be
> embedded.
> 
> Gerhard
> 
> 
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Circled text in metapost
  2018-03-30 23:22           ` Henri Menke
@ 2018-03-30 23:25             ` Henri Menke
  2018-03-31 17:22               ` Gerhard Kugler
  0 siblings, 1 reply; 21+ messages in thread
From: Henri Menke @ 2018-03-30 23:25 UTC (permalink / raw)
  To: ntg-context

On Sat, 2018-03-31 at 12:22 +1300, Henri Menke wrote:
> On Thu, 2018-03-29 at 18:05 +0200, Gerhard Kugler wrote:
> > 
> > On Thu, Mar 29, 2018 at 07:11:50AM -0600, Alan Braslau wrote:
> > > 
> > > 
> > > On Thu, 29 Mar 2018 12:43:56 +0200
> > > Gerhard Kugler <G.W.Kugler@posteo.de> wrote:
> > > 
> > > > 
> > > > 
> > > > One misunderstanding made by my post: I want to write the text curved
> > > > as a (half-)circle.
> > > Take a look at the Metafun manual.
> > > 
> > In the manual is an example on page 233 with the following content:
> Nah!  Don't use those macros.  They are only for demonstration.  Use the
> builtin
> \followtokens instead:
> 
> 
> \loadmarkfile{meta-imp-txt} % is this supposed to be loaded like that?

\loadmarkfile{meta-imp-txt} is the wrong way.  It's supposed to be
\useMPlibrary[txt]

> \starttext
> 
> \startuseMPgraphic{followtokens}
>   path RotPath ; RotPath := reverse halfcircle ;
> \stopuseMPgraphic
> \followtokens{Text on a half circle}
> 
> \stoptext
> 
> 
> > 
> > 
> > -----
> > 
> > \def\rotatetokens#1#2#3#4% delta extra radius tokens
> > {\vbox\bgroup
> > \MPtoks\emptytoks
> > \resetMPdrawing
> > \startMPdrawing
> > picture pic[] ;
> > numeric wid, len[], rot ;
> > numeric delta, extra, radius, n, r ;
> > len[0] := n := 0 ;
> > delta := #1 ; extra := #2 ; radius := #3 ;
> > \stopMPdrawing
> > \handletokens#4\with\processrotationtoken
> > \startMPdrawing
> > r := len[n]/Pi ;
> > for i=1 upto n :
> > wid := abs(xpart lrcorner pic[i] -
> > xpart llcorner pic[i]) ;
> > rot := extra + delta -
> > ((len[i]-.5wid)/len[n]) * (180+2delta) ;
> > draw pic[i]
> > rotatedaround (origin,-270) shifted (-r-radius,
> > ypart -.5[ulcorner pic[i], llcorner pic[i]])
> > rotatedaround (origin,rot) ;
> > endfor ;
> > \stopMPdrawing
> > \MPdrawingdonetrue
> > \getMPdrawing
> > \resetMPdrawing
> > \egroup}
> > 
> > \startcombination[3*1]
> > {\rotatetokens {0} {0}{0}{Does it work ok?}} {A}
> > {\rotatetokens{20} {0}{0}{Does it work ok?}} {B}
> > {\rotatetokens{20}{30}{0}{Does it work ok?}} {C}
> > \stopcombination
> > 
> > -----
> > 
> > But I cannot see what part calls what parts and how they can be
> > embedded.
> > 
> > Gerhard
> > 
> > 
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Circled text in metapost
  2018-03-30 23:25             ` Henri Menke
@ 2018-03-31 17:22               ` Gerhard Kugler
  2018-04-02 13:16                 ` Hans Hagen
  0 siblings, 1 reply; 21+ messages in thread
From: Gerhard Kugler @ 2018-03-31 17:22 UTC (permalink / raw)
  To: ntg-context

Hi,

my very slow proceedings are here:


--------

\useMPlibrary[txt]

\starttext

\setupbodyfont[pp1]

\setupcolors[state=start]

\setuplayout
[topspace=192pt,
backspace=48pt,
cutspace=12pt,
width=400pt,
margin=0cm,
rightedge=88pt,
rightedgedistance=48pt,
header=0cm,
footer=0cm,
height=400pt]



\startuseMPgraphic{followtokens}
  path RotPath ;

  RotPath := halfcircle scaled 7cm rotated 180 ;

\stopuseMPgraphic

\followtokens{Dies ist ein anderer Text}

\startuseMPgraphic{followtokens}
  path RotPath ;

  RotPath := halfcircle scaled 14cm rotated 180 ;

\stopuseMPgraphic

\followtokens{Dies ist ein selbst geschriebener Text}

--------

But I want to place the round lines concentrically in a circle (more
than two). And I want to place all the lines on colored circled
background.

In the nice children programming language "logo" it is easy, but
yealds pixle grapics only.

Gerhard



-- 
Gerhard Kugler
Bensheim
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Circled text in metapost
  2018-03-31 17:22               ` Gerhard Kugler
@ 2018-04-02 13:16                 ` Hans Hagen
  2018-04-02 14:51                   ` Alan Braslau
  2018-04-02 15:52                   ` Gerhard Kugler
  0 siblings, 2 replies; 21+ messages in thread
From: Hans Hagen @ 2018-04-02 13:16 UTC (permalink / raw)
  To: ntg-context

On 3/31/2018 7:22 PM, Gerhard Kugler wrote:
> Hi,
> 
> my very slow proceedings are here:
> 
> 
> --------
> 
> \useMPlibrary[txt]
> 
> \starttext
> 
> \setupbodyfont[pp1]
> 
> \setupcolors[state=start]
> 
> \setuplayout
> [topspace=192pt,
> backspace=48pt,
> cutspace=12pt,
> width=400pt,
> margin=0cm,
> rightedge=88pt,
> rightedgedistance=48pt,
> header=0cm,
> footer=0cm,
> height=400pt]
> 
> 
> 
> \startuseMPgraphic{followtokens}
>    path RotPath ;
> 
>    RotPath := halfcircle scaled 7cm rotated 180 ;
> 
> \stopuseMPgraphic
> 
> \followtokens{Dies ist ein anderer Text}
> 
> \startuseMPgraphic{followtokens}
>    path RotPath ;
> 
>    RotPath := halfcircle scaled 14cm rotated 180 ;
> 
> \stopuseMPgraphic
> 
> \followtokens{Dies ist ein selbst geschriebener Text}
> 
> --------
> 
> But I want to place the round lines concentrically in a circle (more
> than two). And I want to place all the lines on colored circled
> background.
\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
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Circled text in metapost
  2018-04-02 13:16                 ` Hans Hagen
@ 2018-04-02 14:51                   ` Alan Braslau
  2018-04-02 15:52                   ` Gerhard Kugler
  1 sibling, 0 replies; 21+ messages in thread
From: Alan Braslau @ 2018-04-02 14:51 UTC (permalink / raw)
  To: ntg-context

On Mon, 2 Apr 2018 15:16:11 +0200
Hans Hagen <j.hagen@xs4all.nl> 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

or, perhaps (a question of taste):

for i=1 upto 6 :
    draw RotPath scaled (i/7) ;
endfor ;


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

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Circled text in metapost
  2018-04-02 13:16                 ` Hans Hagen
  2018-04-02 14:51                   ` Alan Braslau
@ 2018-04-02 15:52                   ` Gerhard Kugler
  2018-04-02 16:08                     ` Hans Hagen
  1 sibling, 1 reply; 21+ messages in thread
From: Gerhard Kugler @ 2018-04-02 15:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Thank you very much!

And if I want to place different text between the (half-)circles?

Gerhard


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
> 

-- 
Gerhard Kugler
Bensheim
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Circled text in metapost
  2018-04-02 15:52                   ` Gerhard Kugler
@ 2018-04-02 16:08                     ` Hans Hagen
  2018-04-02 16:34                       ` Gerhard Kugler
  0 siblings, 1 reply; 21+ messages in thread
From: Hans Hagen @ 2018-04-02 16:08 UTC (permalink / raw)
  To: ntg-context

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

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Circled text in metapost
  2018-04-02 16:08                     ` Hans Hagen
@ 2018-04-02 16:34                       ` Gerhard Kugler
  2018-04-02 17:21                         ` Gerhard Kugler
  0 siblings, 1 reply; 21+ messages in thread
From: Gerhard Kugler @ 2018-04-02 16:34 UTC (permalink / raw)
  To: ntg-context

Finally I want to place 8 (halfcircled) texts within 8 colores
(full)rings. Your proposal places the second text outside of the
circles.

Gerhard


On Mon, Apr 02, 2018 at 06:08:56PM +0200, Hans Hagen wrote:
> 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
> -----------------------------------------------------------------
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________

-- 
Gerhard Kugler
Bensheim
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Circled text in metapost
  2018-04-02 16:34                       ` Gerhard Kugler
@ 2018-04-02 17:21                         ` Gerhard Kugler
  2018-04-02 17:30                           ` Alan Braslau
  0 siblings, 1 reply; 21+ messages in thread
From: Gerhard Kugler @ 2018-04-02 17:21 UTC (permalink / raw)
  To: ntg-context

[-- Attachment #1: Type: text/plain, Size: 412 bytes --]

Perhaps it is better if I send the final graphic which I have
prorammed with the programming langguage "logo". See attachment!

The problem: it is pixel graphic.

Gerhard


On Mon, Apr 02, 2018 at 06:34:42PM +0200, Gerhard Kugler wrote:
> Finally I want to place 8 (halfcircled) texts within 8 colores
> (full)rings. Your proposal places the second text outside of the
> circles.
> 

-- 
Gerhard Kugler
Bensheim

[-- Attachment #2: logokreis.png --]
[-- Type: image/png, Size: 10079 bytes --]

[-- Attachment #3: Type: text/plain, Size: 492 bytes --]

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

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Circled text in metapost
  2018-04-02 17:21                         ` Gerhard Kugler
@ 2018-04-02 17:30                           ` Alan Braslau
  2018-04-02 17:48                             ` Gerhard Kugler
  0 siblings, 1 reply; 21+ messages in thread
From: Alan Braslau @ 2018-04-02 17:30 UTC (permalink / raw)
  To: Gerhard Kugler; +Cc: mailing list for ConTeXt users

This is very easy to do in MetaPost, but you should not expect the
mailing list to design your graphic for you.

Alan


On Mon, 2 Apr 2018 19:21:05 +0200
Gerhard Kugler <G.W.Kugler@posteo.de> wrote:

> Perhaps it is better if I send the final graphic which I have
> prorammed with the programming langguage "logo". See attachment!
> 
> The problem: it is pixel graphic.
> 
> Gerhard
> 
> 
> On Mon, Apr 02, 2018 at 06:34:42PM +0200, Gerhard Kugler wrote:
> > Finally I want to place 8 (halfcircled) texts within 8 colores
> > (full)rings. Your proposal places the second text outside of the
> > circles.
> >   
> 

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

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Circled text in metapost
  2018-04-02 17:30                           ` Alan Braslau
@ 2018-04-02 17:48                             ` Gerhard Kugler
  2018-04-05  5:32                               ` Gerhard Kugler
  0 siblings, 1 reply; 21+ messages in thread
From: Gerhard Kugler @ 2018-04-02 17:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, Apr 02, 2018 at 11:30:05AM -0600, Alan Braslau wrote:
> This is very easy to do in MetaPost, but you should not expect the
> mailing list to design your graphic for you.
> 

You are right totally. It is not my expectation. I succeeded in
programming several graphics in metapost in the past. But in the
present I am a blockhead.

Gerhard


-- 
Gerhard Kugler
Bensheim
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Circled text in metapost
  2018-04-02 17:48                             ` Gerhard Kugler
@ 2018-04-05  5:32                               ` Gerhard Kugler
  0 siblings, 0 replies; 21+ messages in thread
From: Gerhard Kugler @ 2018-04-05  5:32 UTC (permalink / raw)
  To: ntg-context

One question:

How can I give the several half circle text lines the same origin
(that of the circles)?

Gerhard


-- 
Gerhard Kugler
Bensheim
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2018-04-05  5:32 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-29  9:28 Circled text in metapost Gerhard Kugler
2018-03-29  9:52 ` Henri Menke
2018-03-29 10:17   ` Hans Hagen
2018-03-29 10:43     ` Gerhard Kugler
2018-03-29 13:11       ` Alan Braslau
2018-03-29 16:05         ` Gerhard Kugler
2018-03-30 11:31           ` Gerhard Kugler
2018-03-30 14:44             ` Alan Braslau
2018-03-30 15:51               ` Gerhard Kugler
2018-03-30 23:22           ` Henri Menke
2018-03-30 23:25             ` Henri Menke
2018-03-31 17:22               ` Gerhard Kugler
2018-04-02 13:16                 ` Hans Hagen
2018-04-02 14:51                   ` Alan Braslau
2018-04-02 15:52                   ` Gerhard Kugler
2018-04-02 16:08                     ` Hans Hagen
2018-04-02 16:34                       ` Gerhard Kugler
2018-04-02 17:21                         ` Gerhard Kugler
2018-04-02 17:30                           ` Alan Braslau
2018-04-02 17:48                             ` Gerhard Kugler
2018-04-05  5:32                               ` Gerhard Kugler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).