[NTG-context] applying style to frame content

2024-05-14 Thread seyal . zavira
Hi all,

what is the better way to apply a metapost effect to a piece of any structure 
text
for example when defining footnotes, frames , etc.
i use this method for frames:

this is my MWE:
\defineframed[Myframe][frame=off]
\starttexdefinition spaces protected Mystyle #1
   \startMPcode
 picture tt ; tt:= lmt_outline [
   kind = "path",
   text = "\Myframe{#1}",
 ];
   fill
 for i within tt : pathpart i && endfor cycle
 withshademethod "linear"
 withshadedirection up
 withshadecolors (red,blue);
   \stopMPcode
\stoptexdefinition

\starttext
\Mystyle{hello}
\stoptext


but what is the proper way if i want to use this style as simple as \tfb in 
definition of this structures? such as:
\defineframed[Myframe][frame=off,style=\tfb\Mystyle,]

Thanks in advance.
___
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: rendering arabic diacritics

2024-05-09 Thread seyal zavira
Of course!

i attached output file before and after applying new patch

On Thu, May 9, 2024 at 9:08 AM Hamid,Idris 
wrote:

>
>
> -- Original Message --
> From "Hans Hagen" 
> To "ntg-context@ntg.nl" 
> Date 5/9/2024 6:29:40 AM
> Subject [NTG-context] Re: rendering arabic diacritics
>
> ** Caution: EXTERNAL Sender **
>
> On 5/9/2024 2:17 PM, Hamid,Idris wrote:
>
> Hi Seyal,
>
> See below:
>
> -- Original Message --
> From "Hans Hagen" mailto:j.ha...@xs4all.nl
> >>
> To "seyal.zav...@gmail.com  >"
> mailto:seyal.zav...@gmail.com
> >>; "mailing list
> for ConTeXt users" mailto:ntg-context@ntg.nl
> >>
> Date 5/9/2024 3:31:45 AM
> Subject [NTG-context] Re: rendering arabic diacritics
>
>
> ** Caution: EXTERNAL Sender **
> On 5/9/2024 10:03 AM, seyal.zav...@gmail.com
>  wrote:
>
> Hi all,
> when i want to use the linked font for arabic texts it doesn't render
> diacritics properly
> i doesn't have problem with this font in inkscape or libreoffice
> what featureset should i apply?
> font link:
>
> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdrive.google.com%2Ffile%2Fd%2F1hCcv6wqWjd-5GEKnaowh8E8YVbTgGqQr%2Fview%3Fusp%3Dsharing=05%7C02%7CIdris.Hamid%40ColoState.EDU%7Cc8b63025b08545aa636308dc70244f52%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C638508548453863256%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C=a2qMEGD0wo%2FhM6oNJ7AvfFyRPMEJuu0bFeceX4PPnsg%3D=0
> 
> <
> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdrive.google.com%2Ffile%2Fd%2F1hCcv6wqWjd-5GEKnaowh8E8YVbTgGqQr%2Fview%3Fusp%3Dsharing=05%7C02%7CIdris.Hamid%40ColoState.EDU%7Cc8b63025b08545aa636308dc70244f52%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C638508548453873437%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C=%2FLAHOebc2kdBEl4rBsEnp7gV4f6ZpXMWNt4FoUptSus%3D=0
> 
> >
> this is my MWE:
> \definefontfeature [arabis]
> [mode=node,language=dflt,script=arab,
> init=yes,medi=yes,fina=yes,isol=yes,
> liga=yes,dlig=yes,rlig=yes,clig=yes,
> mark=yes,mkmk=yes,kern=yes,curs=yes]
> \definefont [Ahang] [file:Ahang-Regular.otf*arabis at 18pt]
> \setupalign[r2l]
> \starttext
> {\Ahang تَشْكِيل كَسْرَة}
> \stoptext
>
> \definefont [Ahang] [file:Ahang-Regular.otf*arabic at 18pt]
> but there is an issue with widths, ill send you a patch to test
>
>
> The provided "*arabic" featureset should suffice for this font. Also
> TEXpage is useful for this kind of MWE:
>
> \definefont [Ahang] [file:Ahang-Regular.otf*arabic at 18pt]
> \setupalign[r2l]
> \startTEXpage[offset=1em]
> {\Ahang تَشْكِيل كَسْرَة}
> \stopTEXpage
>
> In prehistoric ConTeXt version
>
> 2023.09.26 18:19
>
> the diacritics look fine in both ConTeXt and unicode editor MS Notepad.
>
> So if there is something wrong, it must be in a more recent version.
>
> For comparison: Before applying Hans' patch, could you kindly send your
> pdf of the MWE that shows the error? Mine is attached.
>
> Ahang-Regular has no width settings for the marks so we need to zero
> them. Tahrir_Regular has widths but these we explictly need to zero with
> a pseudo feature then. (What are the assumptions when we do arabic? That
> marks are to have zero width?)
>
>
> Yes, marks should have zero-width but Uniscribe (and Harbuzz?/its
> successor?) provide support for legacy fonts with non-zero width.
>
> But sometimes font designers imitate legacy behavior..
>
> So it used to be often the case that a font with diacritics that worked in
> Uniscribe etc. (e.g., Deja Vu Arabic) would show marks with widths in
> ConTeXt.
>
> In order to be more helpful, I should update to the latest beta, run some
> tests, and get current on the status of these matters..
>
> Idris
> --
> Idris Samawi Hamid, Professor
> Department of Philosophy
> Colorado State University
> Fort Collins, CO 80523
>
> ___
> 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
>
> ___
>


