[NTG-context] Re: Fwd: Re: how to apply gradient color to a piece of text?

2024-04-10 Thread Hans Hagen

On 4/10/2024 5:22 AM, seyal zavira wrote:
seams this code means to put a hidden text with same size behind 
metapost shape.
but it does not work properly for me (current version: 2024.04.01 08:59) 
and produce empty page but with searchable hidden text.


as mentioned kind = "outline" will be in the next upload so with the 
current one you need to use the also posted here for ... endfor variant



also when i edit the code and replace metapost part like this:

\startMPcode
      draw lmt_outline [
          kind = "outline",
          text = "\getbuffer[MyText]",
       ]
          withcolor red
       ;
\stopMPcode

it produces a selectable hidden text on top of body and red text that 
drawn by metapost below of that.


How can this problem be solved?

i attached the codes and pdf results.

On Mon, Apr 8, 2024 at 4:37 AM Hans Hagen > wrote:


On 4/8/2024 8:22 AM, seyal zavira wrote:
 > thank you Harban and Keith McKay.
 >
 >     \startMPpage
 >            picture tt ; tt := lmt_outline [
 >                kind = "path",
 >                text =
"\definedfont[name:texgyrepagellabold*default]foo
 >     f o o",
 >            ] ;
 >
 >            fill
 >               for i within tt : pathpart i && endfor cycle
 >               withshademethod "linear"
 >               withshadedirection down
 >               withshadecolors (red, blue) ;
 >     \stopMPpage
 >
 >     I'll add this:
 >
 >     \startMPpage
 >           draw lmt_outline [
 >               kind = "outline",
 >               text =
"\definedfont[name:texgyrepagellabold*default]foo f
 >     o o",
 >           ]
 >               withshademethod "linear"
 >               withshadedirection down
 >               withshadecolors (red, blue)
 >           ;
 >     \stopMPpage
 >
 >     so a single path option (no picture)
 >
 >     Hans
 >
 >
 > Thank you so much for the sample examples
 > it would be great to also make text select able in output pdf
 > the third example currently does not work. did you mean you will add
 > this feature for next updates?
we're talking outlines so that is paths which implies no search but you
can do this (Keith and/or Hraban will explain and/or wikify it)

\starttext

\startbuffer[MyText]
      \definedfont[name:texgyrepagellabold*default]foo f o o%
\stopbuffer

\startbuffer[MyText]
      \framed[align=normal,frame=off]{\input{tufte}}%
\stopbuffer

\setbox\scratchbox\hbox\bgroup
      \startMPcode
           draw lmt_outline [
               kind = "outline",
               text = "\getbuffer[MyText]",
           ]
               withshademethod "linear"
               withshadedirection down
               withshadecolors (red, blue)
           ;
      \stopMPcode
\egroup

\startoverlay


{\scale[height=\htdp\scratchbox,width=\wd\scratchbox]{\effect[hidden]{\getbuffer[MyText]}}}
      {\box\scratchbox}
\stopoverlay

\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  /
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl

webpage  : https://www.pragma-ade.nl  /
https://context.aanhet.net  (mirror)
archive  : https://github.com/contextgarden/context

wiki     : https://wiki.contextgarden.net


___


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


--

-
 

[NTG-context] Re: Fwd: Re: how to apply gradient color to a piece of text?

2024-04-09 Thread seyal zavira
seams this code means to put a hidden text with same size behind metapost
shape.
but it does not work properly for me (current version: 2024.04.01 08:59)
and produce empty page but with searchable hidden text.
also when i edit the code and replace metapost part like this:

\startMPcode
 draw lmt_outline [
 kind = "outline",
 text = "\getbuffer[MyText]",
  ]
 withcolor red
  ;
\stopMPcode

it produces a selectable hidden text on top of body and red text that drawn
by metapost below of that.

How can this problem be solved?

i attached the codes and pdf results.

On Mon, Apr 8, 2024 at 4:37 AM Hans Hagen  wrote:

> On 4/8/2024 8:22 AM, seyal zavira wrote:
> > thank you Harban and Keith McKay.
> >
> > \startMPpage
> >picture tt ; tt := lmt_outline [
> >kind = "path",
> >text = "\definedfont[name:texgyrepagellabold*default]foo
> > f o o",
> >] ;
> >
> >fill
> >   for i within tt : pathpart i && endfor cycle
> >   withshademethod "linear"
> >   withshadedirection down
> >   withshadecolors (red, blue) ;
> > \stopMPpage
> >
> > I'll add this:
> >
> > \startMPpage
> >   draw lmt_outline [
> >   kind = "outline",
> >   text = "\definedfont[name:texgyrepagellabold*default]foo f
> > o o",
> >   ]
> >   withshademethod "linear"
> >   withshadedirection down
> >   withshadecolors (red, blue)
> >   ;
> > \stopMPpage
> >
> > so a single path option (no picture)
> >
> > Hans
> >
> >
> > Thank you so much for the sample examples
> > it would be great to also make text select able in output pdf
> > the third example currently does not work. did you mean you will add
> > this feature for next updates?
> we're talking outlines so that is paths which implies no search but you
> can do this (Keith and/or Hraban will explain and/or wikify it)
>
> \starttext
>
> \startbuffer[MyText]
>  \definedfont[name:texgyrepagellabold*default]foo f o o%
> \stopbuffer
>
> \startbuffer[MyText]
>  \framed[align=normal,frame=off]{\input{tufte}}%
> \stopbuffer
>
> \setbox\scratchbox\hbox\bgroup
>  \startMPcode
>   draw lmt_outline [
>   kind = "outline",
>   text = "\getbuffer[MyText]",
>   ]
>   withshademethod "linear"
>   withshadedirection down
>   withshadecolors (red, blue)
>   ;
>  \stopMPcode
> \egroup
>
> \startoverlay
>
>
> {\scale[height=\htdp\scratchbox,width=\wd\scratchbox]{\effect[hidden]{\getbuffer[MyText]}}}
>  {\box\scratchbox}
> \stopoverlay
>
> \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 /
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
>
> ___
>
\starttext

\startbuffer[MyText]
 \definedfont[name:texgyrepagellabold*default]foo f o o%
\stopbuffer

\startbuffer[MyText]
 \framed[align=normal,frame=off]{a sample text}%
\stopbuffer

\setbox\scratchbox\hbox\bgroup
 \startMPcode
  draw lmt_outline [
  kind = "outline",
  text = "\getbuffer[MyText]",
  ]
  withshademethod "linear"
  withshadedirection down
  withshadecolors (red, blue)
  ;
 \stopMPcode
\egroup

\startoverlay

{\scale[height=\htdp\scratchbox,width=\wd\scratchbox]{\effect[hidden]{\getbuffer[MyText]}}}
 {\box\scratchbox}
\stopoverlay

\stoptext


test1.pdf
Description: Adobe PDF document
\starttext

\startbuffer[MyText]
 \definedfont[name:texgyrepagellabold*default]foo f o o%
\stopbuffer

\startbuffer[MyText]
 \framed[align=normal,frame=off]{a sample text}%
\stopbuffer

\setbox\scratchbox\hbox\bgroup
 \startMPcode
  draw lmt_outline [
  kind = "outline",
  text = "\getbuffer[MyText]",
  ]
  withcolor red;
  ;
 \stopMPcode
\egroup

\startoverlay

{\scale[height=\htdp\scratchbox,width=\wd\scratchbox]{\effect[hidden]{\getbuffer[MyText]}}}
 {\box\scratchbox}
\stopoverlay

\stoptext


test2.pdf
Description: Adobe PDF document

[NTG-context] Re: Fwd: Re: how to apply gradient color to a piece of text?

2024-04-08 Thread Hans Hagen

On 4/8/2024 8:22 AM, seyal zavira wrote:

thank you Harban and Keith McKay.

\startMPpage
       picture tt ; tt := lmt_outline [
           kind = "path",
           text = "\definedfont[name:texgyrepagellabold*default]foo
f o o",
       ] ;

       fill
          for i within tt : pathpart i && endfor cycle
          withshademethod "linear"
          withshadedirection down
          withshadecolors (red, blue) ;
\stopMPpage

I'll add this:

\startMPpage
      draw lmt_outline [
          kind = "outline",
          text = "\definedfont[name:texgyrepagellabold*default]foo f
o o",
      ]
          withshademethod "linear"
          withshadedirection down
          withshadecolors (red, blue)
      ;
\stopMPpage

so a single path option (no picture)

Hans


Thank you so much for the sample examples
it would be great to also make text select able in output pdf
the third example currently does not work. did you mean you will add 
this feature for next updates?
we're talking outlines so that is paths which implies no search but you 
can do this (Keith and/or Hraban will explain and/or wikify it)


\starttext

\startbuffer[MyText]
\definedfont[name:texgyrepagellabold*default]foo f o o%
\stopbuffer

\startbuffer[MyText]
\framed[align=normal,frame=off]{\input{tufte}}%
\stopbuffer

\setbox\scratchbox\hbox\bgroup
\startMPcode
 draw lmt_outline [
 kind = "outline",
 text = "\getbuffer[MyText]",
 ]
 withshademethod "linear"
 withshadedirection down
 withshadecolors (red, blue)
 ;
\stopMPcode
\egroup

\startoverlay

{\scale[height=\htdp\scratchbox,width=\wd\scratchbox]{\effect[hidden]{\getbuffer[MyText]}}}
{\box\scratchbox}
\stopoverlay

\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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Fwd: Re: how to apply gradient color to a piece of text?

2024-04-08 Thread seyal zavira
thank you Harban and Keith McKay.

\startMPpage
>   picture tt ; tt := lmt_outline [
>   kind = "path",
>   text = "\definedfont[name:texgyrepagellabold*default]foo f o o",
>   ] ;
>
>   fill
>  for i within tt : pathpart i && endfor cycle
>  withshademethod "linear"
>  withshadedirection down
>  withshadecolors (red, blue) ;
> \stopMPpage
>
> I'll add this:
>
> \startMPpage
>  draw lmt_outline [
>  kind = "outline",
>  text = "\definedfont[name:texgyrepagellabold*default]foo f o o",
>  ]
>  withshademethod "linear"
>  withshadedirection down
>  withshadecolors (red, blue)
>  ;
> \stopMPpage
>
> so a single path option (no picture)
>
> Hans
>

Thank you so much for the sample examples
it would be great to also make text select able in output pdf
the third example currently does not work. did you mean you will add this
feature for next updates?
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Fwd: Re: how to apply gradient color to a piece of text?

2024-04-07 Thread Hans Hagen

On 4/7/2024 7:42 PM, Henning Hraban Ramm wrote:

Am 07.04.24 um 19:05 schrieb Hans Hagen:

\startMPpage
 picture tt ; tt := lmt_outline [
 kind = "fillup",
 text = "\definedfont[name:texgyrepagellabold*default]foo f o o",
 ] xsized 12cm ;

 path bb ; bb := boundingbox tt ;
 path pp ; pp := bb enlarged 2cm ;

 fill pp
 withshademethod "linear"
 withshadedirection down
 withshadecolors (red, blue) ;

 draw tt withcolor green ;
\stopMPpage

no need to loop over tt


But the intention was to get a gradient _within_ the text.

Might there be a problem with the latest changes to gradients?

\startMPpage
 picture tt ; tt := lmt_outline [
 kind = "path",
 text = "\definedfont[name:texgyrepagellabold*default]foo f o o",
 ] ;

 fill
for i within tt : pathpart i && endfor cycle
withshademethod "linear"
withshadedirection down
withshadecolors (red, blue) ;
\stopMPpage

I'll add this:

\startMPpage
draw lmt_outline [
kind = "outline",
text = "\definedfont[name:texgyrepagellabold*default]foo f o o",
]
withshademethod "linear"
withshadedirection down
withshadecolors (red, blue)
;
\stopMPpage

so a single path option (no picture)

Hans


-
  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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Fwd: Re: how to apply gradient color to a piece of text?

2024-04-07 Thread Keith McKay
I've found my original file and the image is as Hraban says below. The 
code is the original in the post I quoted  and gives a green background 
with shaded colours in the text.


Best Wishes

Keith

On 07/04/2024 18:42, Henning Hraban Ramm wrote:

Am 07.04.24 um 19:05 schrieb Hans Hagen:

\startMPpage
 picture tt ; tt := lmt_outline [
 kind = "fillup",
 text = "\definedfont[name:texgyrepagellabold*default]foo f o 
o",

 ] xsized 12cm ;

 path bb ; bb := boundingbox tt ;
 path pp ; pp := bb enlarged 2cm ;

 fill pp
 withshademethod "linear"
 withshadedirection down
 withshadecolors (red, blue) ;

 draw tt withcolor green ;
\stopMPpage

no need to loop over tt


But the intention was to get a gradient _within_ the text.

Might there be a problem with the latest changes to gradients?

Hraban

___ 

If your question is of interest to others as well, please add an entry 
to the Wiki!


maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net 
(mirror)

archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___ 


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Fwd: Re: how to apply gradient color to a piece of text?

2024-04-07 Thread Henning Hraban Ramm

Am 07.04.24 um 19:05 schrieb Hans Hagen:

\startMPpage
     picture tt ; tt := lmt_outline [
     kind = "fillup",
     text = "\definedfont[name:texgyrepagellabold*default]foo f o o",
     ] xsized 12cm ;

     path bb ; bb := boundingbox tt ;
     path pp ; pp := bb enlarged 2cm ;

     fill pp
     withshademethod "linear"
     withshadedirection down
     withshadecolors (red, blue) ;

     draw tt withcolor green ;
\stopMPpage

no need to loop over tt


But the intention was to get a gradient _within_ the text.

Might there be a problem with the latest changes to gradients?

Hraban

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Fwd: Re: how to apply gradient color to a piece of text?

2024-04-07 Thread Hans Hagen





 Forwarded Message 
Subject: Re: [NTG-context] Re: how to apply gradient color to a piece of 
text?

Date: Sun, 7 Apr 2024 19:05:13 +0200
From: Hans Hagen 
To: Keith McKay 

On 4/7/2024 6:56 PM, Keith McKay wrote:
Not for me either. I used it somewhere so I'll need to look back in my 
files.


\startMPpage
picture tt ; tt := lmt_outline [
kind = "fillup",
text = "\definedfont[name:texgyrepagellabold*default]foo f o o",
] xsized 12cm ;

path bb ; bb := boundingbox tt ;
path pp ; pp := bb enlarged 2cm ;

fill pp
withshademethod "linear"
withshadedirection down
withshadecolors (red, blue) ;

draw tt withcolor green ;
\stopMPpage

no need to loop over tt



-
  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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: how to apply gradient color to a piece of text?

2024-04-07 Thread Keith McKay
Not for me either. I used it somewhere so I'll need to look back in my 
files.


Keith

On 07/04/2024 17:41, Henning Hraban Ramm wrote:

