ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Show the letters of the alphabet with a loop (Metapost)
@ 2019-02-02  9:47 Fabrice Couvreur
  2019-02-02 10:16 ` Henri Menke
  0 siblings, 1 reply; 9+ messages in thread
From: Fabrice Couvreur @ 2019-02-02  9:47 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 434 bytes --]

The idea is to display the first 25 letters of the alphabet. The code below
shows the letter a to show what I want to do.
Thank you.
Fabrice

\starttext

\startMPcode
  for i=0 upto 3 :
      for j=0 upto 3 :
          draw unitsquare scaled 4cm shifted (4*i*cm,4*j*cm) ;
      endfor ;
  endfor ;
  for i=0 upto 4 :
      for j=0 upto 4 :
          label.llft("A", (4*i*cm,4*j*cm)) ;
      endfor ;
  endfor ;
\stopMPcode

\stoptext

[-- Attachment #1.2: Type: text/html, Size: 981 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 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] 9+ messages in thread

* Re: Show the letters of the alphabet with a loop (Metapost)
  2019-02-02  9:47 Show the letters of the alphabet with a loop (Metapost) Fabrice Couvreur
@ 2019-02-02 10:16 ` Henri Menke
  2019-02-02 10:49   ` Fabrice Couvreur
  0 siblings, 1 reply; 9+ messages in thread
From: Henri Menke @ 2019-02-02 10:16 UTC (permalink / raw)
  To: ntg-context

On 2/2/19 10:47 PM, Fabrice Couvreur wrote:
> The idea is to display the first 25 letters of the alphabet. The code below
> shows the letter a to show what I want to do.
> Thank you.
> Fabrice

Use char and ASCII.

\starttext

\startMPcode
  for i=0 upto 3 :
      for j=0 upto 3 :
          draw unitsquare scaled 4cm shifted (4*i*cm,4*j*cm) ;
      endfor ;
  endfor ;
  for i=0 upto 4 :
      for j=0 upto 4 :
          label.llft(char(i*5+j+ASCII "A"), (4*i*cm,4*j*cm)) ;
      endfor ;
  endfor ;
\stopMPcode

\stoptext

> 
> \starttext
> 
> \startMPcode
>   for i=0 upto 3 :
>       for j=0 upto 3 :
>           draw unitsquare scaled 4cm shifted (4*i*cm,4*j*cm) ;
>       endfor ;
>   endfor ;
>   for i=0 upto 4 :
>       for j=0 upto 4 :
>           label.llft("A", (4*i*cm,4*j*cm)) ;
>       endfor ;
>   endfor ;
> \stopMPcode
> 
> \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
> ___________________________________________________________________________________
> 

___________________________________________________________________________________
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] 9+ messages in thread

* Re: Show the letters of the alphabet with a loop (Metapost)
  2019-02-02 10:16 ` Henri Menke
@ 2019-02-02 10:49   ` Fabrice Couvreur
  2019-02-02 19:57     ` Henri Menke
  0 siblings, 1 reply; 9+ messages in thread
From: Fabrice Couvreur @ 2019-02-02 10:49 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2247 bytes --]

Hi Henri,
Great ! I would also like these letters to be randomly colored.
Thank you.
Fabrice

Le sam. 2 févr. 2019 à 11:16, Henri Menke <henrimenke@gmail.com> a écrit :