test.pdf
Description: Adobe PDF document


test2.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 / 

[NTG-context] rendering arabic diacritics

2024-05-09 Thread seyal . zavira
Hi all,

when i want to use the linked font for arabic texts it doesn't render 
diacritics properly
i doesn't have problem with this font in inkscape or libreoffice
what featureset should i apply?

font link:
https://drive.google.com/file/d/1hCcv6wqWjd-5GEKnaowh8E8YVbTgGqQr/view?usp=sharing

this is my MWE:
\definefontfeature [arabis]
 [mode=node,language=dflt,script=arab,
   init=yes,medi=yes,fina=yes,isol=yes,
   liga=yes,dlig=yes,rlig=yes,clig=yes,
   mark=yes,mkmk=yes,kern=yes,curs=yes]
\definefont [Ahang] [file:Ahang-Regular.otf*arabis at 18pt]
\setupalign[r2l]
\starttext
{\Ahang تَشْكِيل  كَسْرَة}
\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
___


[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:texgyrepage

[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] 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] 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] Re: how to include an an svg file?

2024-03-15 Thread seyal zavira
Thanks you and harban for all your thorough explanation.

On Fri, 15 Mar 2024, 23:11 Hans Hagen via ntg-context, 
wrote:

> On 3/13/2024 9:16 AM, Henning Hraban Ramm wrote:
> > Am 12.03.24 um 23:59 schrieb seyal zavira:
> >> You are correct. when i convert this svg to pdf via inkscape it works
> >> like a charm.
> >>
> >> But what is standard way of including an svg file with context if we
> >> want to inkscape render the images?
> >
> > \externalfigure[smile]
> >
> > without any other settings, but inkscape must be callable on the command
> > line (which doesn’t work for me on MacOS any more, must investigate…).
>  \startMPcode
>  draw lmt_svg [ filename = "smile.svg"]
>  \stopMPcode
>
> Now gives the attached but it took me a while to figure out what works.
> An inkscape export adds for instance something (globally applied) that
> is not in the svg file (which actually derived from tiger.svg as
> mentioned in the file).
>
> To be honest this is a horrible file and a good example of making things
> more complex than needed (probably common in wysiwyg applications),
> although we already had the machinery in the mp/pdf converter.
>
> The biggest issue here is that one has to put some constrants in place
> order to make it work in e.g. sumatra (mypdf) and acrobat (which here
> actually does weird erratic things when I play with another test).
>
> As with much complex svg, browsers also differ in interpretation o fsome
> features so it's hard to figure out what to do when there are
> conflicting demands. (Pointing to something that works tomorrow doesn't
> mean it worked when we tried to implement something yesterday.)
>
> For Hraben - who mentioned it - i also added support for group opacity
> and transformed shades.
>
> In the process I tried a few inkscape options (pdf export) but some
> produce faulty files (with missing stuff) so i guess we have a complex
> situation in general. That said, as long as one sticks to reliable and
> clean code (plain svg) it should mostly work out.
>
> Text is another matter because svg dropped glyph support so now
> everything has to go through font features which in turn means that if
> one uses svg as output format one has to specify every character with
> possible abuse of a substitution feature that accesses it. So that is no
> longer a real interesting option, unless of course one exports all text
> as curves, just to be sure.
>
> (I will extend general text suport but it will always be suboptimal but
> then, svg is not a long term archival format anyway.)
>
> No upload yet as i also want to do some cleanup,
>
> ps. For metapost lovers, here is some of the trickery used:
>
> \startMPpage[offset=1ts]
>
>  draw image (
>  fill (unitsquare xscaled 10cm yscaled 4cm)
>  withcolor svgcolor(0.5,0,0)
>  ;
>
>  registerluminositygroup ("test") (
>  fill (unitsquare scaled 2cm) shifted (1cm,1cm)
>  withshademethod "circular"
>  withshadecolors (.6,.1)
>  ) ;
>
>  applyluminositygroup ("test") (
>  fill (unitsquare scaled 2cm) shifted (1cm,1cm)
>  withshademethod "circular"
>  ) ;
>
>  draw luminositygroup (
>  fill (unitsquare scaled 2cm) shifted (4cm,1cm)
>  withshademethod "circular"
>  withshadecolors (.6,.1)
>  ) (
>  fill (unitsquare scaled 2cm) shifted (4cm,1cm)
>  withshademethod "circular"
>  ) ;
>
>  draw luminosityshade (
>  (unitsquare scaled 2cm) shifted (7cm,1cm)
>  ) (
>  withshademethod "circular"
>  withshadecolors (.6,.1)
>  ) (
>  withshademethod "circular"
>  ) ;
>  ) ;
>
> \stopMPpage
>
> Not that intuitive and a bit ugly deep down but it works (there was no
> need to extend mp btw as we already have graphic grouping in the engine).
>
> 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
> th