Am 07.04.24 um 15:51 schrieb Keith McKay:
Have a look at the posts starting on the 2 March 2021 with the 
subject heading "Shaded Large Letters in LMTX". Hans gave a great 
solution.


Neither for the example in
https://mailman.ntg.nl/archives/list/ntg-context@ntg.nl/message/SNL5YJ3NKZNFYAPG3MCZXA2363GWEJA3/ 


nor for that in
https://wiki.contextgarden.net/Cover_Pages#Empty_or_Transparent_letters
I get any text in the gradient box. The font is loaded.

Does it work for you?

(ConTeXt LMTX 2024.04.01 08:59 with self-compiled binary)
Hraban

___ 

If your question is of interest to others as well, please add an entry 
to the Wiki!


maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net 
(mirror)

archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___ 


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: how to apply gradient color to a piece of text?

2024-04-07 Thread Henning Hraban Ramm

Am 07.04.24 um 15:51 schrieb Keith McKay:
Have a look at the posts starting on the 2 March 2021 with the subject 
heading "Shaded Large Letters in LMTX". Hans gave a great solution.


Neither for the example in
https://mailman.ntg.nl/archives/list/ntg-context@ntg.nl/message/SNL5YJ3NKZNFYAPG3MCZXA2363GWEJA3/
nor for that in
https://wiki.contextgarden.net/Cover_Pages#Empty_or_Transparent_letters
I get any text in the gradient box. The font is loaded.

Does it work for you?

(ConTeXt LMTX 2024.04.01 08:59 with self-compiled binary)
Hraban

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: how to apply gradient color to a piece of text?

2024-04-07 Thread Keith McKay
Have a look at the posts starting on the 2 March 2021 with the subject 
heading "Shaded Large Letters in LMTX". Hans gave a great solution.


Best Wishes

Keith

On 07/04/2024 11:48, seyal.zav...@gmail.com wrote:

hi all,

when i look at luametafun manual there are some intresting examples that can 
apply gradient colors to metapost paths.
how i can apply this cool feature to a piece of text?

i tried the code below but it does not produce any result.

\definecolor[Gleft] [h=9f9393]
\definecolor[Gright] [h=ff1aa4]
\startMPpage
picture Mytext;
Mytext := btex hello etex;

draw lmt_shade [
picture="Mytext",
direction = "right",
domain= { 0, 2 },
colors= { "headerGleft", "headerGright" },
] ;
\stopMPpage
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] how to apply gradient color to a piece of text?

2024-04-07 Thread seyal . zavira
hi all,

when i look at luametafun manual there are some intresting examples that can 
apply gradient colors to metapost paths.
how i can apply this cool feature to a piece of text?

i tried the code below but it does not produce any result.

\definecolor[Gleft] [h=9f9393]
\definecolor[Gright] [h=ff1aa4]
\startMPpage
picture Mytext;
Mytext := btex hello etex;

draw lmt_shade [
picture="Mytext",
direction = "right",
domain= { 0, 2 },
colors= { "headerGleft", "headerGright" },
] ;
\stopMPpage
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] color profiles

2024-02-07 Thread Henning Hraban Ramm
Hi, I thought I could finally setup color management properly instead of 
converting all print PDFs with Acrobat Pro…


On the wiki, there’s something in https://wiki.contextgarden.net/PDFX; I 
updated it a bit, but we (I?) should combine it with 
https://wiki.contextgarden.net/PDF/A …


How can I add my own profiles to the distributed set in colorprofiles.xml?
Should I provide a colorprofiles.xml or .lua in texmf-local?

Hraban
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Color option in \setupinteraction doesn't work sometimes

2023-10-28 Thread redspacecube
Thank You,
It works great.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Color option in \setupinteraction doesn't work sometimes

2023-10-28 Thread Mikael Sundqvist
Hi,

you can try contrastcolor:

\setupinteraction[state=start,color=,contrastcolor=]

/Mikael

On Sat, Oct 28, 2023 at 1:54 PM Mia Bikey  wrote:
>
> Ah, wrong attachment.
> Here is the correct one.
>
> On Sat, Oct 28, 2023 at 5:18 PM Mia Bikey  wrote:
>>
>> Hi,
>> I was trying to get all my references black as it goes well along with black 
>> text but they appear red in some pages.
>>
>> I have reinstalled context in case there was some software issue but it is 
>> still the same.
>>
>> Here is a minimal working example:
>>
>> ConTeXt  ver: 2023.09.26 18:19 LMTX
>>
>> \setupinteraction[state=start, color=black]
>>
>> \starttext
>>
>> \placeformula[eq:equation1]
>> \startformula
>> x
>> \stopformula
>>
>> References are red on the first page \in[eq:equation1] 
>> \at{page}[eq:equation1]
>>
>> \input tufte
>> \input tufte
>> \input tufte
>> \input tufte
>> \input tufte
>>
>> Now they become black \in[eq:equation1] \at{page}[eq:equation1]
>>
>> \stoptext
>
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
>
> maillist : ntg-context@ntg.nl / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Color option in \setupinteraction doesn't work sometimes

2023-10-28 Thread Mia Bikey
Ah, wrong attachment.
Here is the correct one.

On Sat, Oct 28, 2023 at 5:18 PM Mia Bikey  wrote:

> Hi,
> I was trying to get all my references black as it goes well along with
> black text but they appear red in some pages.
>
> I have reinstalled context in case there was some software issue but it is
> still the same.
>
> Here is a minimal working example:
>
> ConTeXt  ver: 2023.09.26 18:19 LMTX
>
> \setupinteraction[state=start, color=black]
>
> \starttext
>
> \placeformula[eq:equation1]
> \startformula
> x
> \stopformula
>
> References are red on the first page \in[eq:equation1]
> \at{page}[eq:equation1]
>
> \input tufte
> \input tufte
> \input tufte
> \input tufte
> \input tufte
>
> Now they become black \in[eq:equation1] \at{page}[eq:equation1]
>
> \stoptext
>


This is how it looks 2.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Color option in \setupinteraction doesn't work sometimes

2023-10-28 Thread Mia Bikey
Hi,
I was trying to get all my references black as it goes well along with
black text but they appear red in some pages.

I have reinstalled context in case there was some software issue but it is
still the same.

Here is a minimal working example:

ConTeXt  ver: 2023.09.26 18:19 LMTX

\setupinteraction[state=start, color=black]

\starttext

\placeformula[eq:equation1]
\startformula
x
\stopformula

References are red on the first page \in[eq:equation1]
\at{page}[eq:equation1]

\input tufte
\input tufte
\input tufte
\input tufte
\input tufte

Now they become black \in[eq:equation1] \at{page}[eq:equation1]

\stoptext


This is how it looks.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


Re: [NTG-context] Color property of \setupurl

2022-08-20 Thread Wolfgang Schuster via ntg-context

Max Chernoff via ntg-context schrieb am 20.08.2022 um 08:41:

Hi,


Could someone clarify me in what kind of context the color of a
hyperlink is controlled by the "color" property of \setupurl?

This code:

\show\setupurl
\showthe\everysetupurl

produces:


> \setupurl=frozen protected macro: [#1]->\ifarguments \or 
\mult_interfaces_get_parameters \??url [#1]\fi \the \everysetupurl
>

so \setupurl doesn't appear to do anything at all. I suspect that it is an

old MkII relic, and can be safely ignored.


The command has an effect as can be seen below, \from is only affected 
when you omit the fourth argument of \useurl.


\useurl [contextwiki] [https://wiki.contextgarden.net/Main_Page] [] 
[\CONTEXT\ Wiki]

%\useurl [ctan]    [https://ctan.org/]    [] [CTAN]
\useurl [ctan]    [https://ctan.org/]

\starttext

\url[contextwiki]

\start \setupurl[style=italic]
\url[contextwiki]
\stop

\start \setupurl[color=red]
\url[contextwiki]
\stop

\blank

\from[ctan]

\start \setupurl[style=italic]
\from[ctan]
\stop

\start \setupurl[color=red]
\from[ctan]
\stop

\stoptext

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Color property of \setupurl

2022-08-20 Thread Max Chernoff via ntg-context
Hi,

> Could someone clarify me in what kind of context the color of a 
> hyperlink is controlled by the "color" property of \setupurl?

This code:

   \show\setupurl
   \showthe\everysetupurl
   
produces:

   > \setupurl=frozen protected macro: [#1]->\ifarguments \or 
\mult_interfaces_get_parameters \??url [#1]\fi \the \everysetupurl 
   > 
   
so \setupurl doesn't appear to do anything at all. I suspect that it is an
old MkII relic, and can be safely ignored.

-- Max
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Color property of \setupurl

2022-08-19 Thread Joaquín Ataz López via ntg-context

Good morning everyone.

I have been doing some tests on the "color" property of 
\setupinteraction and the "color" property of \setupurl and my feeling 
is that the color of the hyperlinks is always controlled by 
\setupinteraction.


Could someone clarify me in what kind of context the color of a 
hyperlink is controlled by the "color" property of \setupurl?



--
Joaquín Ataz López
Derecho civil
Universidad de Murcia | j...@um.es

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] return a labeltext with color...

2022-06-24 Thread Willi Egger via ntg-context
Hans, Wolfgang,

I am so happy to receive your immediate answers. — Thanks a lot, the problem is 
solved and I get the colored labeltext!

Thank you

Willi

> On 24 Jun 2022, at 19:19, Hans Hagen via ntg-context  
> wrote:
> 
> On 6/24/2022 4:34 PM, Willi Egger via ntg-context wrote:
>> Hi all,
>> Sorry for bothering you again.
>> I would like that lua is returning a colored string, which is a label-text.
>> The following does not work, the labeltext remains black, there is no error 
>> though:
>> return context.color({"red"},context.labeltext(s))
> 
> context.color({"red"},function() context.labeltext(s) end)
> 
>> What is the correct approach?
>> Thanks for enlighten me :-)
>> Willi
>> ___
>> 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
> ___

___
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] return a labeltext with color...

2022-06-24 Thread Hans Hagen via ntg-context

On 6/24/2022 4:34 PM, Willi Egger via ntg-context wrote:

Hi all,


Sorry for bothering you again.

I would like that lua is returning a colored string, which is a label-text.

The following does not work, the labeltext remains black, there is no error 
though:

return context.color({"red"},context.labeltext(s))


context.color({"red"},function() context.labeltext(s) end)



What is the correct approach?

Thanks for enlighten me :-)

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


Re: [NTG-context] return a labeltext with color...

2022-06-24 Thread Wolfgang Schuster via ntg-context

Willi Egger via ntg-context schrieb am 24.06.2022 um 16:34:

Hi all,


Sorry for bothering you again.

I would like that lua is returning a colored string, which is a label-text.

The following does not work, the labeltext remains black, there is no error 
though:

return context.color({"red"},context.labeltext(s))

What is the correct approach?


\mainlanguage[fr]

\starttext

\startluacode
context.color( { "red" }, context.nested.labeltext("january") )
\stopluacode

\stoptext

Wolfgang

___
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] return a labeltext with color...

2022-06-24 Thread Willi Egger via ntg-context
Hi all,


Sorry for bothering you again.

I would like that lua is returning a colored string, which is a label-text.

The following does not work, the labeltext remains black, there is no error 
though:

return context.color({"red"},context.labeltext(s))

What is the correct approach?

Thanks for enlighten me :-)

Willi
___
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] Color profiles (was: Bloody PDF boxes)

2021-11-01 Thread Henning Hraban Ramm via ntg-context

> Am 01.11.2021 um 08:58 schrieb Henning Hraban Ramm via ntg-context 
> :
> 
> And it seems like GWG is in conflict with the PDF association, at least GWG’s 
> recommendations contradict PDF/X.

GWG doesn’t want to contradict but has a quality focus, see 
https://www.pdfa.org/further-quality-requirements-pdfx-plus/
(I attended a few workshops by the author Stephan Jaeggi in about 2005...)

Hraban
___
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] Color profiles (was: Bloody PDF boxes)

2021-11-01 Thread Henning Hraban Ramm via ntg-context

> Am 01.11.2021 um 08:05 schrieb Floris van Manen via ntg-context 
> :
> 
> this document:
>> and also extendedhttps://wiki.contextgarden.net/PDFX  a bit.
> 
> contains a link to the Ghent Workshop that returns a 404
> 
> [here] -> http://www.gwg.org/recommended_ICC_profiles.phtm -> 404

Thank you. The information from 2008 was outdated anyway; GWG’s latest 
recommendations from 2015 don’t contain ICC profiles any more (maybe their 
settings for commercial applications do, didn’t check).

And it seems like GWG is in conflict with the PDF association, at least GWG’s 
recommendations contradict PDF/X.

I’ll try to reflect both...

From my personal experience:

– If you don’t exactly know what you’re doing, you should use sRGB as RGB 
working color space, because most cameras and scanners use it. Yes, parts of 
the color space are outside the printable range, that’s why GWG (used to) 
recommend ECI RGB.

– Don’t use CMYK images, since they’re bigger, and if they’re not in the same 
CMYK color space as the one used by the printshop, the conversion is more lossy 
than any RGB-CMYK conversion.
– You can use DeviceCMYK (i.e. without profile) for graphical elements, that’s 
what GWG recommends, but it’s against PDF/X-3+.

– Use the latest FOGRA (Coated/Uncoated) CMYK profile as output intent, at 
least that’s what German/European printshops use in offset and digital 
printing. If not, your printshop should tell you which profile they use.
– For printing in the USA, use a SWOP CMYK profile as output intent. (SWOP and 
Euroscale CMYK colors are visibly different!)
– I don’t know about printshops in other parts of the world.

Hraban
___
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] changes of color

2021-09-21 Thread fv leung via ntg-context
\starttext

It seems that the problem comes up when the same color as the surrounding
text is used in MPcode.\par
{
  \red
  text red\par
  \startMPcode
drawoptions(withcolor blue);
label("text blue in MPcode", origin);
  \stopMPcode
  \par
  text still red\par
  But\par
  text red\par
  \startMPcode
drawoptions(withcolor red);
label("text red in MPcode", origin);
  \stopMPcode
  \par
  text turns black\par
  Can get over with this:\par
  text red\par
  \startMPcode
drawoptions(withcolor red);
label("text red in MPcode", origin);
label("\null", origin); % add this seems to solve the problem
  \stopMPcode
  \par
  text still red\par
  Don't know why. Just an observation.
}

\stoptext

Thierry Horsin via ntg-context  於 2021年9月21日 週二
下午8:00寫道:

> Hi everybody
>
> After some part of a tex file where there is some startMPcode section the
> color of the text (e.g. blue) changes to black up until the next page in
> the pdf.
>
> Is there something I am missing ?
> Thank you.
> Thierry
>
> ___
> 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] changes of color

2021-09-21 Thread Thierry Horsin via ntg-context
Hi everybody

After some part of a tex file where there is some startMPcode section the color 
of the text (e.g. blue) changes to black up until the next page in the pdf.