> On 2/2/19 10:47 PM, Fabrice Couvreur wrote:
> > The idea is to display the first 25 letters of the alphabet. The code
> below
> > shows the letter a to show what I want to do.
> > Thank you.
> > Fabrice
>
> Use char and ASCII.
>
> \starttext
>
> \startMPcode
>   for i=0 upto 3 :
>       for j=0 upto 3 :
>           draw unitsquare scaled 4cm shifted (4*i*cm,4*j*cm) ;
>       endfor ;
>   endfor ;
>   for i=0 upto 4 :
>       for j=0 upto 4 :
>           label.llft(char(i*5+j+ASCII "A"), (4*i*cm,4*j*cm)) ;
>       endfor ;
>   endfor ;
> \stopMPcode
>
> \stoptext
>
> >
> > \starttext
> >
> > \startMPcode
> >   for i=0 upto 3 :
> >       for j=0 upto 3 :
> >           draw unitsquare scaled 4cm shifted (4*i*cm,4*j*cm) ;
> >       endfor ;
> >   endfor ;
> >   for i=0 upto 4 :
> >       for j=0 upto 4 :
> >           label.llft("A", (4*i*cm,4*j*cm)) ;
> >       endfor ;
> >   endfor ;
> > \stopMPcode
> >
> > \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
> >
> ___________________________________________________________________________________
> >
>
>
> ___________________________________________________________________________________
> 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
>
> ___________________________________________________________________________________
>

[-- Attachment #1.2: Type: text/html, Size: 4091 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 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] 9+ messages in thread

* Re: Show the letters of the alphabet with a loop (Metapost)
  2019-02-02 10:49   ` Fabrice Couvreur
@ 2019-02-02 19:57     ` Henri Menke
  2019-02-03  9:12       ` Fabrice Couvreur
  0 siblings, 1 reply; 9+ messages in thread
From: Henri Menke @ 2019-02-02 19:57 UTC (permalink / raw)
  To: ntg-context

On 2/2/19 11:49 PM, Fabrice Couvreur wrote:
> Hi Henri,
> Great ! I would also like these letters to be randomly colored.

You should play with randomseed, the starting color (here white) and the
randomization amplitude (1,1,1).  You mileage may vary.

\starttext

\startMPcode
  for i=0 upto 3 :
      for j=0 upto 3 :
          draw unitsquare scaled 4cm shifted (4*i*cm,4*j*cm) ;
      endfor ;
  endfor ;
  for i=0 upto 4 :
      for j=0 upto 4 :
          label.llft(char(i*5+j+ASCII "A"), (4*i*cm,4*j*cm))
              withcolor white randomized (1,1,1) ;
      endfor ;
  endfor ;
\stopMPcode

\stoptext

> Thank you.
> Fabrice
> 
> Le sam. 2 févr. 2019 à 11:16, Henri Menke <henrimenke@gmail.com> a écrit :
> 
>> On 2/2/19 10:47 PM, Fabrice Couvreur wrote:
>> > The idea is to display the first 25 letters of the alphabet. The code
>> below
>> > shows the letter a to show what I want to do.
>> > Thank you.
>> > Fabrice
>>
>> Use char and ASCII.
>>
>> \starttext
>>
>> \startMPcode
>>   for i=0 upto 3 :
>>       for j=0 upto 3 :
>>           draw unitsquare scaled 4cm shifted (4*i*cm,4*j*cm) ;
>>       endfor ;
>>   endfor ;
>>   for i=0 upto 4 :
>>       for j=0 upto 4 :
>>           label.llft(char(i*5+j+ASCII "A"), (4*i*cm,4*j*cm)) ;
>>       endfor ;
>>   endfor ;
>> \stopMPcode
>>
>> \stoptext
>>
>> >
>> > \starttext
>> >
>> > \startMPcode
>> >   for i=0 upto 3 :
>> >       for j=0 upto 3 :
>> >           draw unitsquare scaled 4cm shifted (4*i*cm,4*j*cm) ;
>> >       endfor ;
>> >   endfor ;
>> >   for i=0 upto 4 :
>> >       for j=0 upto 4 :
>> >           label.llft("A", (4*i*cm,4*j*cm)) ;
>> >       endfor ;
>> >   endfor ;
>> > \stopMPcode
>> >
>> > \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
>> >
>> ___________________________________________________________________________________
>> >
>>
>>
>> ___________________________________________________________________________________
>> 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
>>
>> ___________________________________________________________________________________
>>
> 
> 
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
> 

___________________________________________________________________________________
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] 9+ messages in thread

* Re: Show the letters of the alphabet with a loop (Metapost)
  2019-02-02 19:57     ` Henri Menke
@ 2019-02-03  9:12       ` Fabrice Couvreur
  2019-02-03 11:50         ` Fabrice Couvreur
  0 siblings, 1 reply; 9+ messages in thread
From: Fabrice Couvreur @ 2019-02-03  9:12 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 4328 bytes --]