[NTG-context] Re: how to include an an svg file?

2024-03-12 Thread seyal zavira
Thanks. I appreciate your work

You are correct. when i convert this svg to pdf via inkscape it works like
a charm.

But what is standard way of including an svg file with context if we want
to inkscape render the images?

On Tue, 12 Mar 2024, 21:51 Hans Hagen,  wrote:

> On 3/12/2024 2:53 PM, seyal zavira wrote:
> > thanks for your reply
> >
> > yes but i don't have problem with regular svgs but when svgs has
> > gradient color it does not produce any color in output.
> >
> > you can see my svg in attachment.
> svg gets worse and worse (esp the inheritance model) ... anyway, i can
> sort of get the gradient but no stepwise gradient opacity (in pdf and
> i'm not going to emulate something) (it's not the most interesting stuff
> to work on unpaid)
>
> but ... i don't know if fixing this breaks something else
>
> 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
>
> ___
>
___
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 include an an svg file?

2024-03-12 Thread seyal zavira
thanks for your reply

yes but i don't have problem with regular svgs but when svgs has gradient
color it does not produce any color in output.

you can see my svg in attachment.

On Tue, Mar 12, 2024 at 9:43 AM Jean-Pierre Delange 
wrote:

> Hi !
>
> Did you have a look at this :
>
> https://wiki.contextgarden.net/SVG
>
> Le 12/03/2024 à 14:36, seyal.zav...@gmail.com a écrit :
> > hi all.
> >
> > when i want to put some SVGs in my document the svg does not render
> properly here is the code:
> >
> > \starttext
> > \startMPcode
> > draw lmt_svg [
> > filename = "smile.svg"]
> > \stopMPcode
> > \stoptext
> >
> > also when i look at evenmore manual at page15, for font Abelone-FREE the
> gradients has rendered properly is there difference between rendering such
> fonts and rendering SVGs?
> >
> > if its a font feature how i can use this font features for my svg?
> >
> ___
> > 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
>
> ___
>
___
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 include an an svg file?

2024-03-12 Thread seyal . zavira
hi all.

when i want to put some SVGs in my document the svg does not render properly 
here is the code:

\starttext
\startMPcode
draw lmt_svg [
filename = "smile.svg"] 
\stopMPcode
\stoptext

also when i look at evenmore manual at page15, for font Abelone-FREE the 
gradients has rendered properly is there difference between rendering such 
fonts and rendering SVGs?

if its a font feature how i can use this font features for my svg?
___
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 Create Asymmetrical Continuous Columns in ConTeXt?

2024-01-18 Thread seyal . zavira
Hi all,

I have a lengthy text that I wish to seamlessly incorporate using the 
\input{mytext} command in ConTeXt. 
Additionally, I aim to present it in asymmetrical continuous columns, where the 
text flows over several pages.

I have tried paragraphs and columns, but in paragraphs, I can't flow text 
across several pages without manually breaking it, and in columns, I haven't 
found a way to implement asymmetric columns.

How can I achieve this layout in ConTeXt? this is a MWE but it does not work 
properly:

\definecolumnset[mymixedcolumn][n=2]
\setupcolumnset[mymixedcolumn:1][width=4cm]
\setupcolumnset[mymixedcolumn:2][width=7cm]

\starttext
\startcolumnset[mymixedcolumn]
\dorecurse{5}{
\input{knuth}
}
\stopcolumnset
\stoptext

also is there a mechanism to automatically continue text between desired 
frames? For example, is there a way to write a function that, if the text 
reaches the end of the line and there is not enough space for another line in 
that frame, it continues the text in another frame that is already specified? 
in other word How do you make text flow to another part of a page?

Thanks in advance.
Best regards,
Seyal
___
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
___