Is there something I am missing ?
Thank you.
Thierry
___
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] Every odd row with a background color with extreme tables?

2021-07-23 Thread T. Kurt Bond
Thanks, this has been very helpful.

On Fri, Jul 23, 2021 at 1:02 PM Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> T. Kurt Bond schrieb am 23.07.2021 um 17:55:
> > With natural tables I can define a color, tell the table to have to
> > use color backgrounds and turn the frame off and get every odd row in
> > all my tables will have that color for the background.
> >
> > == Example
> 
> > \definecolor[grayback][r=.8,g=.8,b=.8]
> > \setupTABLE[background=color,frame=off]
> > \setupTABLE[row][odd][backgroundcolor=grayback]
> > == End of Example
> =
> >
> > Can I get this same effect with extreme tables?
> >
> > My first try with extreme tables looked like this:
> >
> > == Example
> ====
> > \definecolor[tablebackground][r=.8,g=.8,b=.8]
> > \setupxtable[background=color,frame=off]
> > \setupxtable[row][odd][backgroundcolor=tablebackground]
> > == End of Example
> =
> >
> > That didn't seem to have any effect.
> >
> > Is there a way to have every odd row of every table in my document
> > have color background?
>
> \startuseMPgraphic{xtablerow}
>  fill OverlayBox withcolor "gray";
> \stopuseMPgraphic
>
> \defineoverlay
>[xtablerow]
>[\ifodd\currentxtablerow
>   \useMPgraphic{xtablerow}%
> \fi]
>
> \starttext
>
> \startxtable[frame=off,background=xtablerow]
> \dorecurse{20}
>{\startxrow
>   \startxcell Column 1 \stopxcell
>   \startxcell Column 2 \stopxcell
> \stopxrow}
> \stopxtable
>
> \stoptext
>
> Wolfgang
>
> ___
> 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
>
> ___
>


-- 
T. Kurt Bond, tkurtb...@gmail.com, https://tkurtbond.github.io
___
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] Every odd row with a background color with extreme tables?

2021-07-23 Thread Wolfgang Schuster

T. Kurt Bond schrieb am 23.07.2021 um 17:55:

With natural tables I can define a color, tell the table to have to
use color backgrounds and turn the frame off and get every odd row in
all my tables will have that color for the background.

== Example 
\definecolor[grayback][r=.8,g=.8,b=.8]
\setupTABLE[background=color,frame=off]
\setupTABLE[row][odd][backgroundcolor=grayback]
== End of Example =

Can I get this same effect with extreme tables?

My first try with extreme tables looked like this:

== Example 
\definecolor[tablebackground][r=.8,g=.8,b=.8]
\setupxtable[background=color,frame=off]
\setupxtable[row][odd][backgroundcolor=tablebackground]
== End of Example =

That didn't seem to have any effect.

Is there a way to have every odd row of every table in my document
have color background?


\startuseMPgraphic{xtablerow}
fill OverlayBox withcolor "gray";
\stopuseMPgraphic

\defineoverlay
  [xtablerow]
  [\ifodd\currentxtablerow
 \useMPgraphic{xtablerow}%
   \fi]

\starttext

\startxtable[frame=off,background=xtablerow]
\dorecurse{20}
  {\startxrow
 \startxcell Column 1 \stopxcell
 \startxcell Column 2 \stopxcell
   \stopxrow}
\stopxtable

\stoptext

Wolfgang
___
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] Every odd row with a background color with extreme tables?

2021-07-23 Thread Henning Hraban Ramm

> Am 23.07.2021 um 17:55 schrieb T. Kurt Bond :
> 
> With natural tables I can define a color, tell the table to have to
> use color backgrounds and turn the frame off and get every odd row in
> all my tables will have that color for the background.
> 
> Can I get this same effect with extreme tables?
> 
> My first try with extreme tables looked like this:
> 
> == Example 
> 
> \definecolor[tablebackground][r=.8,g=.8,b=.8]
> \setupxtable[background=color,frame=off]
> \setupxtable[row][odd][backgroundcolor=tablebackground]
> == End of Example 
> =
> 
> That didn't seem to have any effect.

\setupxtables has only a limited set of parameters:
https://wiki.contextgarden.net/Command/setupxtable

> Is there a way to have every odd row of every table in my document
> have color background?

As far as I can see, only via “styles” that you can setup with \definextable:

https://www.pragma-ade.com/general/manuals/xtables-mkiv.pdf


Hraban
___
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] Every odd row with a background color with extreme tables?

2021-07-23 Thread T . Kurt Bond
With natural tables I can define a color, tell the table to have to
use color backgrounds and turn the frame off and get every odd row in
all my tables will have that color for the background.

== Example 
\definecolor[grayback][r=.8,g=.8,b=.8]
\setupTABLE[background=color,frame=off]
\setupTABLE[row][odd][backgroundcolor=grayback]
== End of Example =

Can I get this same effect with extreme tables?

My first try with extreme tables looked like this:

== Example 
\definecolor[tablebackground][r=.8,g=.8,b=.8]
\setupxtable[background=color,frame=off]
\setupxtable[row][odd][backgroundcolor=tablebackground]
== End of Example =

That didn't seem to have any effect.

Is there a way to have every odd row of every table in my document
have color background?

-- 
T. Kurt Bond, tkurtb...@gmail.com, tkurtbond.github.io and tkb.tx0.org
___
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] another MetaPost question (this time on ConTeXt->MetaPost color transfer)

2021-07-22 Thread Rudd, Kevin
... fixed minor typo that actually produced new information! invalid color => 
black, valid color => transparent black!---it seems like the color disappears 
in the transfer but not the transparency.

Hey---

There seems to be a change with color transfer from ConTeXt to MetaPost. Using 
string references to defined (spot?) colors seemed to work but now does not; 
all of my colorful figures are now rendered only in shades of gray when using 
defined (spot?) colors….

The figure drawn by the MWE should have a dark orange border and a transparent 
(thin) orange fill. However, all colors of this sort seem to end up being a 
single shade of gray (e.g. black), rendering a box perfect for Halloween use 
but not for my current purposes. Is there a change to how colors defined in 
ConTeXt are referenced in MetaPost that I've missed or is there an issue with 
transferring color (name or parameter) information to MetaPost? Defined (spot?) 
colors work fine in ConTeXt but not in MetaPost.

Many thanks,
 ---K



% system  > ConTeXt  ver: 2021.07.21 19:54 LMTX  fmt: 2021.7.22  int: 
english/english

\startMPdefinitions

presetparameters "parameters_Test"
[
]

def Test =
applyparameters "parameters_Test" "do_Test"
enddef;

def do_Test =
pushparameters "parameters_Test";

string p;  p = getparameter "prefix";  show p;
string c;  c = getparameter "color";   show c;
path   s;  s = unitsquare scaled 10cm; show s;
path   t;  t = unitsquare scaled  5cm; show t;  % new

fill s   withcolor p&":" % tweaked
fill t   withcolor p % new (and 
old)
draw s  withpen pencircle scaled 5pt withcolor   c;
enddef;

\stopMPdefinitions

\starttext

\definespotcolor[Thin:orange][orange][p=1,a=normal,t=0.5]

\color[orange]{hello}

\startalignment[center]
    \startplacefigure
\startMPcode
Test [ prefix = "Thin", color = "orange" ];
\stopMPcode
\stopplacefigure
\stopalignment

\color[Thin:orange]{goodbye}

\stoptext




Kevin W. Rudd, Ph.D.
CAPT, USN (Ret)

Computer Architecture & Computer Engineering
Advanced Computing Systems (ACS) Research Program
Laboratory for Physical Sciences (LPS)

443-654-7878
ke...@lps.umd.edu<mailto:ke...@lps.umd.edu>

Visiting Research Professor
United States Naval Academy

r...@usna.edu<mailto:r...@usna.edu>



___
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] color conversion eats note

2021-06-27 Thread Wolfgang Schuster

Steffen Wolfrum schrieb am 27.06.2021 um 15:55:

uncommenting the following \setupcolors changes magenta to black when running 
luatex.

but when running luametatex the footnote is crippled to «error»:


\starttext

\definestartstop[UL][color=magenta]

%\setupcolors[state=stop,conversion=never]% <- bw with lualatex, but «error» 
with luametatex?

\input ward \footnote{foo foo \startUL{}foo\stopUL{} foo foo foo foo foo 
\startUL{}foo\stopUL{} error}

\stoptext



Don't use extra stuff (e.g. footnotes) when they aren't necessary to 
reproduce the error.



%\setupcolors[cmyk=no,rgb=no,conversion=no]
%\setupcolors[state=stop,conversion=no]

\setcolormodel[none]

\starttext

\dorecurse{20}{\convertnumber{word}{#1} }%
\color[red]{not a number}
\dorecurse{20}{\convertnumber{word}{#1} }

\stoptext


Wolfgang
___
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] color conversion eats note

2021-06-27 Thread Steffen Wolfrum
uncommenting the following \setupcolors changes magenta to black when running 
luatex.

but when running luametatex the footnote is crippled to «error»:


\starttext

\definestartstop[UL][color=magenta]

%\setupcolors[state=stop,conversion=never]% <- bw with lualatex, but «error» 
with luametatex?

\input ward \footnote{foo foo \startUL{}foo\stopUL{} foo foo foo foo foo 
\startUL{}foo\stopUL{} error}

\stoptext



Steffen
___
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] lmtx and defined placeinitial color

2021-05-25 Thread Eduardo Bohoyo
You are welcome. Obviously, it's a dirty trick. For example, it falls 
down if we have a non-white background on our page.


Hopefully LMTX won't take long to update.

Eduardo Bohoyo

El 26/5/21 a las 0:01, jbf escribió:
Thanks Eduardo. Hans had seen the problem and the latest upgrade 
solves it. But I'll keep your little trick in mind!


Julian

On 25/5/21 9:35 pm, Eduardo Bohoyo wrote:
I have just seen that I also experience the same problem. I didn't 
realise it. I have provisionally "solved" it with an unfancy 
workaround. For instance, in your case it could be something like this:


\definecolor[dropcapitals][t=0.40,a=1]

This is not ideal. I know. But for the moment I can't think of 
anything better than to include the transparency trick.


Eduardo Bohoyo


___ 

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] lmtx and defined placeinitial color

2021-05-25 Thread jbf
Thanks Eduardo. Hans had seen the problem and the latest upgrade solves 
it. But I'll keep your little trick in mind!


Julian

On 25/5/21 9:35 pm, Eduardo Bohoyo wrote:
I have just seen that I also experience the same problem. I didn't 
realise it. I have provisionally "solved" it with an unfancy 
workaround. For instance, in your case it could be something like this:


\definecolor[dropcapitals][t=0.40,a=1]

This is not ideal. I know. But for the moment I can't think of 
anything better than to include the transparency trick.


Eduardo Bohoyo


___ 

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] lmtx and defined placeinitial color

2021-05-25 Thread Eduardo Bohoyo
I have just seen that I also experience the same problem. I didn't 
realise it. I have provisionally "solved" it with an unfancy workaround. 
For instance, in your case it could be something like this:


\definecolor[dropcapitals][t=0.40,a=1]

This is not ideal. I know. But for the moment I can't think of anything 
better than to include the transparency trick.


Eduardo Bohoyo


___
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] lmtx and defined placeinitial color

2021-05-25 Thread Hans Hagen

On 5/25/2021 2:10 AM, jbf wrote:
If I run the following in lmtx, the defined color is not recognized and 
I get black instead. If I run it as mkiv with --luatex, I get the 
darkgray I defined. Is there something else I need to do for lmtx?


\definecolor[darkgray][s=.4]

\setupinitial[color=darkgray,font=adellesemibold at 46pt,distance=3pt,n=3]

\starttext

\placeinitial{M}{\sc aking sense of the world} at any time is a fraught 
exercise...


\stoptext

fixed in next upload


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


[NTG-context] lmtx and defined placeinitial color

2021-05-24 Thread jbf
If I run the following in lmtx, the defined color is not recognized and 
I get black instead. If I run it as mkiv with --luatex, I get the 
darkgray I defined. Is there something else I need to do for lmtx?


\definecolor[darkgray][s=.4]

\setupinitial[color=darkgray,font=adellesemibold at 46pt,distance=3pt,n=3]

\starttext

\placeinitial{M}{\sc aking sense of the world} at any time is a fraught 
exercise...


\stoptext

Julian

___
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] Color problem

2021-05-21 Thread Rik Kabel

On 5/21/2021 00:26, Wolfgang Schuster wrote:

Aditya Mahajan schrieb am 21.05.2021 um 04:47:

On Thu, 20 May 2021, Rik Kabel wrote:


Consider the following example:

    \define \HighlightColor {red}

Why not just use:

\definecolor[HighlightColor][red]

and then use color=HighlightColor, etc.


This is the better way to create unique color names but the problem
in the example was the use of \define instead of \defineexpandable.

\defineexpandable\HighlightColor{red}

Wolfgang


Wolfgang and Aditya,

Thank you both for the lesson.

Is the difference between MkIV (--luatex) and LMTX due to stricter 
application of expandability in LMTX?


--
Rik

___
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] Color problem

2021-05-20 Thread Wolfgang Schuster

Aditya Mahajan schrieb am 21.05.2021 um 04:47:

On Thu, 20 May 2021, Rik Kabel wrote:


Consider the following example:

\define \HighlightColor {red}

Why not just use:

\definecolor[HighlightColor][red]

and then use color=HighlightColor, etc.


This is the better way to create unique color names but the problem
in the example was the use of \define instead of \defineexpandable.

\defineexpandable\HighlightColor{red}

Wolfgang
___
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] Color problem

2021-05-20 Thread Aditya Mahajan
On Thu, 20 May 2021, Rik Kabel wrote:

> Consider the following example:
> 
>\define \HighlightColor {red}

Why not just use:

\definecolor[HighlightColor][red] 

and then use color=HighlightColor, etc.

>\definehighlight[RED][color=\HighlightColor]
>\definelabel[AA][alternative=inright,headcolor=\HighlightColor,text=]
>\definelabel[BB][alternative=inright,headcolor=red,text=]
>\noheaderandfooterlines
>\starttext
>\hsize3cm
>Is the label red?\AA
> 
>Is the label red?\BB
> 
>\RED{Is this line red?}
>\stoptext

Aditya
___
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] Color problem

2021-05-20 Thread Rik Kabel

Consider the following example:

   \define \HighlightColor {red}
   \definehighlight[RED][color=\HighlightColor]
   \definelabel[AA][alternative=inright,headcolor=\HighlightColor,text=]
   \definelabel[BB][alternative=inright,headcolor=red,text=]
   \noheaderandfooterlines
   \starttext
   \hsize3cm
   Is the label red?\AA

   Is the label red?\BB

   \RED{Is this line red?}
   \stoptext

When run with --luatex, I get the colors I expect, as:

