Re: [NTG-context] metafun paralleled does not give a parallel path

2022-08-25 Thread Hans Hagen via ntg-context
On 8/25/2022 6:05 PM, Bruce Horrocks via ntg-context wrote: I'm seeing the line + arcs behaviour here. fixed in upload (we had a bug in mplib .. direction is now a primitive so that one was wrong) Hans -

Re: [NTG-context] metafun paralleled does not give a parallel path

2022-08-25 Thread Bruce Horrocks via ntg-context
I'm seeing the line + arcs behaviour here. ConTeXt ver: 2022.08.05 11:44 LMTX fmt: 2022.8.5 int: english/english > On 25 Aug 2022, at 13:03, Fabrice L via ntg-context > wrote: > > Hi, > >> Le 24 août 2022 à 22:50, fv leung via ntg-context a >> écrit : >> >> The following used to

Re: [NTG-context] metafun paralleled does not give a parallel path

2022-08-25 Thread Fabrice L via ntg-context
Hi,Le 24 août 2022 à 22:50, fv leung via ntg-context a écrit :The following used to produce three parallel lines.Now it produces one straight line and two arcs.\starttext\startMPcode  z0 = origin;  z1 = 72dir(45);  dotlabel.bot("z0", z0);  draw z0--z1;  draw (z0--z1)

Re: [NTG-context] Metafun hexagons aren't hexagons

2022-07-21 Thread Alan via ntg-context
On Thu, 21 Jul 2022 18:51:23 +0200 Hans Hagen via ntg-context wrote: > On 7/21/2022 5:56 AM, Alan via ntg-context wrote: > > On Wed, 20 Jul 2022 15:26:53 -0600 > > Max Chernoff via ntg-context wrote: > > > >> The recently added Metafun hexagons seem to be producing octagons > >> instead: > >>

Re: [NTG-context] Metafun hexagons aren't hexagons

2022-07-21 Thread Hans Hagen via ntg-context
On 7/21/2022 5:56 AM, Alan via ntg-context wrote: On Wed, 20 Jul 2022 15:26:53 -0600 Max Chernoff via ntg-context wrote: The recently added Metafun hexagons seem to be producing octagons instead: \startMPpage fill fullhexagon scaled 100; draw unithexagon scaled 50

Re: [NTG-context] Metafun hexagons aren't hexagons

2022-07-20 Thread Alan via ntg-context
On Wed, 20 Jul 2022 15:26:53 -0600 Max Chernoff via ntg-context wrote: > The recently added Metafun hexagons seem to be producing octagons > instead: > >\startMPpage >fill fullhexagon scaled 100; >draw unithexagon scaled 50 withcolor white; >\stopMPpage Of course, for

Re: [NTG-context] Metafun : save memory content ?

2022-07-19 Thread Fabrice L via ntg-context
Dear Bruce, dear list, > Le 19 juill. 2022 à 07:42, Bruce Horrocks a écrit : > >> On 19 Jul 2022, at 04:28, Fabrice L via ntg-context >> wrote: >> >> Complementary question : I saw that the « pos_a » « pos_b » of the example >> could not take numerical value, for example pos_1, pos_2.. How

Re: [NTG-context] Metafun : save memory content ?

2022-07-19 Thread Bruce Horrocks via ntg-context
> On 19 Jul 2022, at 04:28, Fabrice L via ntg-context > wrote: > > Complementary question : I saw that the « pos_a » « pos_b » of the example > could not take numerical value, for example pos_1, pos_2.. How can I use > metafun to write a macro to save the contents of hundreds of variable in

Re: [NTG-context] Metafun : save memory content ?

2022-07-18 Thread Fabrice L via ntg-context
> Le 18 juill. 2022 à 12:31, Hans Hagen via ntg-context a > écrit : > > On 7/18/2022 3:20 PM, Fabrice L via ntg-context wrote: >> Dear list, >> I’m doing animations in MetaFun, by simply using \startMPpage (…) >> \stopMPpage for each frame of the animation. Here is an example: >>

Re: [NTG-context] Metafun : save memory content ?

2022-07-18 Thread Hans van der Meer via ntg-context
Storing in a memory block in the computers' internal memory would be super, of course. But I am afraid that is asking a bit too much;-) dr. Hans van der Meer > On 18 Jul 2022, at 18:31, Hans Hagen via ntg-context > wrote: > > On 7/18/2022 3:20 PM, Fabrice L via ntg-context wrote: >> Dear

Re: [NTG-context] Metafun : save memory content ?

2022-07-18 Thread Hans Hagen via ntg-context
On 7/18/2022 3:20 PM, Fabrice L via ntg-context wrote: Dear list, I’m doing animations in MetaFun, by simply using \startMPpage (…) \stopMPpage for each frame of the animation. Here is an example: https://youtu.be/yhxUbVQx9Uo (please note you can watch it in HD by adjusting the setting in

Re: [NTG-context] Metafun : save memory content ?