Hi Henry
Thank you for everything.
Fabrice

Le sam. 2 févr. 2019 à 20:58, Henri Menke <henrimenke@gmail.com> a écrit :

> On 2/2/19 11:49 PM, Fabrice Couvreur wrote:
> > Hi Henri,
> > Great ! I would also like these letters to be randomly colored.
>
> You should play with randomseed, the starting color (here white) and the
> randomization amplitude (1,1,1).  You mileage may vary.
>
> \starttext
>
> \startMPcode
>   for i=0 upto 3 :
>       for j=0 upto 3 :
>           draw unitsquare scaled 4cm shifted (4*i*cm,4*j*cm) ;
>       endfor ;
>   endfor ;
>   for i=0 upto 4 :
>       for j=0 upto 4 :
>           label.llft(char(i*5+j+ASCII "A"), (4*i*cm,4*j*cm))
>               withcolor white randomized (1,1,1) ;
>       endfor ;
>   endfor ;
> \stopMPcode
>
> \stoptext
>
> > Thank you.
> > Fabrice
> >
> > Le sam. 2 févr. 2019 à 11:16, Henri Menke <henrimenke@gmail.com> a
> écrit :
> >
> >> On 2/2/19 10:47 PM, Fabrice Couvreur wrote:
> >> > The idea is to display the first 25 letters of the alphabet. The code
> >> below
> >> > shows the letter a to show what I want to do.
> >> > Thank you.
> >> > Fabrice
> >>
> >> Use char and ASCII.
> >>
> >> \starttext
> >>
> >> \startMPcode
> >>   for i=0 upto 3 :
> >>       for j=0 upto 3 :
> >>           draw unitsquare scaled 4cm shifted (4*i*cm,4*j*cm) ;
> >>       endfor ;
> >>   endfor ;
> >>   for i=0 upto 4 :
> >>       for j=0 upto 4 :
> >>           label.llft(char(i*5+j+ASCII "A"), (4*i*cm,4*j*cm)) ;
> >>       endfor ;
> >>   endfor ;
> >> \stopMPcode
> >>
> >> \stoptext
> >>
> >> >
> >> > \starttext
> >> >
> >> > \startMPcode
> >> >   for i=0 upto 3 :
> >> >       for j=0 upto 3 :
> >> >           draw unitsquare scaled 4cm shifted (4*i*cm,4*j*cm) ;
> >> >       endfor ;
> >> >   endfor ;
> >> >   for i=0 upto 4 :
> >> >       for j=0 upto 4 :
> >> >           label.llft("A", (4*i*cm,4*j*cm)) ;
> >> >       endfor ;
> >> >   endfor ;
> >> > \stopMPcode
> >> >
> >> > \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
> >> >
> >>
> ___________________________________________________________________________________
> >> >
> >>
> >>
> >>
> ___________________________________________________________________________________
> >> 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
> >>
> >>
> ___________________________________________________________________________________
> >>
> >
> >
> >
> ___________________________________________________________________________________
> > 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
> >
> ___________________________________________________________________________________
> >
>
>
> ___________________________________________________________________________________
> 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
>
> ___________________________________________________________________________________
>