When run as lmtx, I get this:

All test were run with ConTeXt  ver: 2021.05.20 11:08 MKIV  fmt: 2021.5.20.

This worked very well for a long time, then became a problem a while 
ago, then it resolved, and once more it is a problem.


--
Rik

___
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] color epub reader

2020-11-09 Thread Taco Hoekwater


> On 6 Nov 2020, at 20:22, Hans Hagen  wrote:
> 
> Hi,
> 
> Playing with a pocketbook color epub reader (I just put some manuals on it):
> 
> - the colors are not bright enough, also not with lights on, why rgb and not 
> cmyk (i only tested pdf)

If I understand the tech right, it uses traditional e-ink pigments and a 
filter. The filter is subtractive, which means rgb, and that is also why it is 
not all that bright.

Best wishes,
Taco



___
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] color epub reader

2020-11-06 Thread Hans Hagen

Hi,

Playing with a pocketbook color epub reader (I just put some manuals on 
it):


- the colors are not bright enough, also not with lights on, why rgb and 
not cmyk (i only tested pdf)


- the viewer is buggy and freezes, color demands more mem i think, but 
after an upodate it got a bit better


- resolution not good enough (yet)

But we keep hoping ...

Hans

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


Re: [NTG-context] color problem

2020-10-02 Thread Henri Menke
On 01/10/20, 20:55, Susanne G. Loeber wrote:
> Dear Reader,
> 
> I have a colored section, text in another color and a TikZ picture with a
> differently colored node, following each other. However, either the node
> gets the wrong color or the following paragraph, see example below.
> 
> Is there something wrong with the section settings? How do I get all the
> colors right without using a paragraph in between?

From experience, this usually works:

\prependvalue{starttikzpicture}{\dontleavehmode\forcecolorhack}

Cheers, Henri

> 
> \setuphead[chapter]
> 
> [
> 
> style={\tfd},
> 
> color={A2plus},
> 
> ]
> 
> \setuphead[section]
> 
> [
> 
> style={\tfc},
> 
> color={A3plus},
> 
> ]
> 
> 
> \definecolor[A1plus][h=5CAF00]
> 
> \definecolor[A2plus][h=B6437E]
> 
> \definecolor[A3plus][h=606ABD]
> 
> \definecolor[A4plus][h=FFC700]
> 
> \definecolor[A5plus][h=D0202B]
> 
> \definecolor[A6plus][h=EF8600]
> 
> \definecolor[A7plus][h=0082AA]
> 
> 
> \setupcolors[textcolor=A1plus]
> 
> 
> \usemodule[tikz]
> 
> 
> 
> \starttext
> 
> 
> \startchapter[title={Colour test}, ref=colourtest]
> 
> 
> \startsection[title={Section}]
> 
> \starttikzpicture
> 
> \draw[text=A6plus] (0,0) rectangle (2,1) node[right] {node text should be
> orange};
> 
> \stoptikzpicture
> 
> 
> \par This a paragraph which gets the colour of the section for no reason.
> 
> 
> \stopsection
> 
> 
> \stopchapter
> 
> 
> \startchapter[title={Colour test 2}, ref=colourtest]
> 
> 
> \startsection[title={Another section }]
> 
> 
> \par This a paragraph in the appropriate text color (green).
> 
> 
> 
> \starttikzpicture
> 
> \draw[text=A6plus] (0,0) rectangle (2,1) node[right] {node text is orange};
> 
> \stoptikzpicture
> 
> 
> \stopsection
> 
> 
> \stopchapter
> 
> \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
___


Re: [NTG-context] color problem

2020-10-02 Thread Taco Hoekwater
Hi,

> On 1 Oct 2020, at 20:55, Susanne G. Loeber  wrote:
> 
> Dear Reader, 
> 
> I have a colored section, text in another color and a TikZ picture with a 
> differently colored node, following each other. However, either the node gets 
> the wrong color or the following paragraph, see example below. 
> 
> Is there something wrong with the section settings? How do I get all the 
> colors right without using a paragraph in between? 

Some of the blackbox magic in the tikz module is confusing ConTeXt, it seems. 
This works:

  \draw (0,0) rectangle (2,1) node[right] {\color[A6plus]{node text should be 
orange}}; 

But that’s all I know. I do not understand the tikz module at all.

Best wishes,
Taco
___
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] color problem

2020-10-01 Thread Susanne G. Loeber
Dear Reader,

I have a colored section, text in another color and a TikZ picture with a
differently colored node, following each other. However, either the node
gets the wrong color or the following paragraph, see example below.

Is there something wrong with the section settings? How do I get all the
colors right without using a paragraph in between?

\setuphead[chapter]

[

style={\tfd},

color={A2plus},

]

\setuphead[section]

[

style={\tfc},

color={A3plus},

]


\definecolor[A1plus][h=5CAF00]

\definecolor[A2plus][h=B6437E]

\definecolor[A3plus][h=606ABD]

\definecolor[A4plus][h=FFC700]

\definecolor[A5plus][h=D0202B]

\definecolor[A6plus][h=EF8600]

\definecolor[A7plus][h=0082AA]


\setupcolors[textcolor=A1plus]


\usemodule[tikz]



\starttext


\startchapter[title={Colour test}, ref=colourtest]


\startsection[title={Section}]

\starttikzpicture

\draw[text=A6plus] (0,0) rectangle (2,1) node[right] {node text should be
orange};

\stoptikzpicture


\par This a paragraph which gets the colour of the section for no reason.


\stopsection


\stopchapter


\startchapter[title={Colour test 2}, ref=colourtest]


\startsection[title={Another section }]


\par This a paragraph in the appropriate text color (green).



\starttikzpicture

\draw[text=A6plus] (0,0) rectangle (2,1) node[right] {node text is orange};

\stoptikzpicture


\stopsection


\stopchapter

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


Re: [NTG-context] color question

2020-08-24 Thread Henning Hraban Ramm


> Am 24.08.2020 um 01:15 schrieb jbf :
> 
> I have a very basic question about color use that someone will be able to 
> answer easily. The background to the question is that (i) I am completely new 
> to this scene of commercially[offset] print-ready material as distinct from 
> what is required on screen (ii) I am using Mk IV (iii) I need spot colors set 
> up for cmyk, and for now I need shades between black and white (e.g. light 
> gray) for a simple design feature.
> 
> My question is this: is the use of color keywords sufficient? Or in other 
> words, have predefined color names like lighgray already been defined in, say 
> cmyk terms behind the scenes, or must I instead 
> \definecolor[lightgray][c=10,m=7,y=5,k=0],   (or perhaps \definespotcolor 
> with those dimensions, or do I need both)?

First: Color parts use decimal numbers from 0 to 1.

Even if some color names are predefined, you should define your grays yourself 
– either as shades of black only or maybe with a bit of cyan. Grays in more 
(process) colors are unstable and might get a tint (color cast) you don’t want. 
(Of course you could use other colors than cyan for some tinting, depending on 
your work.)

E.g. I often \definecolor[deepblack][c=.3,k=1] for black areas; the cyan 
portion evens out some irregularities in print.
Because I don’t trust ConTeXt’s (or my) color setup, I also 
\definecolor[cmykblack][k=1] to avoid “RGB black”. (But 
\setupcolor[cmyk=yes,rgb=no,overprint=yes] should handle that already.)

If you want to use grays as spot colors (e.g. Pantone) you must define them as 
such – but usually you don’t want (to pay for) more than one spot color. Spot 
gray makes sense if you have big areas of that color, since 100% spot color 
looks better than any percent rastered black.

See also:
https://wiki.contextgarden.net/Color
https://wiki.contextgarden.net/Spot_Colors


Hraban (printing engineer)

___
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] color question

2020-08-23 Thread jbf
I have a very basic question about color use that someone will be able 
to answer easily. The background to the question is that (i) I am 
completely new to this scene of commercially[offset] print-ready 
material as distinct from what is required on screen (ii) I am using Mk 
IV (iii) I need spot colors set up for cmyk, and for now I need shades 
between black and white (e.g. light gray) for a simple design feature.


My question is this: is the use of color keywords sufficient? Or in 
other words, have predefined color names like lighgray already been 
defined in, say cmyk terms behind the scenes, or must I instead 
\definecolor[lightgray][c=10,m=7,y=5,k=0],   (or perhaps 
\definespotcolor with those dimensions, or do I need both)?


Julian

___
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] Color specific cells in a table

2020-08-23 Thread Fabrice Couvreur
Hello,
This table will be used to illustrate Pascal's triangle. I manage to color
the cell (2,0) but I would also like to color the cells (2,1) and (3,1). Is
it possible ?
Thank you
Fabrice

\usecolors[X11]

\starttext
\startluacode

  local background_one = {
   align = "middle",
   style = "type",
   background = "color",
   backgroundcolor = "thistle2",
   foregroundcolor = "white",
  }

   local background_two = {
   align = "middle",
   style = "type",
   background = "color",
   backgroundcolor = "peachpuff",
   foregroundcolor = "white",
  }

  context.startxtable({"align={middle,lohi},
width=1cm,offset=0.8ex,bodyfont=9pt,framecolor=cyan"})
  context.startxrow()
  context.startxcell({"background=color,backgroundcolor=thistle2"})
  context("")
  context.stopxcell()
  for j = 0, 7 do

context.startxcell({"foregroundstyle=bold,background=color,backgroundcolor=thistle2"})
  context(j)
  context.stopxcell()
  end

context.startxcell({"foregroundstyle=bold,background=color,backgroundcolor=thistle2"})
  context("\\dots")
  context.stopxcell()
  context.stopxrow()
  for i = 0, 7 do
  context.startxrow()

context.startxcell({"foregroundstyle=bold,background=color,backgroundcolor=thistle2"})
  context(i)
  context.stopxcell()
  for j = 0, 8 do
  context.startxcell(j>i and background_one or i == 2 and j == 0 and
background_two)
  context("")
  context.stopxcell()
  end
  context.stopxrow()
  end
  context.startxrow()
  context.startxcell({"background=color,backgroundcolor=thistle2"})
  context("\\dots")
  context.stopxcell()
  for i = 0, 8 do
  context.startxcell()
  context("")
  context.stopxcell()
  end
  context.stopxrow()
  context.stopxtable()
\stopluacode
\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
___


Re: [NTG-context] Two questions about color in MetaFun

2020-08-13 Thread Jairo A. del Rio
Using \MPcolor does it for me. Thank you very much, Aditya :)

Jairo :)

El jue., 13 de ago. de 2020 a la(s) 18:47, Aditya Mahajan (adit...@umich.edu)
escribió:

> On Thu, 13 Aug 2020, Jairo A. del Rio wrote:
>
> > Hi, list! I have two questions concerning MetaFun:
> >
> > 1st:
> >
> > What is the correct way to pass a ConTeXt named color (e.g. xwi's
> "maroon")
> > to MetaFun. Using (with \usecolors[xwi] loaded in the preamble):
> >
> > withcolor maroon
> >
> > does not work.
>
> You need:
>
> withcolor \MPcolor{maroon}
>
> or (note the quotes)
>
> withcolor "maroon"
>
> > 2nd:
> >
> > I was trying to do some stuff for my girlfriend using ConTeXt and I tried
> > to randomize colors in MetaFun using normaldeviate. However, something
> > interesting happens. The following:
> >
> > [snip]
> >
> > changes the color of every letter. I don't complain (in fact it does look
> > better), but I still have a question: what should I do if I wanted to
> > select a random color first and then use it for the entire content?
> Thanks
> > in advance.
>
>
> newcolor randomcolor;
> randomcolor := (normaldeviate, normaldeviate, normaldeviate);
>
>  withcolor randomcolor;
>
> Aditya
>
> ___
> 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] Two questions about color in MetaFun

2020-08-13 Thread Aditya Mahajan
On Thu, 13 Aug 2020, Jairo A. del Rio wrote:

> Hi, list! I have two questions concerning MetaFun:
> 
> 1st:
> 
> What is the correct way to pass a ConTeXt named color (e.g. xwi's "maroon")
> to MetaFun. Using (with \usecolors[xwi] loaded in the preamble):
> 
> withcolor maroon
> 
> does not work. 

You need:

withcolor \MPcolor{maroon}

or (note the quotes)

withcolor "maroon"  

> 2nd:
> 
> I was trying to do some stuff for my girlfriend using ConTeXt and I tried
> to randomize colors in MetaFun using normaldeviate. However, something
> interesting happens. The following:
>
> [snip]
> 
> changes the color of every letter. I don't complain (in fact it does look
> better), but I still have a question: what should I do if I wanted to
> select a random color first and then use it for the entire content? Thanks
> in advance.


newcolor randomcolor; 
randomcolor := (normaldeviate, normaldeviate, normaldeviate);

 withcolor randomcolor;

Aditya
___
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] Two questions about color in MetaFun

2020-08-13 Thread Jairo A. del Rio
Hi, list! I have two questions concerning MetaFun:

1st:

What is the correct way to pass a ConTeXt named color (e.g. xwi's "maroon")
to MetaFun. Using (with \usecolors[xwi] loaded in the preamble):

withcolor maroon

does not work. I could copy-paste definitions from ConTeXt sources and do
e.g.

\definecolor [maroon][r=.690196,g=.188235,b=.376471]

but it is unfeasible for complete color schemes. So, is there a better way
to do it?

2nd:

I was trying to do some stuff for my girlfriend using ConTeXt and I tried
to randomize colors in MetaFun using normaldeviate. However, something
interesting happens. The following:

\setuplayout[width=middle]
\setuppagenumbering[state=stop]
\setuppapersize[A10,landscape][A10,landscape]
\starttext
\startuseMPgraphic{cornystuff}
draw outlinetext.f ("\framedtext[frame=off,width=fit,align=middle]{I love
you \\ \CONTEXT}") %\CONTEXT is not my girlfriend, it's just for the example
(withcolor (normaldeviate,normaldeviate,normaldeviate) withpen pencircle
scaled 1/5)
scaled 1 ;
\stopuseMPgraphic
\dorecurse{20}{%
\startplacefigure[location=force,number=no]
\useMPgraphic{cornystuff}
\stopplacefigure
\page[yes]
}
\stoptext

changes the color of every letter. I don't complain (in fact it does look
better), but I still have a question: what should I do if I wanted to
select a random color first and then use it for the entire content? Thanks
in advance.

Jairo :)
___
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] Alphabet & color

2020-08-01 Thread Hans Hagen

On 7/31/2020 10:10 PM, Marcus Vinicius Mesquita wrote:
Ok, after changing the glyph names in colorfont.lfg things run smoothly 
but for six glyphs:


uacute, ucircumflex, udieresis, Uacute, Ucircumflex, Udieresis

Have I hit a bug?


Some font oddness ... use

"uhungarumlaut", "Uhungarumlaut", 0x1DC, 0x144, 0xFA, 0xFB, 0xFC, 0xDA, 
0xDB, 0xDC },