2022-07-18 Thread Hans Hagen via ntg-context
On 7/18/2022 4:39 PM, Henning Hraban Ramm via ntg-context wrote: Am 18.07.22 um 15:20 schrieb Fabrice L via ntg-context: Dear list, I’m doing animations in MetaFun, by simply using \startMPpage (…) \stopMPpage for each frame of the animation. Here is an example: https://youtu.be/yhxUbVQx9Uo

Re: [NTG-context] Metafun : save memory content ?

2022-07-18 Thread Henning Hraban Ramm via ntg-context
Am 18.07.22 um 15:20 schrieb Fabrice L via ntg-context: Dear list, I’m doing animations in MetaFun, by simply using \startMPpage (…) \stopMPpage for each frame of the animation. Here is an example: https://youtu.be/yhxUbVQx9Uo (please note you can watch it in HD by adjusting the setting in

Re: [NTG-context] Metafun, difficulty with graphical element in the margin

2022-03-21 Thread Willi Egger via ntg-context
Hello Wolfgang, thank you so much for your time and investigation. — Indeed your solution works fine! I use the latest version from March 2022. I use \startbodymatter cum suis. Lieber Gruß Willi > On 20 Mar 2022, at 17:21, Wolfgang Schuster via ntg-context > wrote: > > Willi Egger via

Re: [NTG-context] Metafun, difficulty with graphical element in the margin