[-- Attachment #1.2: Type: text/html, Size: 7681 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 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] 9+ messages in thread

* Re: Show the letters of the alphabet with a loop (Metapost)
  2019-02-03  9:12       ` Fabrice Couvreur
@ 2019-02-03 11:50         ` Fabrice Couvreur
  2019-02-03 20:19           ` Henri Menke
  0 siblings, 1 reply; 9+ messages in thread
From: Fabrice Couvreur @ 2019-02-03 11:50 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 4683 bytes --]

Sorry Henri, but I still have a question : how to have the letters in bold
type ?
Thank you.
Fabrice

Le dim. 3 févr. 2019 à 10:12, Fabrice Couvreur <fabrice1.couvreur@gmail.com>
a écrit :

> Hi Henry
> Thank you for everything.
> Fabrice
>
> Le sam. 2 févr. 2019 à 20:58, Henri Menke <henrimenke@gmail.com> a écrit :
>
>> On 2/2/19 11:49 PM, Fabrice Couvreur wrote:
>> > Hi Henri,
>> > Great ! I would also like these letters to be randomly colored.
>>
>> You should play with randomseed, the starting color (here white) and the
>> randomization amplitude (1,1,1).  You mileage may vary.
>>
>> \starttext
>>
>> \startMPcode
>>   for i=0 upto 3 :
>>       for j=0 upto 3 :
>>           draw unitsquare scaled 4cm shifted (4*i*cm,4*j*cm) ;
>>       endfor ;
>>   endfor ;
>>   for i=0 upto 4 :
>>       for j=0 upto 4 :
>>           label.llft(char(i*5+j+ASCII "A"), (4*i*cm,4*j*cm))
>>               withcolor white randomized (1,1,1) ;
>>       endfor ;
>>   endfor ;
>> \stopMPcode
>>
>> \stoptext
>>
>> > Thank you.
>> > Fabrice
>> >
>> > Le sam. 2 févr. 2019 à 11:16, Henri Menke <henrimenke@gmail.com> a
>> écrit :
>> >
>> >> On 2/2/19 10:47 PM, Fabrice Couvreur wrote:
>> >> > The idea is to display the first 25 letters of the alphabet. The code
>> >> below
>> >> > shows the letter a to show what I want to do.
>> >> > Thank you.
>> >> > Fabrice
>> >>
>> >> Use char and ASCII.
>> >>
>> >> \starttext
>> >>
>> >> \startMPcode
>> >>   for i=0 upto 3 :
>> >>       for j=0 upto 3 :
>> >>           draw unitsquare scaled 4cm shifted (4*i*cm,4*j*cm) ;
>> >>       endfor ;
>> >>   endfor ;
>> >>   for i=0 upto 4 :
>> >>       for j=0 upto 4 :
>> >>           label.llft(char(i*5+j+ASCII "A"), (4*i*cm,4*j*cm)) ;
>> >>       endfor ;
>> >>   endfor ;
>> >> \stopMPcode
>> >>
>> >> \stoptext
>> >>
>> >> >
>> >> > \starttext
>> >> >
>> >> > \startMPcode
>> >> >   for i=0 upto 3 :
>> >> >       for j=0 upto 3 :
>> >> >           draw unitsquare scaled 4cm shifted (4*i*cm,4*j*cm) ;
>> >> >       endfor ;
>> >> >   endfor ;
>> >> >   for i=0 upto 4 :
>> >> >       for j=0 upto 4 :
>> >> >           label.llft("A", (4*i*cm,4*j*cm)) ;
>> >> >       endfor ;
>> >> >   endfor ;
>> >> > \stopMPcode
>> >> >
>> >> > \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
>> >> >
>> >>
>> ___________________________________________________________________________________
>> >> >
>> >>
>> >>
>> >>
>> ___________________________________________________________________________________
>> >> 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
>> >>
>> >>
>> ___________________________________________________________________________________
>> >>
>> >
>> >
>> >
>> ___________________________________________________________________________________
>> > 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
>> >
>> ___________________________________________________________________________________
>> >
>>
>>
>> ___________________________________________________________________________________
>> 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
>>
>> ___________________________________________________________________________________
>>
>

[-- Attachment #1.2: Type: text/html, Size: 8455 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 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] 9+ messages in thread

* Re: Show the letters of the alphabet with a loop (Metapost)
  2019-02-03 11:50         ` Fabrice Couvreur
@ 2019-02-03 20:19           ` Henri Menke
  2019-02-03 20:26             ` Alan Braslau
  0 siblings, 1 reply; 9+ messages in thread
From: Henri Menke @ 2019-02-03 20:19 UTC (permalink / raw)
  To: ntg-context

On 4/02/19 12:50 AM, Fabrice Couvreur wrote:
> Sorry Henri, but I still have a question : how to have the letters in bold
> type ?

Use the infont operator.  That info is a bit hidden in “2.10 Analyzing
pictures” of the MetaFun manual.

\starttext

\startMPcode
  for i=0 upto 3 :
      for j=0 upto 3 :
          draw unitsquare scaled 4cm shifted (4*i*cm,4*j*cm) ;
      endfor ;
  endfor ;
  for i=0 upto 4 :
      for j=0 upto 4 :
          label.llft(
              char(i*5+j+ASCII "A") infont "SerifBold*default",
              (4*i*cm,4*j*cm)
              ) withcolor white randomized (1,1,1) ;
      endfor ;
  endfor ;
\stopMPcode

\stoptext

> Thank you.
> Fabrice
> 
> Le dim. 3 févr. 2019 à 10:12, Fabrice Couvreur <fabrice1.couvreur@gmail.com>
> a écrit :
> 
>> Hi Henry
>> Thank you for everything.
>> Fabrice
>>
>> Le sam. 2 févr. 2019 à 20:58, Henri Menke <henrimenke@gmail.com> a écrit :
>>
>>> On 2/2/19 11:49 PM, Fabrice Couvreur wrote:
>>>> Hi Henri,
>>>> Great ! I would also like these letters to be randomly colored.
>>>
>>> You should play with randomseed, the starting color (here white) and the
>>> randomization amplitude (1,1,1).  You mileage may vary.
>>>
>>> \starttext
>>>
>>> \startMPcode
>>>   for i=0 upto 3 :
>>>       for j=0 upto 3 :
>>>           draw unitsquare scaled 4cm shifted (4*i*cm,4*j*cm) ;
>>>       endfor ;
>>>   endfor ;
>>>   for i=0 upto 4 :
>>>       for j=0 upto 4 :
>>>           label.llft(char(i*5+j+ASCII "A"), (4*i*cm,4*j*cm))
>>>               withcolor white randomized (1,1,1) ;
>>>       endfor ;
>>>   endfor ;
>>> \stopMPcode
>>>
>>> \stoptext
>>>
>>>> Thank you.
>>>> Fabrice
>>>>
>>>> Le sam. 2 févr. 2019 à 11:16, Henri Menke <henrimenke@gmail.com> a
>>> écrit :
>>>>
>>>>> On 2/2/19 10:47 PM, Fabrice Couvreur wrote:
>>>>>> The idea is to display the first 25 letters of the alphabet. The code
>>>>> below
>>>>>> shows the letter a to show what I want to do.
>>>>>> Thank you.
>>>>>> Fabrice
>>>>>
>>>>> Use char and ASCII.
>>>>>
>>>>> \starttext
>>>>>
>>>>> \startMPcode
>>>>>   for i=0 upto 3 :
>>>>>       for j=0 upto 3 :
>>>>>           draw unitsquare scaled 4cm shifted (4*i*cm,4*j*cm) ;
>>>>>       endfor ;
>>>>>   endfor ;
>>>>>   for i=0 upto 4 :
>>>>>       for j=0 upto 4 :
>>>>>           label.llft(char(i*5+j+ASCII "A"), (4*i*cm,4*j*cm)) ;
>>>>>       endfor ;
>>>>>   endfor ;
>>>>> \stopMPcode
>>>>>
>>>>> \stoptext
>>>>>
>>>>>>
>>>>>> \starttext
>>>>>>
>>>>>> \startMPcode
>>>>>>   for i=0 upto 3 :
>>>>>>       for j=0 upto 3 :
>>>>>>           draw unitsquare scaled 4cm shifted (4*i*cm,4*j*cm) ;
>>>>>>       endfor ;
>>>>>>   endfor ;
>>>>>>   for i=0 upto 4 :
>>>>>>       for j=0 upto 4 :
>>>>>>           label.llft("A", (4*i*cm,4*j*cm)) ;
>>>>>>       endfor ;
>>>>>>   endfor ;
>>>>>> \stopMPcode
>>>>>>
>>>>>> \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
>>>>>>
>>>>>
>>> ___________________________________________________________________________________
>>>>>>
>>>>>
>>>>>
>>>>>
>>> ___________________________________________________________________________________
>>>>> 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
>>>>>
>>>>>
>>> ___________________________________________________________________________________
>>>>>
>>>>
>>>>
>>>>
>>> ___________________________________________________________________________________
>>>> 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
>>>>
>>> ___________________________________________________________________________________
>>>>
>>>
>>>
>>> ___________________________________________________________________________________
>>> 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
>>>
>>> ___________________________________________________________________________________
>>>
>>
> 
> 
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
> 

___________________________________________________________________________________
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] 9+ messages in thread