Maybe use numbers for all instead. All is revealed by:

\usemodule[fonts-complete]
\setupbodyfont[6pt]
\starttext
\ShowCompleteFont{name:IBMPlexSerif}{10pt}{1}
\stoptext

I'll send you a 'context' way of doing it ... .

Hans

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


Re: [NTG-context] Alphabet & color

2020-07-31 Thread Marcus Vinicius Mesquita
Ok, after changing the glyph names in colorfont.lfg things run smoothly but
for six glyphs:

uacute, ucircumflex, udieresis, Uacute, Ucircumflex, Udieresis

Have I hit a bug?

Regards,

Marcus Vinicius

On Fri, Jul 31, 2020 at 3:00 PM Marcus Vinicius Mesquita <
marcusvinicius.mesqu...@gmail.com> wrote:

> Thank you, that was very helpful.
>
> Marcus Vinicius
>
>

-- 
Todas as coisas fatigam o corpo, salvo a música, que não fatiga nem o corpo
nem seus membros, por ser descanso da alma, primavera do coração, distração
do aflito, entretenimento do solitário, e viático do viajante.

Kunnâsh al-Hâ'ik (Cancioneiro de al-Hâ'ik)


colorfont.lfg
Description: Binary data
\setupbodyfont[plex,22pt]

\definecolor[colorscheme:1:1][h=002776]  % a
\definecolor[colorscheme:1:2][h=009c3b]  % b
\definecolor[colorscheme:1:3][h=17737e]  % c
\definecolor[colorscheme:1:4][h=ff5733]  % d
\definecolor[colorscheme:1:5][h=493367]  % e
\definecolor[colorscheme:1:6][h=7c6d11]  % f
\definecolor[colorscheme:1:7][h=117c2a]  % g
\definecolor[colorscheme:1:8][h=6d109d]  % h
\definecolor[colorscheme:1:9][h=08d11a]  % i
\definecolor[colorscheme:1:10][h=a81163] % j
\definecolor[colorscheme:1:11][h=7d2830] % k
\definecolor[colorscheme:1:12][h=2868d1] % l
\definecolor[colorscheme:1:13][h=2c11da] % m
\definecolor[colorscheme:1:14][h=cf47bb] % n
\definecolor[colorscheme:1:15][h=27bde2] % o
\definecolor[colorscheme:1:16][h=dc5777] % p
\definecolor[colorscheme:1:17][h=c28201] % q
\definecolor[colorscheme:1:18][h=ffdf00] % r
\definecolor[colorscheme:1:19][h=30a777] % s
\definecolor[colorscheme:1:20][h=722548] % t
\definecolor[colorscheme:1:21][h=ff00ff] % u
\definecolor[colorscheme:1:22][h=e0115f] % v
\definecolor[colorscheme:1:23][h=004c4c] % w
\definecolor[colorscheme:1:24][h=ae0001] % x
\definecolor[colorscheme:1:25][h=696966] % y
\definecolor[colorscheme:1:26][h=7bb3ff] % z

\definefontfeature
   [MyFeaturesA] [default]
   [goodies={colorfont},colorscheme=default]

\definefont[MyFontA][SerifBold*MyFeaturesA]

\starttext

\setfontcolorscheme[1]
\MyFontA
\startlines
aàáâãäå AÀÁÂÃÄÅ
eèéêë EÈÉÊË
iìíîï IÌÍÎÏ
oòóôõö OÒÓÔÕÖ
uùúûü UÙÚÛÜ

\stoptext


mwe.pdf
Description: Adobe PDF document
___
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] Alphabet & color

2020-07-31 Thread Marcus Vinicius Mesquita
Thank you, that was very helpful.

Marcus Vinicius
___
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] Alphabet & color

2020-07-31 Thread Hans Hagen

On 7/31/2020 5:06 PM, Marcus Vinicius Mesquita wrote:

Hi, again

With the suggestions you gave I managed to obtain the functionality I 
need, almost.
Somehow letters with accents like á ã é ó õ and also ç don't get the 
same color of the base letters given in the colorfont.lfg below:


return {
      name = "coloralphabet",
      colorschemes = {
          default = {
          [1] = { "A", "a", "á", "ã", "å", "à", "ä" },
          [2] = { "b", "B" },
          [3] = { "c", "ç", "C", "Ç" },
          [4] = { "d", "D" },
          [5] = { "e", "E" },
          [6] = { "f", "F" },
          [7] = { "g", "G" },
          [8] = { "h", "H" },
          [9] = { "i", "í", "ì", "I", "Í", "Ì" },
          [10] = { "j", "J" },
          [11] = { "k", "K" },
          [12] = { "l", "L" },
          [13] = { "m", "M" },
          [14] = { "n", "ñ", "N", "Ñ" },
          [15] = { "o", "ó", "õ", "ö", "O", "Ó", "Õ", "Ö"  },
          [16] = { "p", "P" },
          [17] = { "q", "Q" },
          [18] = { "r", "R" },
          [19] = { "s", "S" },
          [20] = { "t", "T" },
          [21] = { "u", "ù", "ú", "ü", "U", "Ù", "Ú", "Ü" },
          [22] = { "v", "V" },
          [23] = { "w", "W" },
          [24] = { "x", "X" },
          [25] = { "y", "Y" },
          [26] = { "z", "Z" },
          },
      }
}

The MWE follows below:

\setupbodyfont[plex,22pt]

\definecolor[colorscheme:1:1][h=002776]  % a
\definecolor[colorscheme:1:2][h=009c3b]  % b
\definecolor[colorscheme:1:3][h=17737e]  % c
\definecolor[colorscheme:1:4][h=ff5733]  % d
\definecolor[colorscheme:1:5][h=493367]  % e
\definecolor[colorscheme:1:6][h=7c6d11]  % f
\definecolor[colorscheme:1:7][h=117c2a]  % g
\definecolor[colorscheme:1:8][h=6d109d]  % h
\definecolor[colorscheme:1:9][h=08d11a]  % i
\definecolor[colorscheme:1:10][h=a81163] % j
\definecolor[colorscheme:1:11][h=7d2830] % k
\definecolor[colorscheme:1:12][h=2868d1] % l
\definecolor[colorscheme:1:13][h=2c11da] % m
\definecolor[colorscheme:1:14][h=cf47bb] % n
\definecolor[colorscheme:1:15][h=27bde2] % o
\definecolor[colorscheme:1:16][h=dc5777] % p
\definecolor[colorscheme:1:17][h=c28201] % q
\definecolor[colorscheme:1:18][h=ffdf00] % r
\definecolor[colorscheme:1:19][h=30a777] % s
\definecolor[colorscheme:1:20][h=722548] % t
\definecolor[colorscheme:1:21][h=ff00ff] % u
\definecolor[colorscheme:1:22][h=e0115f] % v
\definecolor[colorscheme:1:23][h=004c4c] % w
\definecolor[colorscheme:1:24][h=ae0001] % x
\definecolor[colorscheme:1:25][h=696966] % y
\definecolor[colorscheme:1:26][h=7bb3ff] % z

\definefontfeature
    [MyFeaturesA] [default]
    [goodies={colorfont},colorscheme=default]

\definefont[MyFontA][SerifBold*MyFeaturesA]

\starttext

\setfontcolorscheme[1] {\MyFontA BRASIL brasil órfão ÓRFÃO mão MÃO bênção}

\stoptext

What needs to be changed?


glyph names ... "oacute" etc as used in plex


Greetings

Marcus Vinicius




--

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


Re: [NTG-context] Alphabet & color

2020-07-31 Thread Marcus Vinicius Mesquita
Hi, again

With the suggestions you gave I managed to obtain the functionality I need,
almost.
Somehow letters with accents like á ã é ó õ and also ç don't get the same
color of the base letters given in the colorfont.lfg below:

return {
 name = "coloralphabet",
 colorschemes = {
 default = {
 [1] = { "A", "a", "á", "ã", "å", "à", "ä" },
 [2] = { "b", "B" },
 [3] = { "c", "ç", "C", "Ç" },
 [4] = { "d", "D" },
 [5] = { "e", "E" },
 [6] = { "f", "F" },
 [7] = { "g", "G" },
 [8] = { "h", "H" },
 [9] = { "i", "í", "ì", "I", "Í", "Ì" },
 [10] = { "j", "J" },
 [11] = { "k", "K" },
 [12] = { "l", "L" },
 [13] = { "m", "M" },
 [14] = { "n", "ñ", "N", "Ñ" },
 [15] = { "o", "ó", "õ", "ö", "O", "Ó", "Õ", "Ö"  },
 [16] = { "p", "P" },
 [17] = { "q", "Q" },
 [18] = { "r", "R" },
 [19] = { "s", "S" },
 [20] = { "t", "T" },
 [21] = { "u", "ù", "ú", "ü", "U", "Ù", "Ú", "Ü" },
 [22] = { "v", "V" },
 [23] = { "w", "W" },
 [24] = { "x", "X" },
 [25] = { "y", "Y" },
 [26] = { "z", "Z" },
 },
 }
}

The MWE follows below:

\setupbodyfont[plex,22pt]

\definecolor[colorscheme:1:1][h=002776]  % a
\definecolor[colorscheme:1:2][h=009c3b]  % b
\definecolor[colorscheme:1:3][h=17737e]  % c
\definecolor[colorscheme:1:4][h=ff5733]  % d
\definecolor[colorscheme:1:5][h=493367]  % e
\definecolor[colorscheme:1:6][h=7c6d11]  % f
\definecolor[colorscheme:1:7][h=117c2a]  % g
\definecolor[colorscheme:1:8][h=6d109d]  % h
\definecolor[colorscheme:1:9][h=08d11a]  % i
\definecolor[colorscheme:1:10][h=a81163] % j
\definecolor[colorscheme:1:11][h=7d2830] % k
\definecolor[colorscheme:1:12][h=2868d1] % l
\definecolor[colorscheme:1:13][h=2c11da] % m
\definecolor[colorscheme:1:14][h=cf47bb] % n
\definecolor[colorscheme:1:15][h=27bde2] % o
\definecolor[colorscheme:1:16][h=dc5777] % p
\definecolor[colorscheme:1:17][h=c28201] % q
\definecolor[colorscheme:1:18][h=ffdf00] % r
\definecolor[colorscheme:1:19][h=30a777] % s
\definecolor[colorscheme:1:20][h=722548] % t
\definecolor[colorscheme:1:21][h=ff00ff] % u
\definecolor[colorscheme:1:22][h=e0115f] % v
\definecolor[colorscheme:1:23][h=004c4c] % w
\definecolor[colorscheme:1:24][h=ae0001] % x
\definecolor[colorscheme:1:25][h=696966] % y
\definecolor[colorscheme:1:26][h=7bb3ff] % z

\definefontfeature
   [MyFeaturesA] [default]
   [goodies={colorfont},colorscheme=default]

\definefont[MyFontA][SerifBold*MyFeaturesA]

\starttext

\setfontcolorscheme[1] {\MyFontA BRASIL brasil órfão ÓRFÃO mão MÃO bênção}

\stoptext

What needs to be changed?

Greetings

Marcus Vinicius


colorfont.lfg
Description: Binary data
\setupbodyfont[plex,22pt]

\definecolor[colorscheme:1:1][h=002776]  % a
\definecolor[colorscheme:1:2][h=009c3b]  % b
\definecolor[colorscheme:1:3][h=17737e]  % c
\definecolor[colorscheme:1:4][h=ff5733]  % d
\definecolor[colorscheme:1:5][h=493367]  % e
\definecolor[colorscheme:1:6][h=7c6d11]  % f
\definecolor[colorscheme:1:7][h=117c2a]  % g
\definecolor[colorscheme:1:8][h=6d109d]  % h
\definecolor[colorscheme:1:9][h=08d11a]  % i
\definecolor[colorscheme:1:10][h=a81163] % j
\definecolor[colorscheme:1:11][h=7d2830] % k
\definecolor[colorscheme:1:12][h=2868d1] % l
\definecolor[colorscheme:1:13][h=2c11da] % m
\definecolor[colorscheme:1:14][h=cf47bb] % n
\definecolor[colorscheme:1:15][h=27bde2] % o
\definecolor[colorscheme:1:16][h=dc5777] % p
\definecolor[colorscheme:1:17][h=c28201] % q
\definecolor[colorscheme:1:18][h=ffdf00] % r
\definecolor[colorscheme:1:19][h=30a777] % s
\definecolor[colorscheme:1:20][h=722548] % t
\definecolor[colorscheme:1:21][h=ff00ff] % u
\definecolor[colorscheme:1:22][h=e0115f] % v
\definecolor[colorscheme:1:23][h=004c4c] % w
\definecolor[colorscheme:1:24][h=ae0001] % x
\definecolor[colorscheme:1:25][h=696966] % y
\definecolor[colorscheme:1:26][h=7bb3ff] % z

\definefontfeature
   [MyFeaturesA] [default]
   [goodies={colorfont},colorscheme=default]

\definefont[MyFontA][SerifBold*MyFeaturesA]

\starttext

\setfontcolorscheme[1] {\MyFontA BRASIL brasil órfão ÓRFÃO mão MÃO bênção}

\stoptext


mwe.pdf
Description: Adobe PDF document
___
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] Bug with lmtx and color in table

2020-07-22 Thread Wolfgang Schuster

Fabrice Couvreur schrieb am 22.07.2020 um 17:09:

Hello,
With the latest version of lmtx, the background color of cells does not 
work.


Unrelated to tables.

You can reduce xtable and natural table based examples very often to a 
simple \framed because both tables types inherit many features from it.


\starttext

\startbuffer
\vrule width 4cm height 4cm depth 0pt\relax
\stopbuffer

\typebuffer \getbuffer

\startbuffer
\hrule width 4cm height 4cm depth 0pt\relax
\stopbuffer

\typebuffer \getbuffer

\startbuffer
\frule width 4cm height 4cm type fill\relax
\stopbuffer

\typebuffer \getbuffer

\stoptext

Wolfgang
___
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] Bug with lmtx and color in table

2020-07-22 Thread Fabrice Couvreur
Hello,
With the latest version of lmtx, the background color of cells does not
work.
Thank you.
Fabrice

\starttext
\startxtable
  [align={middle,lohi}, offset=0.8ex,background=color,
   backgroundcolor=red,frame=off]
  \startxrow
\startxcell
  \m{\displaystyle\binom{n-1}{k-1}}
\stopxcell
\startxcell[width=fit]
  \m{+}
\stopxcell
\startxcell
  \m{\displaystyle\binom{n-1}{k}}
\stopxcell
  \stopxrow
  \startxrow
\startxcell

\stopxcell
\startxcell[width=fit]
  \m{=}
\stopxcell
\startxcell
  \m{\displaystyle\binom{n}{k}}
\stopxcell
  \stopxrow
\stopxtable
\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
___


Re: [NTG-context] Alphabet & color

