[NTG-context] Re: regular online meet-up

2024-04-09 Thread Henning Hraban Ramm

reminder: this is tonight (in European perception).

Am 07.04.24 um 09:37 schrieb Henning Hraban Ramm:

You’re invited to our regular online meet-up, this upcoming
Wednesday, April 10th, 19:00 CEST (UTC+2)

at https://lecture.senfcall.de/hen-rbr-rku-oke
(same, but shorter: https://u.mtxrun.eu/ctxmtg)

ConTeXt users of all levels are welcome!

Do you have a subject that you’d like to talk about?

Looking forward to seeing you,
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: 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: how to apply metapost effects to section title?

2024-04-09 Thread Wolfgang Schuster

seyal.zav...@gmail.com schrieb am 09.04.2024 um 14:53:

i want to produce a gradient header
i tried this code but it does not produce any result:

\startext
\def\Mystyle#1{\startMPcode
   picture tt ; tt := lmt_outline [
   kind = "path",
   text = "#1",
   ] ;
   fill
   for i within tt : pathpart i && endfor cycle
  withshademethod "linear"
  withshadedirection up
  withshadecolors (red, blue) ;
\stopMPcode
}

\definehead[Myhead][section]
\setuphead[Myhead][
   style=\Mystyle,
]
\startMyhead[title=sample] a sample text \stopMyhead
\stoptext


You can't use commands with parameters as argument for the style key.

To format single parts (number or title) of a section title you have to 
apply a command to the "deep...command" key but even then you have to 
make manual changes to the vertical alignment of the text.


 begin example
\starttexdefinition spaces Mystyle #1
  \setbox\scratchboxone\hbox{#1}%
  \setbox\scratchboxtwo\hbox\bgroup
\startMPcode
  picture tt ; tt := lmt_outline [
kind = "path",
text = "#1",
  ];
fill
  for i within tt : pathpart i && endfor cycle
  withshademethod "linear"
  withshadedirection up
  withshadecolors (red, blue) ;
\stopMPcode
  \egroup
  \boxyoffset\scratchboxtwo-\dp\scratchboxone
  \box\scratchboxtwo
\stoptexdefinition

\starttext

\setuphead
  [section]
  [
 deeptextcommand=\Mystyle,
%  deepnumbercommand=\Mystyle,
  ]

\startsection[title=Lorem ipsum]
\samplefile{lorem}
\stopsection

\stoptext
 end example


and the code below works but does not colorize numbers of this heads:
\starttext
 
\def\Mystyle#1{\startMPcode

   picture tt ; tt := lmt_outline [
   kind = "path",
   text = "#1",
   ] ;
   fill
   for i within tt : pathpart i && endfor cycle
  withshademethod "linear"
  withshadedirection up
  withshadecolors (red, blue) ;
\stopMPcode
}
 
\def\startMysection#1{\startsection[title=\Mystyle{#1}]}

\def\stopMysection{\stopsection}
 
\startMysection{hello}

what is best method?
\stopMysection
 
\stoptext


what is your suggestion?


To apply the format the the complete section title you have to create 
your own style and apply it with the "command" key, to get the number 
and title for the current section use the \structurenumber and 
\structuretitle macros.


 begin example
\starttexdefinition spaces protected Mystyle #1#2
  \startMPcode
picture tt ; tt := lmt_outline [
  kind = "path",
  text = "\structurenumber\space\structuretitle",
];
  fill
for i within tt : pathpart i && endfor cycle
withshademethod "linear"
withshadedirection up
withshadecolors (red, blue) ;
  \stopMPcode
\stoptexdefinition

\starttext

\setuphead
  [section]
  [command=\Mystyle]

\startsection[title=Lorem ipsum]
\samplefile{lorem}
\stopsection

\stoptext
 end example

Wolfgang
___
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 metapost effects to section title?

2024-04-09 Thread seyal . zavira
i want to produce a gradient header
i tried this code but it does not produce any result:

\startext
\def\Mystyle#1{\startMPcode
  picture tt ; tt := lmt_outline [
  kind = "path",
  text = "#1",
  ] ;
  fill
  for i within tt : pathpart i && endfor cycle
 withshademethod "linear"
 withshadedirection up
 withshadecolors (red, blue) ;
\stopMPcode
}

\definehead[Myhead][section]
\setuphead[Myhead][
  style=\Mystyle,
]
\startMyhead[title=sample] a sample text \stopMyhead
\stoptext

and the code below works but does not colorize numbers of this heads:
\starttext  



\def\Mystyle#1{\startMPcode 

  picture tt ; tt := lmt_outline [  

  kind = "path",

  text = "#1",  

  ] ;   

  fill  

  for i within tt : pathpart i && endfor cycle  

 withshademethod "linear"   

 withshadedirection up  

 withshadecolors (red, blue) ;  

\stopMPcode 

}   



\def\startMysection#1{\startsection[title=\Mystyle{#1}]}

\def\stopMysection{\stopsection}



\startMysection{hello}  

what is best method?

\stopMysection  



\stoptext

what is your suggestion?
___
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: [lug-leaders] BachoTeX 2024: Last minute

2024-04-09 Thread Taco Hoekwater

Hi all,

Please see the forwarded message from GUST below.

Best wishes,
Taco

> Begin forwarded message:
> 
> From: Jerzy Ludwichowski 
> Subject: [lug-leaders] BachoTeX 2024: Last minute
> Date: 9 April 2024 at 14:09:09 CEST
> To: tex...@tug.org, LUG boards 
> Reply-To: lug-boa...@ifi.uio.no
> 
> Dear TeXies,
> 
> we've extended the deadline for "early-bird"  BachoTeX 2024 registrations 
> until 11th of April.
> All the current details of the conference are available from the revamped(!) 
> page:
> 
> https://bachotex.gust.org.pl
> 
> Don't hesitate, come and share the joys of TeXing together: "Ideas are born 
> between heads"
> 
> --Jerzy Ludwichowski
> (for the Organizing Committee)

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