2022-03-20 Thread Wolfgang Schuster via ntg-context
Willi Egger via ntg-context schrieb am 20.03.2022 um 17:05: Hoi Wolfgang, I tested both variants (bodymatter and bodypart. The compilation runs through, however without the thumb-picture in the margin and the metafun error is in the log. 1. Do you use \startfrontmatter and \startbodymatter

Re: [NTG-context] Metafun, difficulty with graphical element in the margin

2022-03-20 Thread Willi Egger via ntg-context
Hoi Wolfgang, I tested both variants (bodymatter and bodypart. The compilation runs through, however without the thumb-picture in the margin and the metafun error is in the log. Gruß! Willi > On 20 Mar 2022, at 17:00, Wolfgang Schuster via ntg-context > wrote: > > Willi Egger via

Re: [NTG-context] Metafun, difficulty with graphical element in the margin

2022-03-20 Thread Wolfgang Schuster via ntg-context
Willi Egger via ntg-context schrieb am 20.03.2022 um 16:53: Hoi Wolfgang! thank you for your suggestion. Your example indeed works. However if I apply this to my situation, which is \startsectionblockenvironment[bodymatter] You use the wrong name for the argument:

Re: [NTG-context] Metafun, difficulty with graphical element in the margin

2022-03-20 Thread Willi Egger via ntg-context
Hoi Wolfgang! thank you for your suggestion. Your example indeed works. However if I apply this to my situation, which is \startsectionblockenvironment[bodymatter] \setups{Thumb-pictures} \stopsectionblockenvironment nothing happens. I.e. I get no error, but also no picture,

Re: [NTG-context] Metafun, difficulty with graphical element in the margin

2022-03-20 Thread Willi Egger via ntg-context
Hi Otared, thank you for your help. — I tried your approach aswel on my Mac as also on Linux. Unfortunately neither installation did give me a positive result. The error remains. Kind regards Willi > On 19 Mar 2022, at 23:39, Otared Kavian via ntg-context > wrote: > > Hi Willi, > > How

Re: [NTG-context] Metafun, difficulty with graphical element in the margin

2022-03-20 Thread Wolfgang Schuster via ntg-context
Willi Egger via ntg-context schrieb am 19.03.2022 um 21:42: Hello Otared, thanks so much for your testing and comments. — Tthe problem is, that this thumb-picture should only be placed in the \startboydmatter..\stopbodymatter sections. In the case of this book however there are the title

Re: [NTG-context] Metafun, difficulty with graphical element in the margin

2022-03-19 Thread Otared Kavian via ntg-context
Hi Willi, How about invoking the command \setups{Thumb-pictures} between a \start \stop pair as in the following: \showframe \starttext \startfrontmatter \startchapter[title=Test A] \samplefile{knuth} \stopchapter \stopfrontmatter %\page[yes] \start \setups{Thumb-pictures}

Re: [NTG-context] Metafun, difficulty with graphical element in the margin

2022-03-19 Thread Willi Egger via ntg-context
Hello Otared, thanks so much for your testing and comments. — Tthe problem is, that this thumb-picture should only be placed in the \startboydmatter..\stopbodymatter sections. In the case of this book however there are the title pages and quite some text including the TOC in the

Re: [NTG-context] Metafun, difficulty with graphical element in the margin

2022-03-19 Thread Otared Kavian via ntg-context
Hi Willi, Your test file works fine if I place \setups{Thumb-pictures} before \starttext (using version 2022.03.12 17:56 LMTX). However in the file you sent the choice of the command \setups{Thumb-pictures} is between chapter A and B, which seems starnge to me... Best regards:

Re: [NTG-context] Metafun, difficulty with graphical element in the margin

2022-03-19 Thread Hans Hagen via ntg-context
On 3/18/2022 8:29 PM, Willi Egger via ntg-context wrote: Good evening! I have a dictionary where I would like to include thumb-pictures in the margin. — When I use the attached code with a single \startchapter...\stopchapter, it works. However if I add another \startchapter…\stopchapter

Re: [NTG-context] Metafun, difficulty with graphical element in the margin

2022-03-18 Thread śrīrāma via ntg-context
On Saturday, March 19, 2022 12:59 AM Willi Egger via ntg-context wrote: > Could someone try to compile? I have compiled your test file with both the below versions : • mtx-context | current version: 2022.01.21 20:13 • mtx-context | current version: 2022.03.12 17:56 In both cases, no

Re: [NTG-context] [MetaFun] Trying to understand outlinetext, 'stretch' effect and \kerncharacters

2022-01-01 Thread kauśika via ntg-context
On Saturday, January 1, 2022 3:45:36 PM IST Hans Hagen wrote: > \starteffect is kind of old (comes from mkii), but you could use the > pseudo font feature effect in mkiv / lmtx which then makes a real font > instance instead of mixing in some pdf magic Thanks for the explanations Hans! Happy new

Re: [NTG-context] [MetaFun] Trying to understand outlinetext, 'stretch' effect and \kerncharacters

2022-01-01 Thread Hans Hagen via ntg-context
On 12/31/2021 3:13 AM, kauśika via ntg-context wrote: Dear list, I have the following graphic \startuseMPgraphic{TitleGraphic} draw outlinetext.b (\MPstring{TitleText}) (withcolor "titlefg") (withcolor "titleoutline"); \stopuseMPgraphic which I tried to use as follows to produce a

Re: [NTG-context] [MetaFun] Trying to understand outlinetext, 'stretch' effect and \kerncharacters

2021-12-30 Thread kauśika via ntg-context
On Friday, December 31, 2021 7:43:21 AM IST kauśika wrote: > Dear list, > > I have the following graphic > > \startuseMPgraphic{TitleGraphic} > draw outlinetext.b (\MPstring{TitleText}) > (withcolor "titlefg") > (withcolor "titleoutline"); > \stopuseMPgraphic > > which I tried to use as

Re: [NTG-context] metafun: circular arc

2021-10-05 Thread Floris van Manen via ntg-context
In the example the text is drawn as: draw followtext(q, "\strut TEXT ONE") it looks as if the \strut generates a space before the text. e.g. if you omit the \strut, the text will align at the start point. In my perception, the \strut is a zero width box, so it should not generate the space

Re: [NTG-context] metafun: circular arc

2021-10-05 Thread Thomas A. Schmitz via ntg-context
Thank you so much, Hans, that's a neat solution! I was banging my head against the wall, but this makes sense. On 10/5/21 6:38 PM, Hans Hagen wrote: Because you know how to rotate and scale: \startuseMPgraphic{empedocless} path p, q, r ; pair a ; p := fullcircle scaled 10cm ; drawarrow p   

Re: [NTG-context] metafun: circular arc

2021-10-05 Thread Hans Hagen via ntg-context
On 10/5/2021 4:58 PM, Thomas A. Schmitz via ntg-context wrote: Hi all, I hope the following example is not too convoluted: \useMPlibrary [txt] \define\EmpArrow{\getscaledglyph{1.6}{name:dejavumath}{\char"2B05}} \setupbodyfont [ss,9pt] \starttext \startuseMPgraphic{empedocles} %numeric a ;

Re: [NTG-context] metafun doesn't compile \root 3 \of 2

2021-09-03 Thread Hans Hagen via ntg-context
On 9/3/2021 11:48 AM, fv leung via ntg-context wrote: \starttext \m{\root3\of2} \stoptext works. But \starttext \startMPcode   label("\m{\root3\of2}", origin); \stopMPcode \stoptext doesn't. draw thetextext("\m{\root3\of2}",origin); labels are done in the default (normally monospace)

Re: [NTG-context] metafun transformation error

2021-06-04 Thread Ajith R
Hi, > here a ; is missing after the q That was a silly mistake while making the MWE.  When I corrected it, the MWE compiled correctly. However, the original code didn't have that error and wouldn't compile. So, I tried another MWE and found out what was causing the error. In the array I

Re: [NTG-context] metafun transformation error

2021-06-04 Thread Hans Hagen
On 6/4/2021 5:08 PM, Ajith R wrote: Hi, here a ; is missing after the q That was a silly mistake while making the MWE. When I corrected it, the MWE compiled correctly. However, the original code didn't have that error and wouldn't compile. So, I tried another MWE and found out what was

Re: [NTG-context] metafun transformation error

2021-06-04 Thread Ajith R
Hi, > In order answer that you have to make a MWE that we can run without the > need to edit a file. > Hans Sorry for having assumed that sharing the code was sufficient as MWE. Here is the trimmed version that still throws the error  \startMPpage StartPage ; numeric row, col, unit; 

Re: [NTG-context] metafun transformation error

2021-06-04 Thread Hans Hagen
On 6/4/2021 1:25 PM, Ajith R wrote: Hi, In order answer that you have to make a MWE that we can run without the need to edit a file. Hans Sorry for having assumed that sharing the code was sufficient as MWE. Here is the trimmed version that still throws the error \startMPpage

Re: [NTG-context] metafun transformation error

2021-06-04 Thread Hans Hagen
On 6/4/2021 10:15 AM, Ajith R wrote: Hi all, I am new to context and need help in solving an error. I am trying to print some numbers in a grid onto a transparent sheet as mirror images so that the numbers are correctly displayed when I view it from the non printed side. The numbers have a

Re: [NTG-context] [metafun example does not compile]

2021-05-21 Thread Floris van Manen
On 21/05/2021 14:14, Taco Hoekwater wrote: It looks like textext.dflt is undefined in the latest lmtx because it is now renamed to textext.dlft :) As we say in dutch: een kniesoor die daar op let ;-) ___ If your

Re: [NTG-context] [metafun example does not compile]

2021-05-21 Thread Floris van Manen
the line preventing the output from showing uo seems to be be: draw textext.dflt("DFLT-" & MonTexte) shifted PB; If I remove that, I'll get output. ___ If your question is of interest to others as well, please add

Re: [NTG-context] [metafun example does not compile]

2021-05-21 Thread Taco Hoekwater
Hi, It looks like textext.dflt is undefined in the latest lmtx because it is now renamed to textext.dlft :) > On 21 May 2021, at 14:03, Floris van Manen wrote: > > Using the example from the wiki > https://wiki.contextgarden.net/textext_positioning > > then using the latest version of lmtx >

Re: [NTG-context] metafun / patterns

2021-03-25 Thread Aditya Mahajan
On Thu, 25 Mar 2021, Hans Hagen wrote: > Hi, > > As I'm still in metafun (and svg) mode I decided to support patterns > (that are already supported at the tex end) also in metafun. As there > has never been demands I suppose it's not that interesting but it sort > of fits in. > > There are

Re: [NTG-context] metafun / patterns

2021-03-25 Thread mf
Sorry for the noise, my fault: Thunderbird replaced some semicolon combinations with emojis, so they were missing when I copied and pasted them in a source file. Massi Il 25/03/21 15:14, mf ha scritto: Il 25/03/21 14:11, Hans Hagen ha scritto: \startMPpage[offset=1cm] draw (fullcircle

Re: [NTG-context] metafun / patterns

2021-03-25 Thread mf
Il 25/03/21 14:11, Hans Hagen ha scritto: \startMPpage[offset=1cm]     draw (fullcircle scaled 5cm shifted (0cm,0cm))     withpattern image (fill fullcircle scaled 1cm withcolor "darkblue" ;)     withpatternscale (1/10,1/10)     ;     draw (fullcircle scaled 5cm shifted

Re: [NTG-context] metafun

2021-02-20 Thread Hans Hagen
On 2/20/2021 6:43 PM, Otared Kavian wrote: Thanks for the new upload. For your information, I would like to report that the metafun.tex file typesets almost corretly (actually I often typeset it for testing a new upload…) but I get a PDF with 400 pages instead the 448 you are mentionning…

Re: [NTG-context] metafun

2021-02-20 Thread Otared Kavian
Hi Hans, Thanks for the new upload. For your information, I would like to report that the metafun.tex file typesets almost corretly (actually I often typeset it for testing a new upload…) but I get a PDF with 400 pages instead the 448 you are mentionning… The issues are typically some figures

Re: [NTG-context] MetaFun labels and xsized

2020-12-25 Thread Pablo Rodriguez
On 12/25/20 10:09 PM, Hans Hagen wrote: >> [...] > \startMPcode > path p ; p := ( > ( 1, 1) -- > ( 1, 5) -- > (10, 10) -- > (14, 4) -- > cycle) xsized .75TextWidth; > > draw p ; > > freelabel("\strut α",point 0 of p,center p) ; >

Re: [NTG-context] MetaFun labels and xsized

2020-12-25 Thread Hans Hagen
On 12/25/2020 6:36 PM, Fabrice L wrote: Hi, Le 25 déc. 2020 à 12:30, Pablo Rodriguez a écrit : Dear list, I have this minimal MetaFun sample (the only one in my real document): \setupbodyfont[pagella] \starttext \startMPcode pair a ; a := (1, 1) ; pair b ; b := (1, 10) ; pair c

Re: [NTG-context] MetaFun labels and xsized

2020-12-25 Thread Pablo Rodriguez
On 12/25/20 6:36 PM, Fabrice L wrote: >> I have this minimal MetaFun sample (the only one in my real document): >> [...] >> Is there a way to relate adapt the labels to the xsized positions used? > > I’m sure somebody could find a more elegant solution, but here is a simple > one: > >

Re: [NTG-context] MetaFun labels and xsized

2020-12-25 Thread Fabrice L
Hi, > Le 25 déc. 2020 à 12:30, Pablo Rodriguez a écrit : > > Dear list, > > I have this minimal MetaFun sample (the only one in my real document): > > \setupbodyfont[pagella] > \starttext > \startMPcode > pair a ; a := (1, 1) ; > pair b ; b := (1, 10) ; > pair c ; c := (10, 10) ; >

Re: [NTG-context] MetaFun - "remove the paths of text" from a rectangle to let the background visible

2020-12-24 Thread Garulfo
Much more lean now thanks to your feedbacks. I prefered to "remove the shapes of the letter" rather than doubling the shading. Wikified https://wiki.contextgarden.net/Cover_Pages#.22Empty.22_letters \definecolor [ColorHighA] [h=c4a000] \definecolor [ColorHighB] [h=602217] \definecolor

Re: [NTG-context] MetaFun - "remove the paths of text" from a rectangle to let the background visible

2020-12-24 Thread Taco Hoekwater
> On 24 Dec 2020, at 00:14, Garulfo wrote: > > Thanks Taco, > > I made some progress : > https://wiki.contextgarden.net/Talk:Cover_Pages > > I now have two additional questions ... ;-) > > - How can I deal with "space" characters (because current solution > requires to explicitly add the ~

Re: [NTG-context] MetaFun - "remove the paths of text" from a rectangle to let the background visible

2020-12-23 Thread Hans Hagen
On 12/24/2020 12:46 AM, Otared Kavian wrote: Hi Garulfo, Thank you for sharing your nice example: it typesets correctly with mkiv, but it seems to me that with LMTX the text does not appear (at least on my installation of the latest LMTX). I admit that I had to trial and error this:

Re: [NTG-context] MetaFun - "remove the paths of text" from a rectangle to let the background visible

2020-12-23 Thread Hans Hagen
On 12/24/2020 12:14 AM, Garulfo wrote: Thanks Taco, I made some progress : https://wiki.contextgarden.net/Talk:Cover_Pages I now have two additional questions ... ;-) - How can I deal with "space" characters (because current solution   requires to explicitly add the ~ character) - What

Re: [NTG-context] MetaFun - "remove the paths of text" from a rectangle to let the background visible

2020-12-23 Thread Otared Kavian
Hi Garulfo, Thank you for sharing your nice example: it typesets correctly with mkiv, but it seems to me that with LMTX the text does not appear (at least on my installation of the latest LMTX). Best regards: Otared > On 24 Dec 2020, at 00:14, Garulfo wrote: > > Thanks Taco, > > I made

Re: [NTG-context] MetaFun - "remove the paths of text" from a rectangle to let the background visible

2020-12-23 Thread Garulfo
Thanks Taco, I made some progress : https://wiki.contextgarden.net/Talk:Cover_Pages I now have two additional questions ... ;-) - How can I deal with "space" characters (because current solution requires to explicitly add the ~ character) - What would be the work to do in order to make this

Re: [NTG-context] MetaFun - "remove the paths of text" from a rectangle to let the background visible

2020-12-21 Thread Taco Hoekwater
> On 21 Dec 2020, at 16:09, Garulfo wrote: > > Hi, > > > * I try to "remove the paths of text" from a metapost pictures to let > the background visible. > > * Using > https://mailman.ntg.nl/pipermail/ntg-context/2018/thread.html#92725 > > * I was able to get the following with one glyph

Re: [NTG-context] Metafun: is it possible to redefine dotlabel to draw a square ?

2020-12-10 Thread Hans Hagen
On 12/10/2020 8:37 PM, Aditya Mahajan wrote: On Thu, 10 Dec 2020, Hans Hagen wrote: dotlabel uses a pen to draw the dot, and I am not sure why it uses that rather than a path. Here is a (to me) simpler definition, where you can change the shape: just look in the pdf ... in your case the dot

Re: [NTG-context] Metafun: is it possible to redefine dotlabel to draw a square ?

2020-12-10 Thread Aditya Mahajan
On Thu, 10 Dec 2020, Hans Hagen wrote: > > dotlabel uses a pen to draw the dot, and I am not sure why it uses that > > rather > > than a path. Here is a (to me) simpler definition, where you can change the > > shape: > > just look in the pdf ... in your case the dot is a n point path while >

Re: [NTG-context] Metafun: is it possible to redefine dotlabel to draw a square ?

2020-12-10 Thread Hans Hagen
On 12/10/2020 7:04 PM, Aditya Mahajan wrote: On Thu, 10 Dec 2020, Otared Kavian wrote: Hi Aditya, Thank you very much ! That's great indeed, you gave me an elegant solution. One more question, in order for me to understand a little more: when defining a new dotlabel as you do, might it not

Re: [NTG-context] Metafun: is it possible to redefine dotlabel to draw a square ?

2020-12-10 Thread Hans Hagen
On 12/10/2020 6:44 PM, Aditya Mahajan wrote: On Thu, 10 Dec 2020, Otared Kavian wrote: Hi all, In Metafun when representing a point I woul dlike to have some dots represented by a square (or even by another scalable symbol): for instance in the following I would like the dot at the point B

Re: [NTG-context] Metafun: is it possible to redefine dotlabel to draw a square ?

2020-12-10 Thread Aditya Mahajan
On Thu, 10 Dec 2020, Otared Kavian wrote: > Hi Aditya, > Thank you very much ! > That's great indeed, you gave me an elegant solution. > > One more question, in order for me to understand a little more: when defining > a new dotlabel as you do, might it not conflict with the internal

Re: [NTG-context] Metafun: is it possible to redefine dotlabel to draw a square ?

2020-12-10 Thread Otared Kavian
Hi Aditya, Thank you very much ! That's great indeed, you gave me an elegant solution. One more question, in order for me to understand a little more: when defining a new dotlabel as you do, might it not conflict with the internal definitions of dotlabel in Metafun in some other place? Maybe

Re: [NTG-context] Metafun: is it possible to redefine dotlabel to draw a square ?

2020-12-10 Thread Aditya Mahajan
On Thu, 10 Dec 2020, Otared Kavian wrote: > Hi all, > > In Metafun when representing a point I woul dlike to have some dots > represented by a square (or even by another scalable symbol): for instance in > the following I would like the dot at the point B to be a square: > > \starttext >

Re: [NTG-context] Metafun: how to draw a straight line past the end points

2020-12-09 Thread Hans Hagen
On 12/9/2020 9:38 PM, Aditya Mahajan wrote: Or just redefine shortened to accept a pair! \startMPdefinitions primarydef p shortened d = reverse ( ( reverse (p enlonged -xpart paired(d)) ) enlonged -ypart paired(d) ) enddef ; \stopMPdefinitions patched but then also: primarydef p

Re: [NTG-context] Metafun: how to draw a straight line past the end points

2020-12-09 Thread Otared Kavian
Thanks Aditya! One can learn a lot with your answers ! In the Metafun manual I see enlonged but I did not know to use it. Best regards: Otared > On 9 Dec 2020, at 21:38, Aditya Mahajan wrote: > > On Wed, 9 Dec 2020, Otared Kavian wrote: > >> Hi Aditya, >> >> Thanks for the alternative

Re: [NTG-context] Metafun: how to draw a straight line past the end points

2020-12-09 Thread Aditya Mahajan
On Wed, 9 Dec 2020, Otared Kavian wrote: > Hi Aditya, > > Thanks for the alternative method, which comes handy if one wishes to extend > the straight line by a different amount at either end: > > \starttext > \startMPcode >z1 = (1cm,3cm) ; >z2 = (5cm, 9cm) ; >z3 = 1cm * dir(angle

Re: [NTG-context] Metafun: how to draw a straight line past the end points

2020-12-09 Thread Otared Kavian
Hi Aditya, Thanks for the alternative method, which comes handy if one wishes to extend the straight line by a different amount at either end: \starttext \startMPcode z1 = (1cm,3cm) ; z2 = (5cm, 9cm) ; z3 = 1cm * dir(angle (z2 - z1)) shifted z2 ; z4 = -.5cm*dir(angle(z2 - z1))

Re: [NTG-context] Metafun: how to draw a straight line past the end points

2020-12-09 Thread Aditya Mahajan
On Wed, 9 Dec 2020, Otared Kavian wrote: > Thanks a lot ! Indeed that does the job, which shows how wonderful Metafun is > ! Or, if you want to use high school algebra: \starttext \startMPcode z1 = (1cm,3cm) ; z2 = (5cm, 9cm) ; z3 = 1cm * dir(angle (z2 - z1)) shifted z2; draw

Re: [NTG-context] Metafun: how to draw a straight line past the end points

2020-12-09 Thread Otared Kavian
Hi Fabrice, Thanks a lot ! Indeed that does the job, which shows how wonderful Metafun is ! Best regards: Otared > On 9 Dec 2020, at 17:19, Fabrice L wrote: > > Hi, > >> Le 9 déc. 2020 à 10:57, Otared Kavian a écrit : >> >> Hi, >> >> I have a silly question: given two points in the plane

Re: [NTG-context] Metafun: how to draw a straight line past the end points

2020-12-09 Thread Fabrice L
Hi, > Le 9 déc. 2020 à 10:57, Otared Kavian a écrit : > > Hi, > > I have a silly question: given two points in the plane > z1 = (1cm,3cm) ; > z2 = (5cm, 9cm) ; > the command > draw z1 -- z2 withpen pencircle scaled .5pt ; > draws the line segment joining z1 and z2. How could

Re: [NTG-context] metafun 2

2019-09-08 Thread Aditya Mahajan
On Sun, 8 Sep 2019, Otared Kavian wrote: Hi Aditya, I wanted also to point out a typo on that page (two occurrences), namely "ploles" instead of "poles", in the explanations before the actual code. Thanks. Fixed. Aditya

Re: [NTG-context] metafun 2

2019-09-08 Thread Otared Kavian
Hi Aditya, As usual you show us a very nice and very clear example to taech nice features of ConTeXt: thank you so much! I wanted also to point out a typo on that page (two occurrences), namely "ploles" instead of "poles", in the explanations before the actual code. Best regard: > On 8 Sep

Re: [NTG-context] metafun 2

2019-09-08 Thread Aditya Mahajan
On Wed, 14 Aug 2019, Hans Hagen wrote: Hi, In the process of providing an additional (more abstract) interface to some of the old and also new MetaFun code we wonder what kind of features users would like to see. http://www.pragma-ade.com/general/magazines/mag-1104-mkiv.pdf Finally got

Re: [NTG-context] metafun 2

2019-08-19 Thread Jorge Manuel
Thanks a lot for the new features. In my system this code don’t work. macOS Mojave This is LuaMetaTeX, Version 2.00.0 open source > level 1, order 1, name 'cont-yes.mkiv' system > system > ConTeXt ver: 2019.08.17 12:16 MKIV beta fmt: 2019.8.19 int: English/English

Re: [NTG-context] metafun 2

2019-08-17 Thread Adam Reviczky
Hi Hans, Alan, This is really cool! Not sure how I missed this feature, works exactly for my use-case. Thanks a lot for pointing this out, I was able to find it in the MAPS as well. Cheers, Adam On Sat, Aug 17, 2019 at 9:52 AM Hans Hagen wrote: > On 8/17/2019 3:27 AM, Alan Braslau wrote: > >

Re: [NTG-context] metafun 2

2019-08-17 Thread Hans Hagen
On 8/17/2019 3:27 AM, Alan Braslau wrote: We have eofill in MP (in pdf/ps in fact) and that likely will do what you need. You forgot the MWD (Minimal Working Demo): \starttext \startMPpage path p ; p := fullcircle scaled 1cm ; path q ; q := fullcircle scaled .5cm ; nofill p ; eofill q ;

Re: [NTG-context] metafun 2

2019-08-16 Thread Alan Braslau
We have eofill in MP (in pdf/ps in fact) and that likely will do what you need. Alan On Sat, 17 Aug 2019 00:31:38 +0100 Adam Reviczky wrote: > Hi Hans, > > One MetaPost feature that I was looking forward to is the ability to create > a fill between two shapes. > Something like a difference

Re: [NTG-context] metafun 2

2019-08-16 Thread Adam Reviczky
Hi Hans, One MetaPost feature that I was looking forward to is the ability to create a fill between two shapes. Something like a difference function of two path's. For logos I use the workaround with creating a path alongside the excluded areas but it is always cumbersome. I have briefly

Re: [NTG-context] metafun 2

2019-08-15 Thread Arthur Reutenauer
On Wed, Aug 14, 2019 at 10:18:19PM +1200, Henri Menke wrote: > I just wanted to ask, will LMTX and MetaFun remain valid implementations > of TeX and MetaPost or do we have to expect incompatibilities? If you mean “will luametatex pass the trip test”, the answer is probably no: LuaTeX already

Re: [NTG-context] metafun 2

2019-08-14 Thread Hans Hagen
On 8/14/2019 4:58 PM, Mikael P. Sundqvist wrote: 1) 3d support. This is of course a very big request, but it would also be useful for many people. yes ... Alan and I are thinking of some (not that we came far yet) 2) About graphing, it would be nice to be able to do contour polots and

Re: [NTG-context] metafun 2

2019-08-14 Thread Hans Hagen
On 8/14/2019 4:58 PM, Otared Kavian wrote: On 14 Aug 2019, at 16:53, Aditya Mahajan wrote: […] This looks like a typical .. vs -- issue. I think there is a way to change how the points are connected, but I'll have to look at the code again. Aditya Indeed, this seems the right

Re: [NTG-context] metafun 2

2019-08-14 Thread Wolfgang Schuster
Otared Kavian schrieb am 14.08.2019 um 16:58: On 14 Aug 2019, at 16:53, Aditya Mahajan wrote: […] This looks like a typical .. vs -- issue. I think there is a way to change how the points are connected, but I'll have to look at the code again. Aditya Indeed, this seems the right

Re: [NTG-context] metafun 2

2019-08-14 Thread Mikael P. Sundqvist
On Wed, Aug 14, 2019 at 11:55 AM Hans Hagen wrote: > Hi, > > In the process of providing an additional (more abstract) interface to > some of the old and also new MetaFun code we wonder what kind of > features users would like to see. > >

Re: [NTG-context] metafun 2

2019-08-14 Thread Otared Kavian
> On 14 Aug 2019, at 16:53, Aditya Mahajan wrote: > > […] > This looks like a typical .. vs -- issue. I think there is a way to change > how the points are connected, but I'll have to look at the code again. > > Aditya Indeed, this seems the right explanation. @ Hans: would it be possible

Re: [NTG-context] metafun 2

2019-08-14 Thread Aditya Mahajan
On Wed, 14 Aug 2019, Otared Kavian wrote: Hi Hans, Thank you very much for the new features! I haven't yet read all the mag-1104-mkiv.pdf where you explain some of them, but after modifying one of your examples, I noticed that some funtions get a strange graph, which is probably due to the

Re: [NTG-context] metafun 2

2019-08-14 Thread Hans Hagen
On 8/14/2019 4:22 PM, Otared Kavian wrote: Hi Hans, Thank you very much for the new features! I haven't yet read all the mag-1104-mkiv.pdf where you explain some of them, but after modifying one of your examples, I noticed that some funtions get a strange graph, which is probably due to the

Re: [NTG-context] metafun 2

2019-08-14 Thread Otared Kavian
Hi Hans, Thank you very much for the new features! I haven't yet read all the mag-1104-mkiv.pdf where you explain some of them, but after modifying one of your examples, I noticed that some funtions get a strange graph, which is probably due to the fact that metafun2 is interpolating between

Re: [NTG-context] metafun 2

2019-08-14 Thread Hans Hagen
On 8/14/2019 1:31 PM, Floris van Manen wrote: where can i find the steps to install lmtx next to my current context luatex ? http://pragma-ade.nl/install.htm - Hans Hagen | PRAGMA ADE

Re: [NTG-context] metafun 2

2019-08-14 Thread Floris van Manen
where can i find the steps to install lmtx next to my current context luatex ? .F pEpkey.asc Description: application/pgp-keys ___ If your question is of interest to others as well, please add an entry to the Wiki!

Re: [NTG-context] metafun 2

2019-08-14 Thread Hans Hagen
On 8/14/2019 12:18 PM, Henri Menke wrote: Dear Hans, I just wanted to ask, will LMTX and MetaFun remain valid implementations of TeX and MetaPost or do we have to expect incompatibilities? It depends on how you define 'valid' ... we're downward compatible ... but LMTX will use features

Re: [NTG-context] metafun 2

2019-08-14 Thread Henri Menke
Dear Hans, I just wanted to ask, will LMTX and MetaFun remain valid implementations of TeX and MetaPost or do we have to expect incompatibilities? Cheers, Henri On 14/08/19 9:54 PM, Hans Hagen wrote: > Hi, > > In the process of providing an additional (more abstract) interface to > some of

Re: [NTG-context] MetaFun: how to check the number of arguments

2019-01-16 Thread Jeong Dal
Dear Hans, > vardef textlength(text t) = >save n ; n := 0 ; >for i = t : > n := n + 1 ; >endfor; >n > enddef; > Thank you for a good method! It can be used in another program. Best regards, Dalyoung

Re: [NTG-context] MetaFun: how to check the number of arguments

2019-01-16 Thread Hans Hagen
On 1/16/2019 12:53 AM, Jeong Dal wrote: Dear Hans, Thank you for a solution. In my memory, it is possible to check the argument in Lua, so I hope that there is a similar method in MetaFun. It may be easier to draw grid using lines instead of squares. vardef textlength(text t) = save n

Re: [NTG-context] MetaFun: how to check the number of arguments

2019-01-15 Thread Jeong Dal
Dear Hans, Thank you for a solution. In my memory, it is possible to check the argument in Lua, so I hope that there is a similar method in MetaFun. It may be easier to draw grid using lines instead of squares. Thank you again. Best regards, Dalyoung > 2019. 1. 16. 오전 2:04, Hans Hagen 작성:

Re: [NTG-context] MetaFun: how to check the number of arguments

2019-01-15 Thread Hans Hagen
On 1/14/2019 10:44 PM, Jeong Dal wrote: Dear all, In the following sample, it draws squares with label which is given. I’d like to know how to check the number of elements in the second argument? If it is 0, then I just draw grids only. Thank you for reading. Best regards, Dalyoung

Re: [NTG-context] Metafun scaling problem

2018-10-02 Thread Hans Hagen
On 10/2/2018 1:05 PM, Lutz Haseloff wrote: xsized was the solution. I wonder why xscaled worked for me for years. because we used a 1bp image at that time (was needed in two-pass approach) ... we don't have that limitation now (and 1bp is pretty inaccurate anyway) Hans

Re: [NTG-context] Metafun scaling problem

2018-10-02 Thread Lutz Haseloff
xsized was the solution. I wonder why xscaled worked for me for years. Thanks for the fast help. Lutz Am 2. Oktober 2018 11:10:04 MESZ schrieb Hans Hagen : >On 10/2/2018 7:03 AM, Lutz Haseloff wrote: >> Hi Hans, hi all, >> >> I think, that recent context has a problem with scaling included pdf

Re: [NTG-context] Metafun scaling problem

2018-10-02 Thread luigi scarso
On Tue, Oct 2, 2018 at 7:03 AM Lutz Haseloff wrote: > Hi Hans, hi all, > > I think, that recent context has a problem with scaling included pdf files. > > > Metapost traditional scaled math has a limited range, you can use doublefun or decimalfun (not more binaryfun) \starttext \startTEXpage

Re: [NTG-context] Metafun scaling problem

2018-10-02 Thread Hans Hagen
On 10/2/2018 7:03 AM, Lutz Haseloff wrote: Hi Hans, hi all, I think, that recent context has a problem with scaling included pdf files. My minimal file: \startMPpage draw externalfigure "cow.pdf" ; \stopMPpage The resulting pdf is, as the original, 97x70.6 mm, all ok. If I try to scale to

Re: [NTG-context] Metafun scaling problem

2018-10-02 Thread luigi scarso
On Tue, Oct 2, 2018 at 8:19 AM Lutz Haseloff wrote: > On Windows, I got it working again with current Context (20180404) and > current luatex from win32tex > (1.07 development ID 6686) > > On linux-armhf I did a fresh "./first-setup.sh --engine=luatex" and got: > > mtx-context | ConTeXt Process

  1   2   3   >