2020-07-16 Thread Marcus Vinicius Mesquita
I got it. Thanks.

Marcus Vinicius

On Thu, Jul 16, 2020, 13:57 Hans Hagen  wrote:

> On 7/16/2020 6:41 PM, Marcus Vinicius Mesquita wrote
>
> > I tried your code and it works fine. But where do the color schemes
> > default and whatever come from? How can they be changed?
> defauls is defined in the example .. colorshemes have numbers:
>
> \definecolor[colorscheme:1:1][s=.75]
> \definecolor[colorscheme:1:2][r=.75]
> \definecolor[colorscheme:1:3][g=.75]
> \definecolor[colorscheme:1:4][b=.75]
> \definecolor[colorscheme:1:5][c=.75]
> \definecolor[colorscheme:1:6][m=.75]
> \definecolor[colorscheme:1:7][y=.75]
>
> Hans
>
>
> -
>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
___


Re: [NTG-context] Alphabet & color

2020-07-16 Thread Hans Hagen

On 7/16/2020 6:41 PM, Marcus Vinicius Mesquita wrote

I tried your code and it works fine. But where do the color schemes 
default and whatever come from? How can they be changed?

defauls is defined in the example .. colorshemes have numbers:

\definecolor[colorscheme:1:1][s=.75]
\definecolor[colorscheme:1:2][r=.75]
\definecolor[colorscheme:1:3][g=.75]
\definecolor[colorscheme:1:4][b=.75]
\definecolor[colorscheme:1:5][c=.75]
\definecolor[colorscheme:1:6][m=.75]
\definecolor[colorscheme:1:7][y=.75]

Hans


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


Re: [NTG-context] Alphabet & color

2020-07-16 Thread Marcus Vinicius Mesquita
Thank you, Hans for your answer.

I tried your code and it works fine. But where do the color schemes default
and whatever come from? How can they be changed?

Best regards

Marcus Vinicius

On Thu, Jul 16, 2020, 04:19 Hans Hagen  wrote:

> On 7/16/2020 7:32 AM, Marcus Vinicius Mesquita wrote:
> > Dear list
> >
> > I need to typeset a book for kids wich contains texts where each letter
> > is assigned a fixed color, for example:
> >
> > A - - > red;
> > B - - > blue;
> > ...
> > Z - - > green.
> >
> > What would be the best way to do this? TIA.
> There's more ways to do this but here is one:
>
> (1) make a file: colorfont.lfg:
>
> return {
>  name = "coloralphabet",
>  colorschemes = {
>  default = {
>  [1] = { "a", "e" },
>  [2] = { "i", "o", "u" },
>  },
>  whatever = {
>  [1] = { "65:90" },
>  [2] = { },
>  [3] = { },
>  [4] = { "97:122" },
>  }
>  }
> }
>
> There is some more possible but this wil do ...
>
> (2) You define a font with these goodies attached:
>
> \setupbodyfont[plex,10pt]
>
> \definefontfeature
>[MyFeaturesA] [default]
>[goodies={colorfont},colorscheme=default,liga=no]
>
> \definefontfeature
>[MyFeaturesB] [default]
>[goodies={colorfont},colorscheme=whatever,liga=no]
>
> \definefont[MyFontA][Serif*MyFeaturesA]
> \definefont[MyFontB][Serif*MyFeaturesB]
>
> (3) and use it this way:
>
> \starttext
>
> \setfontcolorscheme[1] {\MyFontA \samplefile{tufte}}\par
> \setfontcolorscheme[2] {\MyFontA \samplefile{tufte}}\par
> \setfontcolorscheme[3] {\MyFontA \samplefile{tufte}}\par
>
> \page
>
> \setfontcolorscheme[1] {\MyFontB \samplefile{tufte}}\par
> \setfontcolorscheme[2] {\MyFontB \samplefile{tufte}}\par
> \setfontcolorscheme[3] {\MyFontB \samplefile{tufte}}\par
>
> \stoptext
>
> Now, this is pretty (more than a decade) old functionality from early
> days of mkiv/luatex when it was used for some tracing (by Idris) and it
> still works (surprise).
>
> Today I would definitely use more recent trickery. If there is real
> demand for this I can have a look at it, after all it's "kind of fun"
> (as is most of font stuff).
>
> Hans
>
> -
>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
___


Re: [NTG-context] Alphabet & color

2020-07-16 Thread Hans Hagen

On 7/16/2020 7:32 AM, Marcus Vinicius Mesquita wrote:

Dear list

I need to typeset a book for kids wich contains texts where each letter 
is assigned a fixed color, for example:


A - - > red;
B - - > blue;
...
Z - - > green.

What would be the best way to do this? TIA.

There's more ways to do this but here is one:

(1) make a file: colorfont.lfg:

return {
name = "coloralphabet",
colorschemes = {
default = {
[1] = { "a", "e" },
[2] = { "i", "o", "u" },
},
whatever = {
[1] = { "65:90" },
[2] = { },
[3] = { },
[4] = { "97:122" },
}
}
}

There is some more possible but this wil do ...

(2) You define a font with these goodies attached:

\setupbodyfont[plex,10pt]

\definefontfeature
  [MyFeaturesA] [default]
  [goodies={colorfont},colorscheme=default,liga=no]

\definefontfeature
  [MyFeaturesB] [default]
  [goodies={colorfont},colorscheme=whatever,liga=no]

\definefont[MyFontA][Serif*MyFeaturesA]
\definefont[MyFontB][Serif*MyFeaturesB]

(3) and use it this way:

\starttext

\setfontcolorscheme[1] {\MyFontA \samplefile{tufte}}\par
\setfontcolorscheme[2] {\MyFontA \samplefile{tufte}}\par
\setfontcolorscheme[3] {\MyFontA \samplefile{tufte}}\par

\page

\setfontcolorscheme[1] {\MyFontB \samplefile{tufte}}\par
\setfontcolorscheme[2] {\MyFontB \samplefile{tufte}}\par
\setfontcolorscheme[3] {\MyFontB \samplefile{tufte}}\par

\stoptext

Now, this is pretty (more than a decade) old functionality from early 
days of mkiv/luatex when it was used for some tracing (by Idris) and it 
still works (surprise).


Today I would definitely use more recent trickery. If there is real 
demand for this I can have a look at it, after all it's "kind of fun" 
(as is most of font stuff).


Hans

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


[NTG-context] Alphabet & color

2020-07-15 Thread Marcus Vinicius Mesquita
Dear list

I need to typeset a book for kids wich contains texts where each letter is
assigned a fixed color, for example:

A - - > red;
B - - > blue;
...
Z - - > green.

What would be the best way to do this? TIA.

Marcus Vinicius
___
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] Iterate over color scheme in ConTeXt/Lua

2020-07-13 Thread Hans Hagen

On 7/12/2020 11:54 PM, Jairo A. del Rio wrote:
El dom., 12 de jul. de 2020 a la(s) 16:20, Hans Hagen (j.ha...@xs4all.nl 
<mailto:j.ha...@xs4all.nl>) escribió:


You get a list of defined color names in 'xwi' with:

     attributes.colors.setlist("xwi")

Nice, it works! I note the first method only works when \usecolors[xwi] 
is present; otherwise, it prints an interesting "themaintextcolor".


Here is a nostalgic mkii accessor for such a list (color support is a
real old feature and conceptually hasn't changed that much):

    \def\WhateverActionIWant#1{#1\par}

    \settrue\collectcolorsinlist \setupcolor[xwi]

    \processcommacommand[\colorlist]\WhateverActionIWant

but you probably don't want to catch up on that.


It doesn't work in Mark IV (\colorlist is undefined). Maybe I'm too 
young, but Mark II was already frozen when I was a teenager, so I'm not 
sure I want to try it now. Thanks, Hans!
It's low level mkii, never meant for usage outside core code (in this 
case in mkii it is used for typesetting color overviews); mkiv still has 
the same high level commands but different low level ... nothing to 
worry about. The only high level commands that were dropped in mkiv were 
those dealing with obsolete technologies, encodings and such)


Hans

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


Re: [NTG-context] Iterate over color scheme in ConTeXt/Lua

2020-07-12 Thread Jairo A. del Rio
El dom., 12 de jul. de 2020 a la(s) 16:20, Hans Hagen (j.ha...@xs4all.nl)
escribió:

> You get a list of defined color names in 'xwi' with:
>
> attributes.colors.setlist("xwi")
>

Nice, it works! I note the first method only works when \usecolors[xwi] is
present; otherwise, it prints an interesting "themaintextcolor".

Here is a nostalgic mkii accessor for such a list (color support is a
> real old feature and conceptually hasn't changed that much):
>
>\def\WhateverActionIWant#1{#1\par}
>
>\settrue\collectcolorsinlist \setupcolor[xwi]
>
>\processcommacommand[\colorlist]\WhateverActionIWant
>
> but you probably don't want to catch up on that.
>

It doesn't work in Mark IV (\colorlist is undefined). Maybe I'm too young,
but Mark II was already frozen when I was a teenager, so I'm not sure I
want to try it now. Thanks, Hans!

Cordially,

Jairo :)
___
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] Iterate over color scheme in ConTeXt/Lua

2020-07-12 Thread Hans Hagen

On 7/12/2020 9:58 PM, Jairo A. del Rio wrote:

Hi, list. I've got a question about color schemes in ConTeXt

What if want to access the entire list of, say, xwi:

for k,v in pairs(xwi_list) do --Supposing xwi_list is contains xwi colors
   (whatever action I want)
end

So far I'm manually setting colors from colo-imp-xwi.mkiv, but I suspect 
there's a less manual method. Thank you in advance.

You get a list of defined color names in 'xwi' with:

   attributes.colors.setlist("xwi")

Anyway, "whatever action I want" is somewhat vague, for instance you the 
vebose spec with:


  attributes.colors.values[name]

but there's more. There might be better ways to achieve what you need it 
for.


Here is a nostalgic mkii accessor for such a list (color support is a 
real old feature and conceptually hasn't changed that much):


  \def\WhateverActionIWant#1{#1\par}

  \settrue\collectcolorsinlist \setupcolor[xwi]

  \processcommacommand[\colorlist]\WhateverActionIWant

but you probably don't want to catch up on that.

Hans

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


[NTG-context] Iterate over color scheme in ConTeXt/Lua

2020-07-12 Thread Jairo A. del Rio
Hi, list. I've got a question about color schemes in ConTeXt

What if want to access the entire list of, say, xwi:

for k,v in pairs(xwi_list) do --Supposing xwi_list is contains xwi colors
  (whatever action I want)
end

So far I'm manually setting colors from colo-imp-xwi.mkiv, but I suspect
there's a less manual method. Thank you in advance.

Regards,

Jairo :)
___
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] [overstrike] with different color?

2020-06-05 Thread Wolfgang Schuster

Henning Hraban Ramm schrieb am 03.06.2020 um 16:30:




Am 03.06.2020 um 16:19 schrieb Floris van Manen :

What is the preferred way to overstrike a text with a different color?
This does not work:
One \overstrike[color=red]{Two} Three


\setupbar[color=red,rulethickness=1.4] % measurement in pt


\setupbar [overstrike] [..,..=..,..]

Wolfgang
___
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] [overstrike] with different color?

2020-06-05 Thread Henning Hraban Ramm

> Am 04.06.2020 um 20:00 schrieb Floris van Manen :
> 
>> \setupbar[color=red,rulethickness=1.4] % measurement in pt
> 
> the command also takes a parameter offset as well as dy.
> I assume the offset will position the line higher / lower .
> But I see no effect.
> 
> \setupbar[color=red,rulethickness=.3,offset=0.5]

According to https://wiki.contextgarden.net/Command/underbar, offset should 
work.

Maybe \definebar behaves different to \setupbar

Hraban

___
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] [overstrike] with different color?

2020-06-04 Thread Floris van Manen


On 03/06/2020 16:30, Henning Hraban Ramm wrote:
> \setupbar[color=red,rulethickness=1.4] % measurement in pt

the command also takes a parameter offset as well as dy.
I assume the offset will position the line higher / lower .
But I see no effect.

\setupbar[color=red,rulethickness=.3,offset=0.5]


pEpkey.asc
Description: application/pgp-keys
___
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] [overstrike] with different color?

2020-06-03 Thread Henning Hraban Ramm


> Am 03.06.2020 um 16:19 schrieb Floris van Manen :
> 
> What is the preferred way to overstrike a text with a different color?
> This does not work:
> One \overstrike[color=red]{Two} Three

\setupbar[color=red,rulethickness=1.4] % measurement in pt

See also rules-mkiv.pdf

Hraban
___
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] [overstrike] with different color?

2020-06-03 Thread Floris van Manen
What is the preferred way to overstrike a text with a different color?
This does not work:
One \overstrike[color=red]{Two} Three


.F


pEpkey.asc
Description: application/pgp-keys
___
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] Emoji color fonts not working on LMTX/Context MKIV

2020-05-21 Thread Pablo Rodriguez
On 5/20/20 11:25 PM, Hans Hagen wrote:
> On 5/20/2020 10:26 PM, Jairo A. del Rio wrote:
>> I did. It turns out that installing graphicsmagick does the trick (pun
>> intended) for Noto Color Emoji. However, the issue persists for SVG
>> fonts and the same message appears, despite of having cleaned the cache
>> (I've used mtxrun --script cache --erase). Using the code Pablo sent,
>> with EmojiOne Color instead of Twemoji Mozilla, I get the following
>> error messages:
>
> So, what version do you use?

This happens also to me witht the font from
https://github.com/eosrei/emojione-color-font/releases/latest.

Using latest in both Windows and Linux 64bit (2020.05.18 16:50).

Just in case it helps,

Pablo
--
http://www.ousia.tk
___
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] Emoji color fonts not working on LMTX/Context MKIV

2020-05-20 Thread Jairo A. del Rio
Pablo pointed out the bug in Evince. Sorry too. I've used another PDF
viewer and SVG color displays correctly. Thanks.

El mié., 20 de may. de 2020 a la(s) 16:32, Jairo A. del Rio (
jairoadelr...@gmail.com) escribió:

