Re: [NTG-context] Show the letters of the alphabet with a loop (Metapost)

2019-02-02 Thread Henri Menke
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  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
___


Re: [NTG-context] Automatic thousands separation in \unit

2019-02-02 Thread Axel Kielhorn

> Am 31.01.2019 um 15:00 schrieb Clyde Johnston :
> 
> Maybe this should be a language specific parameter.  How would you achieve a 
> similar result with the Indian numbering system, for instance?
>  
> Also, decimal and thousands separators vary from country to country.  In 
> France, for example, they use the comma for the decimal separator, and space 
> for the thousand separator.
>  
> Clyde

Shouldn’t \spaceddigits use the separator as defined by \setdigitmode and 
\setdigitorder?

Axel

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


Re: [NTG-context] Show the letters of the alphabet with a loop (Metapost)

2019-02-02 Thread Fabrice Couvreur
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  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
___


Re: [NTG-context] Show the letters of the alphabet with a loop (Metapost)

2019-02-02 Thread Henri Menke
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
___


[NTG-context] Show the letters of the alphabet with a loop (Metapost)

2019-02-02 Thread Fabrice Couvreur
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
___
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
___