* Re: Show the letters of the alphabet with a loop (Metapost)
  2019-02-03 20:19           ` Henri Menke
@ 2019-02-03 20:26             ` Alan Braslau
  2019-02-04  9:47               ` Fabrice Couvreur
  0 siblings, 1 reply; 9+ messages in thread
From: Alan Braslau @ 2019-02-03 20:26 UTC (permalink / raw)
  To: Henri Menke; +Cc: mailing list for ConTeXt users

On Mon, 4 Feb 2019 09:19:26 +1300
Henri Menke <henrimenke@gmail.com> wrote:

> Use the infont operator.

Easier yet, the string can contain the font switch \bf:

draw textext("\bf "&char(i)) ;

___________________________________________________________________________________
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] 9+ messages in thread

* Re: Show the letters of the alphabet with a loop (Metapost)
  2019-02-03 20:26             ` Alan Braslau
@ 2019-02-04  9:47               ` Fabrice Couvreur
  0 siblings, 0 replies; 9+ messages in thread
From: Fabrice Couvreur @ 2019-02-04  9:47 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 916 bytes --]

Hi,
@ Henri Thank you
@ Alan How to use it in my code ?
Thank you
Fabrice

Le dim. 3 févr. 2019 à 21:26, Alan Braslau <braslau.list@comcast.net> a
écrit :

> On Mon, 4 Feb 2019 09:19:26 +1300
> Henri Menke <henrimenke@gmail.com> wrote:
>
> > Use the infont operator.
>
> Easier yet, the string can contain the font switch \bf:
>
> draw textext("\bf "&char(i)) ;
>
>
> ___________________________________________________________________________________
> 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
>
> ___________________________________________________________________________________
>

[-- Attachment #1.2: Type: text/html, Size: 2372 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 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] 9+ messages in thread

end of thread, other threads:[~2019-02-04  9:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-02  9:47 Show the letters of the alphabet with a loop (Metapost) Fabrice Couvreur
2019-02-02 10:16 ` Henri Menke
2019-02-02 10:49   ` Fabrice Couvreur
2019-02-02 19:57     ` Henri Menke
2019-02-03  9:12       ` Fabrice Couvreur
2019-02-03 11:50         ` Fabrice Couvreur
2019-02-03 20:19           ` Henri Menke
2019-02-03 20:26             ` Alan Braslau
2019-02-04  9:47               ` Fabrice Couvreur

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).