> Info from \luatexbanner
>
> For ConTeXt (LuaTeX): This is LuaTeX, Version 1.13.0 (TeX Live 2021/dev)
> For ConTeXt (LMTX): This is LuaMetaTeX, Version 2.06.03
>
> El mié., 20 de may. de 2020 a la(s) 16:25, Hans Hagen (j.ha...@xs4all.nl)
> escribió:
>
>> On 5/20/2020 10:26 PM, Jairo A. del Rio wrote:
>> > I did. It turns out that installing graphicsmagick does the trick (pun
>> > intended) for Noto Color Emoji. However, the issue persists for SVG
>> > fonts and the same message appears, despite of having cleaned the cache
>> > (I've used mtxrun --script cache --erase). Using the code Pablo sent,
>> > with EmojiOne Color instead of Twemoji Mozilla, I get the following
>> > error messages:
>>
>> So, what version do you use?
>>
>> Hans
>>
>> -
>>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
___


Re: [NTG-context] Emoji color fonts not working on LMTX/Context MKIV

2020-05-20 Thread Jairo A. del Rio
Info from \luatexbanner

For ConTeXt (LuaTeX): This is LuaTeX, Version 1.13.0 (TeX Live 2021/dev)
For ConTeXt (LMTX): This is LuaMetaTeX, Version 2.06.03

El mié., 20 de may. de 2020 a la(s) 16:25, Hans Hagen (j.ha...@xs4all.nl)
escribió:

> On 5/20/2020 10:26 PM, Jairo A. del Rio wrote:
> > I did. It turns out that installing graphicsmagick does the trick (pun
> > intended) for Noto Color Emoji. However, the issue persists for SVG
> > fonts and the same message appears, despite of having cleaned the cache
> > (I've used mtxrun --script cache --erase). Using the code Pablo sent,
> > with EmojiOne Color instead of Twemoji Mozilla, I get the following
> > error messages:
>
> So, what version do you use?
>
> Hans
>
> -
>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
___


Re: [NTG-context] Emoji color fonts not working on LMTX/Context MKIV

2020-05-20 Thread Hans Hagen

On 5/20/2020 10:18 PM, Pablo Rodriguez wrote:

On 5/20/20 9:39 PM, Hans Hagen wrote:

[...]
LMTX (2020.05.18 16:50) displays only black and white icons.

I think this might be a bug in LMTX.

Could you confirm the issue?

what if you wipe the cache


Many thanks for your reply, Hans.

icons are black and white, no color after wiping the cache.

Made no difference with a brand-new install either.

Just accidentally, I discovered this is an issue in Evince.

LMTX should handle color in LMTX with other PDF code than in MkIV.


won't happen ... actually, at some point mkiv will use a similar method 
as lmtx



MuPDF displays colorful. So do acroread for Linux, xpdf, SumatraPDF and
even Okular.

Sorry for the noise, since Evince seems to be the culprit.
for me acrobat and mupdf based viewers (sumatra also uses it, actually a 
rather old version) are the reference .. it makes no sense to cripple 
context because of an issue with a viewer


Hans

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


Re: [NTG-context] Emoji color fonts not working on LMTX/Context MKIV

2020-05-20 Thread Hans Hagen

On 5/20/2020 10:26 PM, Jairo A. del Rio wrote:
I did. It turns out that installing graphicsmagick does the trick (pun 
intended) for Noto Color Emoji. However, the issue persists for SVG 
fonts and the same message appears, despite of having cleaned the cache 
(I've used mtxrun --script cache --erase). Using the code Pablo sent, 
with EmojiOne Color instead of Twemoji Mozilla, I get the following 
error messages:


So, what version do you use?

Hans

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


Re: [NTG-context] Emoji color fonts not working on LMTX/Context MKIV

2020-05-20 Thread Jairo A. del Rio
I did. It turns out that installing graphicsmagick does the trick (pun
intended) for Noto Color Emoji. However, the issue persists for SVG fonts
and the same message appears, despite of having cleaned the cache (I've
used mtxrun --script cache --erase). Using the code Pablo sent, with
EmojiOne Color instead of Twemoji Mozilla, I get the following error
messages:

LMTX (error):

function call [998]:
...mtx/tex/texmf-context/tex/context/base/mkiv/mlib-svg.lua:1471: bad
argument #1 to 'gsub' (string expected, got nil)


MKIV (outlined emojis, flag emojis not working):

fonts > svg conversion > executing runner 'otfsvg': inkscape
--export-area-drawing --shell > temp-otf-svg-shape.log

fonts > svg conversion > processing 1829 svg containers

xml > core > load error: invalid xml file - parsed text

(the line below repeated dozens of times)

fonts > svg conversion > processing can be going on for a while

fonts > svg conversion > processing 1829 pdf results

fonts > svg conversion > there are no converted shapes, fix your setup

fonts > svg conversion > svg conversion time 4.246 seconds


In any event, LMTX prints only black and white emojis.

On 5/20/2020 9:31 PM, Pablo Rodriguez wrote:
> > On 5/20/20 12:26 PM, Jairo A. del Rio wrote:
> >> [...]
> >> Only Twemoji Mozilla and Segoe UI Emoji worked for me, so, what am I
> >> doing wrong?
> >
> > Hi Jairo,
> >
> > using latest ConTeXt with the following sample, I get these results:
> >
> >\definefontfamily[emoj][rm][Twemoji Mozilla][features={color}]
> >\setupbodyfont[emoj]
> >\starttext
> >臘
> >\stoptext
> >
> > MkIV (2020.01.30 14:13) displays colored icons.
> >
> > LMTX (2020.05.18 16:50) displays only black and white icons.
> >
> > I think this might be a bug in LMTX.
> >
> > Could you confirm the issue?
> what if you wipe the cache
>
___
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] Emoji color fonts not working on LMTX/Context MKIV

2020-05-20 Thread Pablo Rodriguez
On 5/20/20 9:39 PM, Hans Hagen wrote:
>> [...]
>> LMTX (2020.05.18 16:50) displays only black and white icons.
>>
>> I think this might be a bug in LMTX.
>>
>> Could you confirm the issue?
> what if you wipe the cache

Many thanks for your reply, Hans.

icons are black and white, no color after wiping the cache.

Made no difference with a brand-new install either.

Just accidentally, I discovered this is an issue in Evince.

LMTX should handle color in LMTX with other PDF code than in MkIV.

MuPDF displays colorful. So do acroread for Linux, xpdf, SumatraPDF and
even Okular.

Sorry for the noise, since Evince seems to be the culprit.

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
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] Emoji color fonts not working on LMTX/Context MKIV

2020-05-20 Thread Hans Hagen

On 5/20/2020 9:31 PM, Pablo Rodriguez wrote:

On 5/20/20 12:26 PM, Jairo A. del Rio wrote:

[...]
Only Twemoji Mozilla and Segoe UI Emoji worked for me, so, what am I
doing wrong?


Hi Jairo,

using latest ConTeXt with the following sample, I get these results:

   \definefontfamily[emoj][rm][Twemoji Mozilla][features={color}]
   \setupbodyfont[emoj]
   \starttext
   臘
   \stoptext

MkIV (2020.01.30 14:13) displays colored icons.

LMTX (2020.05.18 16:50) displays only black and white icons.

I think this might be a bug in LMTX.

Could you confirm the issue?

what if you wipe the cache

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


Re: [NTG-context] Emoji color fonts not working on LMTX/Context MKIV

2020-05-20 Thread Pablo Rodriguez
On 5/20/20 12:26 PM, Jairo A. del Rio wrote:
> [...]
> Only Twemoji Mozilla and Segoe UI Emoji worked for me, so, what am I
> doing wrong?

Hi Jairo,

using latest ConTeXt with the following sample, I get these results:

  \definefontfamily[emoj][rm][Twemoji Mozilla][features={color}]
  \setupbodyfont[emoj]
  \starttext
  臘
  \stoptext

MkIV (2020.01.30 14:13) displays colored icons.

LMTX (2020.05.18 16:50) displays only black and white icons.

I think this might be a bug in LMTX.

Could you confirm the issue?

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
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] Emoji color fonts not working on LMTX/Context MKIV

2020-05-20 Thread Jairo A. del Rio
I've tried the following from the manuals and adapted some code to see if
it works:

1.
\definefontfeature[svg][svg=yes]
\definefontsynonym[Emoji][file:emojionecolor-svginot.ttf*default,svg]
\definesymbol[bug][\getglyphdirect{Emoji}{\char"1F41B}]
\starttext
\symbol[bug]
\stoptext

The emoji has no color when compiled with LuaTeX. Furthermore, the log
includes a lot of lines like the ones below:


fonts > svg conversion > executing runner 'otfsvg': inkscape
--export-area-drawing --shell > temp-otf-svg-shape.log


fonts > svg conversion > processing 1829 svg containers

xml > core > load error: invalid xml file - parsed text

With LMTX it gives an error about mlib-svg.

2.

\definefontfeature[overlay][default][ccmp=yes,colr=yes,dist=yes]
\definefontfeature[svg]
[default][svg=yes]
\definefontfeature[bitmap] [default][sbix=yes]
\definefontfeature [colored] [default]
[ccmp=yes,dist=yes,
colr=yes,svg=yes,sbix=yes]
\definefontsynonym[Emoji][file:notocoloremoji*default,colored]
\definesymbol[bug][\getglyphdirect{Emoji}{\char"1F41B}]
\starttext
\symbol[bug]
\stoptext

What I get is:

fonts > png conversion > processing 3374 png containers


sh: 1: gm: not found


sh: 1: gm: not found


sh: 1: gm: not found sh: 1: gm: not found

...

and the same line repeating itself
...

close source > level 1, order 3, name
'/home/lol/lmtx/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'

! error: (file /usr/share/fonts/truetype/noto/NotoColorEmoji.ttf) (ttf):
loca table not found


LMTX prints a file without any emoji.


Only Twemoji Mozilla and Segoe UI Emoji worked for me, so, what am I doing
wrong?


I'm working with Ubuntu 20.04 LTS x86_64 and Inkscape 0.92.5 (2060ec1f9f,
2020-04-08) in case it helps. Thank you in advance.
___
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] Custom color schemes in t-vim

2020-05-17 Thread Aditya Mahajan

On Sun, 17 May 2020, Nicola wrote:

2. The wiki has no mention of \startcolorscheme... \stopcolorscheme or
  \setups. An example of two would be very welcome!


Added documentation: https://github.com/adityam/filter/blob/dev/vim-README.md

Aditya
___
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] Custom color schemes in t-vim

2020-05-17 Thread Aditya Mahajan

On Sun, 17 May 2020, Nicola wrote:


On 2020-05-17, Aditya Mahajan  wrote:

Since I already map the minor groups to preferred groups in `t-vim`, I think
that a good compromise is to enable the minor groups by default. I can do
that by adding statements similar to those above in `2context.vim`. This will
not have any visual impact on any existing code, but will allow those who
want to tweak the highlighting of minor groups to define their own syntax
highlighting.


Uploaded a new version with a fix.


Thanks for looking into it. I will download and test that soon.

A couple of remarks:

1. In one of my old documents, I had this command inside the colorscheme
  block:

   \setups{vim-minor-groups}

  Was that to achieve the same purpose?


Yes. This setup maps the minor groups to preferred groups.


2. The wiki has no mention of \startcolorscheme... \stopcolorscheme or
  \setups. An example of two would be very welcome!


OK. I will add that.

Aditya
___
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] Custom color schemes in t-vim

2020-05-17 Thread Nicola
On 2020-05-17, Nicola  wrote:
> On 2020-05-17, Aditya Mahajan  wrote:

>> Uploaded a new version with a fix.

I have tried the latest beta and, indeed, it now seems to work as
expected.

Thanks!
Nicola


___
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] Custom color schemes in t-vim

2020-05-17 Thread Nicola
On 2020-05-17, Aditya Mahajan  wrote:
>> Since I already map the minor groups to preferred groups in `t-vim`, I think
>> that a good compromise is to enable the minor groups by default. I can do
>> that by adding statements similar to those above in `2context.vim`. This will
>> not have any visual impact on any existing code, but will allow those who
>> want to tweak the highlighting of minor groups to define their own syntax
>> highlighting.
>
> Uploaded a new version with a fix.

Thanks for looking into it. I will download and test that soon.

A couple of remarks:

1. In one of my old documents, I had this command inside the colorscheme
   block:

\setups{vim-minor-groups}

   Was that to achieve the same purpose?

2. The wiki has no mention of \startcolorscheme... \stopcolorscheme or
   \setups. An example of two would be very welcome!

Nicola

___
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] Custom color schemes in t-vim

2020-05-17 Thread Aditya Mahajan
Since I already map the minor groups to preferred groups in `t-vim`, I think 
that a good compromise is to enable the minor groups by default. I can do 
that by adding statements similar to those above in `2context.vim`. This will 
not have any visual impact on any existing code, but will allow those who 
want to tweak the highlighting of minor groups to define their own syntax 
highlighting.


Uploaded a new version with a fix.

Aditya
___
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] Custom color schemes in t-vim

2020-05-17 Thread Aditya Mahajan

On Sat, 16 May 2020, Aditya Mahajan wrote:


On Sat, 16 May 2020, Nicola wrote:


On 2020-05-16, Aditya Mahajan  wrote:

On Sat, 16 May 2020, Aditya Mahajan wrote:



Moreover, if you comment line line 126 of `2context.vim`

 "let s:id  = synIDtrans (s:id)

[If you make a local copy of 2context.vim, then you need to run the
file with `--mode=dev-vim` to ensure that the local copy is used]

Then the ruby example generates the following file:

\SYNBOL{}\SYN[rubyComment]{# Ruby program listing}\SYNEOL{}
\SYNBOL{}\SYN[rubyDefine]{def}\SYN[rubyMethodBlock]{ 

}\SYN[rubyMethodName]{foobar}\SYNEOL{}
\SYNBOL{}\SYN[rubyMethodBlock]{ 
print(}\SYN[rubyStringDelimiter]{"}\SYN[rubyString]{Hello 
World}\SYN[rubyStringDelimiter]{"}\SYN[rubyMethodBlock]{)}\SYNEOL{}

\SYNBOL{}\SYN[rubyDefine]{end}\SYNEOL{}

So, if you are willing to define wrappers for all ruby syntax blocks,
then I can provide a configuration option so that `2context` does not
apply that line.



That might provide a finer control over the highlighting, but the main
issue here seems to be that the generated file has Identifier instead of
Function, Special instead of Delimiter and Constant instead of String.
Looking at 2context.vim, AFAICS s:id_name seems computed correctly.
Maybe, the script does not set the appropriate filetype?


filetype is set correctly (since we get `ruby` options), but something 
weird is happening even with 2html.vim. Here is a minimal example:


Figured out what is happening. From `:he syntax`

"The names marked with * are the preferred groups; the others are minor groups.
For the preferred groups, the "syntax.vim" file contains default highlighting.
The minor groups are linked to the preferred groups, so they get the same
highlighting.  You can override these defaults by using ":highlight" commands
after sourcing the "syntax.vim" file."

All three `Function`, `Delimiter` and `String` are minor groups, so they get 
mapped to the preferred groups, which are `Identifier`, `Special`, and 
`Constant`, respectively. Most colorschemes define colors for minor groups as 
well, but since we are not loading any colorscheme, the minor groups are mapped 
to preferred groups, and we only get the preferred groups in the output.

Now that I know what is happening, it is relatively easy to fix.

```
\definecolor[colorone][r=0.251, g=0.349, b=0.322]
\definecolor[colortwo][r=0.612, g=0.608, b=0.478]
\definecolor[colorthree]  [r=1.0,   g=0.827, b=0.576]
\definecolor[colorfour]   [r=1.0,   g=0.592, b=0.310]
\definecolor[colorfive]   [r=0.960, g=0.310, b=0.161]
\definecolor[nearlywhite] [r=0.988, g=0.988, b=0.988]

\setupinteraction[state=start]
\setupcolors[textcolor=colorone]
\setupbackgrounds[page][background=color,backgroundcolor=nearlywhite]

\usemodule[vim]

\startvimrc[name=minor-groups]
hi Function  cterm=NONE
hi Stringcterm=NONE
hi Delimiter cterm=NONE
\stopvimrc


\startcolorscheme[oceansunset]
  \definesyntaxgroup[Comment] [color={colorfive},style=italic]
  \definesyntaxgroup[Function][color={colorfive},style=italic]
\stopcolorscheme

\definevimtyping[RUBY]
[
  syntax=ruby,
  alternative=oceansunset,
  escape=on, %NOTE, the comma was missing in your test file
  % Without the comma, the option is not set
  extras=minor-groups,
]

\starttext
\startRUBY
# Ruby program listing
def foobar
  print("Hello World")
end
\stopRUBY
\stoptext
```

Since I already map the minor groups to preferred groups in `t-vim`, I think 
that a good compromise is to enable the minor groups by default. I can do that 
by adding statements similar to those above in `2context.vim`. This will not 
have any visual impact on any existing code, but will allow those who want to 
tweak the highlighting of minor groups to define their own syntax highlighting.

Aditya
___
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] Custom color schemes in t-vim

2020-05-16 Thread Aditya Mahajan

On Sat, 16 May 2020, Nicola wrote:


On 2020-05-16, Aditya Mahajan  wrote:

On Sat, 16 May 2020, Aditya Mahajan wrote:



Moreover, if you comment line line 126 of `2context.vim`

 "let s:id  = synIDtrans (s:id)

[If you make a local copy of 2context.vim, then you need to run the
file with `--mode=dev-vim` to ensure that the local copy is used]

Then the ruby example generates the following file:

\SYNBOL{}\SYN[rubyComment]{# Ruby program listing}\SYNEOL{}
\SYNBOL{}\SYN[rubyDefine]{def}\SYN[rubyMethodBlock]{ 
}\SYN[rubyMethodName]{foobar}\SYNEOL{}
\SYNBOL{}\SYN[rubyMethodBlock]{  
print(}\SYN[rubyStringDelimiter]{"}\SYN[rubyString]{Hello 
World}\SYN[rubyStringDelimiter]{"}\SYN[rubyMethodBlock]{)}\SYNEOL{}
\SYNBOL{}\SYN[rubyDefine]{end}\SYNEOL{}

So, if you are willing to define wrappers for all ruby syntax blocks,
then I can provide a configuration option so that `2context` does not
apply that line.



That might provide a finer control over the highlighting, but the main
issue here seems to be that the generated file has Identifier instead of
Function, Special instead of Delimiter and Constant instead of String.
Looking at 2context.vim, AFAICS s:id_name seems computed correctly.
Maybe, the script does not set the appropriate filetype?


filetype is set correctly (since we get `ruby` options), but something 
weird is happening even with 2html.vim. Here is a minimal example:

```test.rb
# Ruby program listing
def foobar
  print("Hello World")
end
```

Run:

vim -u NONE -c "syntax manual" -c "set syntax=ruby" -c "source 
/usr/share/nvim/runtime/syntax/2html.vim" -c "wqa" test.rb

gives

```test.rb.html
http://www.w3.org/TR/html4/strict.dtd;>


...



# Ruby program listing
def foobar
  print(Hello World)
end





```

which is similar to what 2context.vim gets. If I source tohtml.vim or 
2context.vim from an existing vim session, then the tags are correct. I have 
not been able to figure out why this is happening.

Aditya
___
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] Custom color schemes in t-vim

2020-05-16 Thread Nicola
On 2020-05-16, Aditya Mahajan  wrote:
> On Sat, 16 May 2020, Aditya Mahajan wrote:

> Moreover, if you comment line line 126 of `2context.vim`
>
>  "let s:id  = synIDtrans (s:id)
>
> [If you make a local copy of 2context.vim, then you need to run the
> file with `--mode=dev-vim` to ensure that the local copy is used]
>
> Then the ruby example generates the following file:
>
> \SYNBOL{}\SYN[rubyComment]{# Ruby program listing}\SYNEOL{}
> \SYNBOL{}\SYN[rubyDefine]{def}\SYN[rubyMethodBlock]{ 
> }\SYN[rubyMethodName]{foobar}\SYNEOL{}
> \SYNBOL{}\SYN[rubyMethodBlock]{  
> print(}\SYN[rubyStringDelimiter]{"}\SYN[rubyString]{Hello 
> World}\SYN[rubyStringDelimiter]{"}\SYN[rubyMethodBlock]{)}\SYNEOL{}
> \SYNBOL{}\SYN[rubyDefine]{end}\SYNEOL{}
>
> So, if you are willing to define wrappers for all ruby syntax blocks,
> then I can provide a configuration option so that `2context` does not
> apply that line.

That might provide a finer control over the highlighting, but the main
issue here seems to be that the generated file has Identifier instead of
Function, Special instead of Delimiter and Constant instead of String.
Looking at 2context.vim, AFAICS s:id_name seems computed correctly.
Maybe, the script does not set the appropriate filetype?

Nicola


___
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] Custom color schemes in t-vim

2020-05-16 Thread Aditya Mahajan

On Sat, 16 May 2020, Aditya Mahajan wrote:


On Sat, 16 May 2020, Nicola wrote:


On 2020-05-14, Aditya Mahajan  wrote:

On Thu, 14 May 2020, Nicola wrote:


Quick question: Is \startcolorscheme... \stopcolorscheme (still)
supported by t-vim?



It is supposed to work. If it doesn't, then it is a bug. Could you
provide a complete MWE.


Please find a MWE at the bottom of this post.

The expected behaviour is that the keyword `function` in the JavaScript
snippet and `foobar` in the Ruby snippet should be colored and in
italics, as comments are. The respective Vim highlight groups are
`javaScriptFunction` and `rubyMethodName`, which both resolve to
`Function`.


The reason that there is no highlighting is because the generated `.vimout` 
does not contain any `\SYN[rubyMethodName]` or `\SYN[javaScriptFunction]` for 
the following reason:


Vim has the concept of a hierarchy of names for the syntax highlighting 
regions. For example, $VIMRUNTIME/syntax/ruby.rb contains the following 
lines:


hi def link rubyMethodName  rubyFunction
hi def link rubyFunction  Function

So, `rubyMethodName` maps to `rubyFunction`, which in turn maps to 
`Function`. Now, a vim colorscheme first checks if a highlighting style is 
available for `rubyMethodName`; if not it tries `rubyFunction`; and if not it 
tries `Function`.


Although something similar might have been possible in 2context.vim, I follow 
the `TOHtml` function of vim, and simply created a single tag for each syntax 
highlighting element, which in this case is `Function`. So, there is no tag 
generated for `rubyMethodName` and that is why changing the syntaxhighlight 
for that doesn't change anything.


Moreover, if you comment line line 126 of `2context.vim`

"let s:id  = synIDtrans (s:id)

[If you make a local copy of 2context.vim, then you need to run the file with 
`--mode=dev-vim` to ensure that the local copy is used]

Then the ruby example generates the following file:

\SYNBOL{}\SYN[rubyComment]{# Ruby program listing}\SYNEOL{}
\SYNBOL{}\SYN[rubyDefine]{def}\SYN[rubyMethodBlock]{ 
}\SYN[rubyMethodName]{foobar}\SYNEOL{}
\SYNBOL{}\SYN[rubyMethodBlock]{  
print(}\SYN[rubyStringDelimiter]{"}\SYN[rubyString]{Hello 
World}\SYN[rubyStringDelimiter]{"}\SYN[rubyMethodBlock]{)}\SYNEOL{}
\SYNBOL{}\SYN[rubyDefine]{end}\SYNEOL{}

So, if you are willing to define wrappers for all ruby syntax blocks, then I 
can provide a configuration option so that `2context` does not apply that line.

Aditya
___
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] Custom color schemes in t-vim

2020-05-16 Thread Aditya Mahajan

On Sat, 16 May 2020, Nicola wrote:


On 2020-05-14, Aditya Mahajan  wrote:

On Thu, 14 May 2020, Nicola wrote:


Quick question: Is \startcolorscheme... \stopcolorscheme (still)
supported by t-vim?



It is supposed to work. If it doesn't, then it is a bug. Could you
provide a complete MWE.


Please find a MWE at the bottom of this post.

The expected behaviour is that the keyword `function` in the JavaScript
snippet and `foobar` in the Ruby snippet should be colored and in
italics, as comments are. The respective Vim highlight groups are
`javaScriptFunction` and `rubyMethodName`, which both resolve to
`Function`.


The reason that there is no highlighting is because the generated `.vimout` 
does not contain any `\SYN[rubyMethodName]` or `\SYN[javaScriptFunction]` for 
the following reason:

Vim has the concept of a hierarchy of names for the syntax highlighting 
regions. For example, $VIMRUNTIME/syntax/ruby.rb contains the following lines:

hi def link rubyMethodName  rubyFunction
hi def link rubyFunction  Function

So, `rubyMethodName` maps to `rubyFunction`, which in turn maps to `Function`. 
Now, a vim colorscheme first checks if a highlighting style is available for 
`rubyMethodName`; if not it tries `rubyFunction`; and if not it tries 
`Function`.

Although something similar might have been possible in 2context.vim, I follow 
the `TOHtml` function of vim, and simply created a single tag for each syntax 
highlighting element, which in this case is `Function`. So, there is no tag 
generated for `rubyMethodName` and that is why changing the syntaxhighlight for 
that doesn't change anything.

Now, as I was looking into this, I noticed that `foobar` gets mapped to 
`Identifier` rather than `Function`. I am not sure why that is happening and I 
will look into that.

Aditya

___
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] Custom color schemes in t-vim

2020-05-16 Thread Nicola
On 2020-05-14, Aditya Mahajan  wrote:
> On Thu, 14 May 2020, Nicola wrote:
>
>> Quick question: Is \startcolorscheme... \stopcolorscheme (still)
>> supported by t-vim?

> It is supposed to work. If it doesn't, then it is a bug. Could you
> provide a complete MWE.

Please find a MWE at the bottom of this post.

The expected behaviour is that the keyword `function` in the JavaScript
snippet and `foobar` in the Ruby snippet should be colored and in
italics, as comments are. The respective Vim highlight groups are
`javaScriptFunction` and `rubyMethodName`, which both resolve to
`Function`.

The actual behaviour is that comments are highlighted correctly, but
I do not get any syntax highlighting for functions.

Thanks for t-vim, btw: I can't express in words how nice an idea it is!

Nicola


\setupcolors[state=start]

\definecolor[colorone][r=0.251, g=0.349, b=0.322]
\definecolor[colortwo][r=0.612, g=0.608, b=0.478]
\definecolor[colorthree]  [r=1.0,   g=0.827, b=0.576]
\definecolor[colorfour]   [r=1.0,   g=0.592, b=0.310]
\definecolor[colorfive]   [r=0.960, g=0.310, b=0.161]
\definecolor[nearlywhite] [r=0.988, g=0.988, b=0.988]

\setupinteraction[state=start]
\setupcolors[textcolor=colorone]
\setupbackgrounds[page][background=color,backgroundcolor=nearlywhite]

\usemodule[vim]
\unprotect
\startcolorscheme[oceansunset]
  \definesyntaxgroup[Comment][\c!color={colorfive},\c!style=italic]
  \definesyntaxgroup[Function][\c!color={colorfive},\c!style=italic]
  % \definesyntaxgroup[rubyMethodName][\c!color={colorfive},\c!style=italic]
  % \definesyntaxgroup[javaScriptFunction][\c!color={colorfive},\c!style=italic]
\stopcolorscheme
\protect

\definevimtyping[JAVASCRIPT][
  syntax=javascript,
  alternative=oceansunset,
  escape=on
]

\definevimtyping[RUBY][
  syntax=ruby,
  alternative=oceansunset,
  escape=on
]

\starttext
\startJAVASCRIPT
// JavaScript program listing
function foobar() {
  print("Hello World");
}
\stopJAVASCRIPT

\startRUBY
# Ruby program listing
def foobar
  print("Hello World")
end
\stopRUBY
\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
___


Re: [NTG-context] Custom color schemes in t-vim

2020-05-14 Thread Aditya Mahajan

On Thu, 14 May 2020, Nicola wrote:


Quick question: Is \startcolorscheme... \stopcolorscheme (still)
supported by t-vim?

In a template I wrote long time ago to typeset code, I have:

   \usemodule[vim]
   \unprotect
   \startcolorscheme[oceansunset]
 \definesyntaxgroup[Comment][\c!color={colortwo},\c!style=italic]
 % etc.
   \stopcolorscheme
   \protect

which I use as described in the wiki:

   \definevimtyping
[...]
[...
 alternative=oceansunset,
 ...]

But that does not seem to have any effect (if I change the colors, the
syntax highlighting does not change). I can use pscolor and
blackandwhite, though. I see that \startcolorscheme is not documented,
so maybe there is another mechanism?


It is supposed to work. If it doesn't, then it is a bug. Could you provide a 
complete MWE.

Aditya
___
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] Custom color schemes in t-vim

2020-05-14 Thread Nicola
Quick question: Is \startcolorscheme... \stopcolorscheme (still)
supported by t-vim?

In a template I wrote long time ago to typeset code, I have:

\usemodule[vim]
\unprotect
\startcolorscheme[oceansunset]
  \definesyntaxgroup[Comment][\c!color={colortwo},\c!style=italic]
  % etc.
\stopcolorscheme
\protect

which I use as described in the wiki:

\definevimtyping
 [...]
 [...
  alternative=oceansunset,
  ...]

But that does not seem to have any effect (if I change the colors, the
syntax highlighting does not change). I can use pscolor and
blackandwhite, though. I see that \startcolorscheme is not documented,
so maybe there is another mechanism?

Nicola

___
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] Background color of a framedtext that covers floats

2020-04-08 Thread Pablo Rodriguez
On 4/8/20 11:32 AM, Fabrice Couvreur wrote:
> [...]
> \startframedtext[width=max,background=color,backgroundcolor=fondpaille]
>      \starthanging[location=right]
>          {\startMPcode
>           draw unitsquare scaled 2cm ;
>           \stopMPcode}
>      \input tufte
>      \stophanging
> \stopframedtext

Hi Fabrice,

with this sample, I think it is impossible to get different background
unless you add something similar to "addbackground withcolor white ;".

With an external figure, you could add the background to the image. If
you draw the image, you should draw the background too.

Pablo
--
http://www.ousia.tk
___
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
___


  1   2   3   4   5   6   7   >