Re: [NTG-context] metafun 2

2019-08-14 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 div

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 densit

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 explanation

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 explanation.

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. > > http://www.pragma-ade.com/general/magazines/mag-1104-mkiv.

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 to

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 f

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 f

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 po

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 availabl

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 the

[NTG-context] metafun 2

2019-08-14 Thread Hans Hagen
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 As a teaser I uploaded a MyWay document that shows some

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

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

2019-01-14 Thread Jeong Dal
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 \startbuffer[defs] def drawGridF (expr nb)

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

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 the

Re: [NTG-context] Metafun scaling problem

2018-10-01 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 M

Re: [NTG-context] Metafun scaling problem

2018-10-01 Thread Lutz Haseloff
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 Management 1.02 mtx-context | mtx-context | main conte

Re: [NTG-context] Metafun scaling problem

2018-10-01 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. > My minimal file: > > \startMPpage > draw externalfigure "cow.pdf" ; > \stopMPpage > > The resulting pdf is, as the original, 97x70.6 mm, all ok.

[NTG-context] Metafun scaling problem

2018-10-01 Thread Lutz Haseloff
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 the original size, i get arithmetic overflow err

Re: [NTG-context] Metafun: Finding intersection between characters

2018-09-28 Thread Jeong Dal
Dear Hans, Thank you so much for a new code which works fine. It can be used for the title of chapters. I will play with this to make a nice title. Thank you again. Best regards, Dalyoung > 2018. 9. 28. 오전 12:43, Hans Hagen 작성: > > On 9/27/2018 5:06 PM, Jeong Dal wrote: >> Dear Hans, >> Fir

Re: [NTG-context] Metafun: Finding intersection between characters

2018-09-27 Thread Hans Hagen
On 9/27/2018 5:06 PM, Jeong Dal wrote: Dear Hans, First, I appreciate for your concerning and sharing your valuable time on this matter. I think that there is no one who has an interest in outlining Korean letters. It is my self-interest to use outlined text for titles of chapters. As we know,

Re: [NTG-context] Metafun: Finding intersection between characters

2018-09-27 Thread Jeong Dal
Dear Hans, First, I appreciate for your concerning and sharing your valuable time on this matter. I think that there is no one who has an interest in outlining Korean letters. It is my self-interest to use outlined text for titles of chapters. As we know, Korean letters are different from Engli

Re: [NTG-context] Metafun: Finding intersection between characters

2018-09-27 Thread Hans Hagen
On 9/26/2018 11:38 PM, Jeong Dal wrote: Dear Hans, 2018. 9. 26. 오후 9:24, Hans Hagen > 작성: On 9/26/2018 2:14 PM, Jeong Dal wrote: Dear Hans, I tested for more characters and found an interesting fact. If the first consonant and the vowels are connected in a glyph, the

Re: [NTG-context] Metafun: Finding intersection between characters

2018-09-26 Thread Jeong Dal
Dear Hans,2018. 9. 26. 오후 9:24, Hans Hagen 작성:On 9/26/2018 2:14 PM, Jeong Dal wrote:Dear Hans,I tested for more characters and found an interesting fact.If the first consonant and the vowels are connected in a glyph, then the outlining works OK, otherwise, it makes outline of th

Re: [NTG-context] Metafun: Finding intersection between characters

2018-09-26 Thread Hans Hagen
On 9/26/2018 2:14 PM, Jeong Dal wrote: Dear Hans, I tested for more characters and found an interesting fact. If the first consonant and the vowels are connected in a glyph, then the outlining works OK, otherwise, it makes outline of the first consonant only. you need to send a file not embed

Re: [NTG-context] Metafun: Finding intersection between characters

2018-09-26 Thread Jeong Dal
Dear Hans, I tested for more characters and found an interesting fact. If the first consonant and the vowels are connected in a glyph, then the outlining works OK, otherwise, it makes outline of the first consonant only. Here is a MWE. Thank you. Best regards, Dalyoung % \definefontfeatur

Re: [NTG-context] Metafun: Finding intersection between characters

2018-09-26 Thread Jeong Dal
Dear Hans, I have tested using your code. I just replace “N”, “T” with Korean letters. Here is an MWE which is a simplified version of your code. I tested using two fonts, and the outputs are different. Thank you for your concern. Best regards, Dalyoung %%% \usetypescriptfile[type-hcrlvt]

Re: [NTG-context] Metafun: Finding intersection between characters

2018-09-26 Thread Hans Hagen
On 9/26/2018 1:48 AM, Jeong Dal wrote: Dear Hans, First, it is great to know a new method of drawing an outlined font! I have applied it to Korean fonts. As you know, every Korean character is composed with “consonant+vowel(+consonant)” type. If consonant and vowel are connected (for exampl

Re: [NTG-context] Metafun: Finding intersection between characters

2018-09-26 Thread Hans Hagen
On 9/26/2018 1:48 AM, Jeong Dal wrote: Dear Hans, First, it is great to know a new method of drawing an outlined font! I have applied it to Korean fonts. As you know, every Korean character is composed with “consonant+vowel(+consonant)” type. If consonant and vowel are connected (for exampl

Re: [NTG-context] Metafun: Finding intersection between characters

2018-09-25 Thread Jeong Dal
Dear Hans, First, it is great to know a new method of drawing an outlined font! I have applied it to Korean fonts. As you know, every Korean character is composed with “consonant+vowel(+consonant)” type. If consonant and vowel are connected (for example, “호”), then it draws correctly, otherwis

Re: [NTG-context] MetaFun: nofmultipars wrong?

2018-09-25 Thread Hans Hagen
On 9/25/2018 3:24 AM, Henri Menke wrote: Dear list, I used to be under the impression that when you wanted a background frame around a piece of text, you'd use a loop over nofmultipars. However, I realized that even when the contained material breaks across pages, the counter remains 1 on the se

[NTG-context] MetaFun: nofmultipars wrong?

2018-09-24 Thread Henri Menke
Dear list, I used to be under the impression that when you wanted a background frame around a piece of text, you'd use a loop over nofmultipars. However, I realized that even when the contained material breaks across pages, the counter remains 1 on the second page. Another issue is that the frame

Re: [NTG-context] Metafun: Finding intersection between characters

2018-09-22 Thread Hans Hagen
On 9/22/2018 3:41 PM, Alan Braslau wrote: On Sat, 22 Sep 2018 13:45:17 +0200 Hans Hagen wrote: On 9/22/2018 12:08 PM, Floris van Manen wrote: It does not seem to work for all character combinations. e.g. B&T works, C&T works, C&M works, but N&T does not work. not N&M Why would that be? Thanks

Re: [NTG-context] Metafun: Finding intersection between characters

2018-09-22 Thread Alan Braslau
On Sat, 22 Sep 2018 13:45:17 +0200 Hans Hagen wrote: > On 9/22/2018 12:08 PM, Floris van Manen wrote: > > It does not seem to work for all character combinations. > > e.g. B&T works, C&T works, C&M works, but N&T does not work. > > not N&M > > Why would that be? > > Thanks > > .Floris > > > > >

Re: [NTG-context] Metafun: Finding intersection between characters

2018-09-22 Thread Hans Hagen
On 9/22/2018 12:08 PM, Floris van Manen wrote: It does not seem to work for all character combinations. e.g. B&T works, C&T works, C&M works, but N&T does not work. not N&M Why would that be? Thanks .Floris On 22 Sep 2018, at 11:27, Hans Hagen > wrote: On 9/22/2018

Re: [NTG-context] Metafun: Finding intersection between characters

2018-09-22 Thread Floris van Manen
It does not seem to work for all character combinations. e.g. B&T works, C&T works, C&M works, but N&T does not work. not N&M Why would that be? Thanks .Floris > On 22 Sep 2018, at 11:27, Hans Hagen wrote: > > On 9/22/2018 10:35 AM, Henri Menke wrote: >> Dear list, >> Challanged by a very ol

Re: [NTG-context] Metafun: Finding intersection between characters

2018-09-22 Thread Hans Hagen
On 9/22/2018 10:35 AM, Henri Menke wrote: Dear list, Challanged by a very old TeX.SX question https://tex.stackexchange.com/questions/180510 I wanted to calculate all the intersection points between two characters. Therefore I ripped off the \showshape macro to load the outlines from the font a

[NTG-context] Metafun: Finding intersection between characters

2018-09-22 Thread Henri Menke
Dear list, Challanged by a very old TeX.SX question https://tex.stackexchange.com/questions/180510 I wanted to calculate all the intersection points between two characters. Therefore I ripped off the \showshape macro to load the outlines from the font and convert them to MetaPost paths. Then I t

Re: [NTG-context] MetaFun: How to draw bent paths?

2018-09-19 Thread Alan Braslau
On Wed, 19 Sep 2018 11:18:30 +1200 Henri Menke wrote: > On 18/09/18 21:23, Henri Menke wrote: > > On 9/18/18 7:57 PM, Hans Hagen wrote: > >> On 9/16/2018 10:28 AM, Henri Menke wrote: > >>> Dear list, > >>> > >>> I want to draw paths between points which are bent by a certain angle. > >>> The

Re: [NTG-context] MetaFun: How to draw bent paths?

2018-09-18 Thread Henri Menke
On 18/09/18 21:23, Henri Menke wrote: > On 9/18/18 7:57 PM, Hans Hagen wrote: >> On 9/16/2018 10:28 AM, Henri Menke wrote: >>> Dear list, >>> >>> I want to draw paths between points which are bent by a certain angle. >>> The code in the MWE below works well but I was thinking that the expert >>>

Re: [NTG-context] MetaFun: How to draw bent paths?

2018-09-18 Thread Henri Menke
On 9/18/18 7:57 PM, Hans Hagen wrote: > On 9/16/2018 10:28 AM, Henri Menke wrote: >> Dear list, >> >> I want to draw paths between points which are bent by a certain angle. >> The code in the MWE below works well but I was thinking that the expert >> here can surely improve it and suggest a nicer s

Re: [NTG-context] MetaFun: How to draw bent paths?

2018-09-18 Thread Hans Hagen
On 9/16/2018 10:28 AM, Henri Menke wrote: Dear list, I want to draw paths between points which are bent by a certain angle. The code in the MWE below works well but I was thinking that the expert here can surely improve it and suggest a nicer syntax. looks like a challenge for Alan ... isn't it

[NTG-context] MetaFun: How to draw bent paths?

2018-09-16 Thread Henri Menke
Dear list, I want to draw paths between points which are bent by a certain angle. The code in the MWE below works well but I was thinking that the expert here can surely improve it and suggest a nicer syntax. Cheers, Henri --- \startMPpage vardef bend(expr a,b,phi) = a{dir(angle(b-a

Re: [NTG-context] metafun: error when I call the same function twice consecutively.

2018-06-01 Thread Jeong Dal
Dear Alan, Thank you for the clear explanation about z. I tought that z is a special variable different from other pairs. Now, I know that it is an equation. Thank you again. Best regards, Dalyoung > 2018. 6. 1. 오후 11:24, Alan Braslau 작성: > > On Fri, 01 Jun 2018 20:29:41 +0900 > Jeong Dal w

Re: [NTG-context] metafun: error when I call the same function twice consecutively.

2018-06-01 Thread Alan Braslau
On Fri, 01 Jun 2018 20:29:41 +0900 Jeong Dal wrote: > After inserting a line “save x, y;”, it works. This is also defined as "clearxy ;" For those learning MetaPost, simplifying, z is defined as "(x,y)" so one can write z = (a,b) ; This is an EQUATION in MetaPost (x,y) = (a,b) ;

Re: [NTG-context] metafun: error when I call the same function twice consecutively.

2018-06-01 Thread Jeong Dal
Dear Henri Menke, Thank you for the solution. After inserting a line “save x, y;”, it works. Thank you so much. Best regards, Dalyoung ___ If your question is of interest to others as well, please add an entry to t

Re: [NTG-context] metafun: error when I call the same function twice consecutively.

2018-05-31 Thread Henri Menke
On 01/06/18 14:22, Jeong Dal wrote: Hi, I defined a function using MetaFun, and call it to draw a figure. It is OK when I call it once. But there is an error when it runs the same function second time. (it stops when it call fap(3,2) after fap(2,2)) I have no idea what is wrong and how to fix

[NTG-context] metafun: error when I call the same function twice consecutively.

2018-05-31 Thread Jeong Dal
Hi, I defined a function using MetaFun, and call it to draw a figure. It is OK when I call it once. But there is an error when it runs the same function second time. (it stops when it call fap(3,2) after fap(2,2)) I have no idea what is wrong and how to fix it. Would you please tell me what I mis

Re: [NTG-context] MetaFun: Rotate picture without rotating labels

2018-04-05 Thread Henri Menke
On Fri, 2018-04-06 at 11:05 +1200, Henri Menke wrote: > Dear list, > > In the MWE below I would like py to be px rotated by 90 degrees but the labels > should not be rotated.  Is it possible? > > Cheers, Henri > > --- I thought of using vardef but that is kind of verbose because I gave to repea

[NTG-context] MetaFun: Rotate picture without rotating labels

2018-04-05 Thread Henri Menke
Dear list, In the MWE below I would like py to be px rotated by 90 degrees but the labels should not be rotated.  Is it possible? Cheers, Henri --- \startMPpage   path p ; p := origin .. (2,1) .. (3,0) .. (2,-1) .. (-2,1) .. (-3,0) .. (-2,-1) .. cycle ;   picture px, py ;   px := image (

Re: [NTG-context] Metafun "Structure-Trees"

2017-09-18 Thread luigi scarso
On Mon, Sep 18, 2017 at 10:57 AM, Hans Hagen wrote: > On 9/18/2017 10:25 AM, Ursula Hermann wrote: >> >> Hello! >> >> I have tried an example: >> >> 1 \starttext >> 2 This is me >> 3 \startMPcode >> 4 u:=0.4cm; >> 5 dirlabel:=90; >> 6 abscoord:=true; >> 7

Re: [NTG-context] Metafun "Structure-Trees"

2017-09-18 Thread Hans Hagen
On 9/18/2017 10:25 AM, Ursula Hermann wrote: Hello! I have tried an example: 1 \starttext 2 This is me 3 \startMPcode 4 u:=0.4cm; 5 dirlabel:=90; 6 abscoord:=true; 7 endlabelspace:=0.5cm; 8 draw startlable ("S") 9 draw tree[1][1

Re: [NTG-context] Metafun "Structure-Trees"

2017-09-18 Thread Ursula Hermann
METAFONTbook for an example.) [1] 1 \starttext 2 This is me 3 \startMPcode 4 u:=0.4cm; 5 dirlabel:=90; 6 abscoord:=true; 7 endlabelspace:=0.5cm; 8 draw startlable ("S") 9 draw tree[1][1]((-5.5u,4u)(5.5u,8u)) ("NP",

Re: [NTG-context] Metafun "Structure-Trees"

2017-09-14 Thread Ursula Hermann
2017 20:26 An: mailing list for ConTeXt users Betreff: Re: [NTG-context] Metafun "Structure-Trees" What exactly do you mean? (we can build tree diagrams with Metapost) Alan > On 13 Sep 2017, at 12:43, Ursula Hermann wrote: > > Hello! > > My question is: Is it po

Re: [NTG-context] Metafun "Structure-Trees"

2017-09-13 Thread Alan Braslau
What exactly do you mean? (we can build tree diagrams with Metapost) Alan > On 13 Sep 2017, at 12:43, Ursula Hermann wrote: > > Hello! > > My question is: Is it possible to make „Structure Trees“ for English > Sentences with „Categorial Grammar“? Sorry, I have no example. > > Thanks > >

[NTG-context] Metafun "Structure-Trees"

2017-09-13 Thread Ursula Hermann
Hello! My question is: Is it possible to make "Structure Trees" for English Sentences with "Categorial Grammar"? Sorry, I have no example. Thanks Uschi Hermann ___ If your question is of interest to othe

Re: [NTG-context] Metafun: setting pen size in properties

2017-07-25 Thread Aditya Mahajan
On Mon, 24 Jul 2017, Alan Braslau wrote: On Mon, 24 Jul 2017 10:26:25 +0200 Hans Hagen wrote: On 7/24/2017 1:40 AM, Aditya Mahajan wrote: Hi, Is it possible to set pen width using properties(...)? The following does not work (the color is set, but not the pen width): \starttext \startMPcod

Re: [NTG-context] Metafun: setting pen size in properties

2017-07-24 Thread Alan Braslau
On Mon, 24 Jul 2017 10:26:25 +0200 Hans Hagen wrote: > On 7/24/2017 1:40 AM, Aditya Mahajan wrote: > > Hi, > > > > Is it possible to set pen width using properties(...)? The > > following does not work (the color is set, but not the pen width): > > > > \starttext > > \startMPcode > > property p

Re: [NTG-context] Metafun: setting pen size in properties

2017-07-24 Thread Hans Hagen
On 7/24/2017 1:40 AM, Aditya Mahajan wrote: Hi, Is it possible to set pen width using properties(...)? The following does not work (the color is set, but not the pen width): \starttext \startMPcode property p[] ; p[1] := properties(withcolor red withpen pencircle scaled 1bp); p[2] := propert

Re: [NTG-context] Metafun: setting pen size in properties

2017-07-23 Thread Alan Braslau
withproperties is an experimental, metafun extension that appears to cover color and pre/postscripts. It could be extended to cover withpen, etc. Look at mp-mplib.mkiv. properties() returns an image object that can hold many things. The graph package does similar tricks. Alan On Sun, 23 Jul 2

[NTG-context] Metafun: setting pen size in properties

2017-07-23 Thread Aditya Mahajan
Hi, Is it possible to set pen width using properties(...)? The following does not work (the color is set, but not the pen width): \starttext \startMPcode property p[] ; p[1] := properties(withcolor red withpen pencircle scaled 1bp); p[2] := properties(withcolor blue withpen pencircle scaled 1

Re: [NTG-context] metafun

2016-03-24 Thread Hans Hagen
On 3/24/2016 6:24 PM, Piotr Kopszak wrote: P.S. For your conveniance, the minimal example: \startMPpositiongraphic{mypos:arrow} pair c[] ; initialize_box(\MPpos{\MPvar{self}}); c[1] := cxy ; initialize_box(\MPpos{\MPvar{to}}); c[2] := cxy ; drawarrow c[1] -- c[2] withpen

Re: [NTG-context] metafun

2016-03-24 Thread luigi scarso
On Thu, Mar 24, 2016 at 6:24 PM, Piotr Kopszak wrote: > P.S. > > For your conveniance, the minimal example: > > \startMPpositiongraphic{mypos:arrow} >pair c[] ; >initialize_box(\MPpos{\MPvar{self}}); >c[1] := cxy ; >initialize_box(\MPpos{\MPvar{to}}); >c[2] := cxy ; >drawa

Re: [NTG-context] metafun

2016-03-24 Thread Piotr Kopszak
P.S. For your conveniance, the minimal example: \startMPpositiongraphic{mypos:arrow} pair c[] ; initialize_box(\MPpos{\MPvar{self}}); c[1] := cxy ; initialize_box(\MPpos{\MPvar{to}}); c[2] := cxy ; drawarrow c[1] -- c[2] withpen pencircle scaled 2bp ; \stopMPpositiongraphic \sta

Re: [NTG-context] metafun

2016-03-24 Thread Piotr Kopszak
Hello list, The solution shown here no longer works with recent beta (indeed, it probably ceased to work some time ago). How should it be corrected? Best Piotr 2010-10-24 0:14 GMT+02:00 Aditya Mahajan : > On Sat, 23 Oct 2010, Herbert Voss wrote: > >> It is a hard job to understand how all works

[NTG-context] [MetaFun] Decorating running text

2015-03-18 Thread Norbert Melzer
Hi there! I have some text (a single word) which I want to decorate using MP. In this special case, I want to put a little crown above the "g" in the word "Shogun". Also the crown and text should get scaled accordingly to the surrounding text. ```tex \define\Shogun{\startMPcode draw textext("Sho

Re: [NTG-context] Metafun standalone and fonts

2014-09-29 Thread Alan BRASLAU
On Sat, 27 Sep 2014 14:50:10 +0200 Hans Hagen wrote: > just use mudraw to convert the bunch to individual svg images or pdftocairo to use the poppler library; You can also convert the pdf file to svg using inkscape. Alan __

Re: [NTG-context] Metafun error

2014-09-27 Thread Willi Egger
Hi Otared, thank you for this! - I do not understand correctly what has happened here. Now after rebooting it works again….. ;-( Thanks! Willi On 26 sep. 2014, at 23:09, Otared Kavian wrote: > Hi Willi, > > I just updated to > ConTeXt ver: 2014.09.26 11:42 MKIV beta fmt: 2014.9.26 i

Re: [NTG-context] Metafun standalone and fonts

2014-09-27 Thread Hans Hagen
On 9/27/2014 2:28 PM, Pol Stra wrote: Unfortunately, this only solve half of my problem: this outputs one pdf with all figures, while I try to output all figures in separated svg files. that would not give you the benefits of the context run (fonts and so) ... just use mudraw to convert the b

Re: [NTG-context] Metafun standalone and fonts

2014-09-27 Thread Pol Stra
Le samedi 27 septembre 2014, 12:23:47 Hans Hagen a écrit : > On 9/27/2014 10:21 AM, Pol Stra wrote: > > Hello! > > > > I have an mp file that I use with success in my document with mprun. > > > > But if I try to generate the figure alone with this command: > > > > mpost --mem=metafun myfigure.mp

Re: [NTG-context] Metafun standalone and fonts

2014-09-27 Thread Hans Hagen
On 9/27/2014 10:21 AM, Pol Stra wrote: Hello! I have an mp file that I use with success in my document with mprun. But if I try to generate the figure alone with this command: mpost --mem=metafun myfigure.mp that will never work with metafun in mkiv as we have extensions just run context m

[NTG-context] Metafun standalone and fonts

2014-09-27 Thread Pol Stra
Hello! I have an mp file that I use with success in my document with mprun. But if I try to generate the figure alone with this command: mpost --mem=metafun myfigure.mp I obtain this error: > ! Font cmr10 not usable: TFM file not found. > thelabel->...ture(EXPR3):infont.defaultfont.scaled > >

Re: [NTG-context] Metafun error

2014-09-26 Thread Otared Kavian
Hi Willi, I just updated to ConTeXt ver: 2014.09.26 11:42 MKIV beta fmt: 2014.9.26 int: english/english and tested again your example: everything works as expected here… So probably there is something strange happening on your side. Best regards: OK On 26 Sep 2014, at 16:22, Willi E

Re: [NTG-context] Metafun error

2014-09-26 Thread Willi Egger
Hi Otared, As mentioned in my first post I tested on ConTeXt ver: 2014.08.29 20:57 ConTeXt ver: 2014.09.26 11:42. strange! Willi On 26 sep. 2014, at 15:23, Otared Kavian wrote: > Hi Willi, > > I tested your example file: it works fine here with > ConTeXt ver: 2014.0

Re: [NTG-context] Metafun error

2014-09-26 Thread Otared Kavian
Hi Willi, I tested your example file: it works fine here with ConTeXt ver: 2014.09.25 18:58 MKIV beta fmt: 2014.9.25 int: english/english Which version are using? Best regards: OK On 26 Sep 2014, at 15:17, Willi Egger wrote: > Hello! > > Today I wanted to use an older tex file…. I

[NTG-context] Metafun error

2014-09-26 Thread Willi Egger
Hello! Today I wanted to use an older tex file…. I get the same error as in the following test. \startuniqueMPgraphic{test} path p; p := fullcircle scaled 5cm; draw p; label.bot(textext("Centre"), center p); \stopuniqueMPgraphic \starttext \startTEXpage

Re: [NTG-context] Metafun: numeric=color

2014-01-30 Thread Hans Hagen
On 1/29/2014 9:41 PM, Otared Kavian wrote: Hi, With the latest beta, ConTeXt ver: 2013.06.07 17:34 MKII fmt: 2014.1.29 in a file typeset with mkii I have a bunch of metapost macros (drawing a logo…) which used to typeset correctly until last week, I get an error message saying:

[NTG-context] Metafun: numeric=color

2014-01-29 Thread Otared Kavian
Hi, With the latest beta, ConTeXt ver: 2013.06.07 17:34 MKII fmt: 2014.1.29 in a file typeset with mkii I have a bunch of metapost macros (drawing a logo…) which used to typeset correctly until last week, I get an error message saying: Preloading the plain mem file, v

Re: [NTG-context] METAFUN+CONTEXT+CUSTOMIZE

2013-05-02 Thread Wolfgang Schuster
Am 03.05.2013 um 00:45 schrieb MANUEL GONZALEZ SUAREZ : > I use TeXLive 2011 and I get the following error (the file name is custo.tex): Use this definition \define[2]\ChapterCommand {\framed [frame=off,bottomframe=on,framecolor=orange,width=fit] {#1\hspace[medium]#2}} In newer v

[NTG-context] METAFUN+CONTEXT+CUSTOMIZE

2013-05-02 Thread MANUEL GONZALEZ SUAREZ
I use TeXLive 2011 and I get the following error (the file name is custo.tex):mtx-context | warning: synctex is enabled mtx-context | run 1: luatex --synctex=1 --fmt="C:/texlive/2011/texmf-var/luatex-cache/context/210a96fef5fbab446fd11afa77acb026/formats/cont-en" --lua="C:/texlive/2011/texm

Re: [NTG-context] METAFUN+CONTEXT+CUSTOMIZE

2013-05-02 Thread Wolfgang Schuster
Am 03.05.2013 um 00:27 schrieb MANUEL GONZALEZ SUAREZ : > Wolfgang Thanks for your help. > Your definition to customize the number of page works, but the command > definition \ ChapterCommand gives me a compilation error. (with LuaTeX and > MKIV). I guess you’re using a older context version

[NTG-context] METAFUN+CONTEXT+CUSTOMIZE

2013-05-02 Thread MANUEL GONZALEZ SUAREZ
Wolfgang Thanks for your help.Your definition to customize the number of page works, but the command definition \ ChapterCommand gives me a compilation error. (with LuaTeX and MKIV).Thank you again. Now I see that is a bit more complicated than I imagined.Greetings.-- Manuel González Suárez ___

Re: [NTG-context] METAFUN+CONTEXT+CUSTOMIZE

2013-05-02 Thread Wolfgang Schuster
Am 02.05.2013 um 23:31 schrieb MANUEL GONZALEZ SUAREZ : > > Hi everyone. > > I would like to pose the following question: I would like to know how I can > customize the page number using an embedded graphic made ​​with METAFUN. I > mean, I wish someone would send me a simple example to do th

[NTG-context] METAFUN+CONTEXT+CUSTOMIZE

2013-05-02 Thread MANUEL GONZALEZ SUAREZ
Hi everyone. I would like to pose the following question: I would like to know how I can customize the page number using an embedded graphic made ​​with METAFUN. I mean, I wish someone would send me a simple example to do that, for example, a page number or headers (chapter, section, etc..)  may a

Re: [NTG-context] Metafun textext()

2013-01-10 Thread Hans Hagen
On 1/10/2013 2:18 PM, Aditya Mahajan wrote: On Thu, 10 Jan 2013, Alan BRASLAU wrote: On Thu, 10 Jan 2013 06:51:50 -0500 Aditya Mahajan wrote: Since the beginning of MkIV, colors in metapost labels need to be set at the ConTeXt end (Untested): T := thelabel(textext("\color[blue]{I'm seeing d

Re: [NTG-context] Metafun textext()

2013-01-10 Thread Alan BRASLAU
On Thu, 10 Jan 2013 14:01:14 +0100 Alan BRASLAU wrote: > \startMPcode > label(textext("I'm seeing double"),origin) withcolor green ; > label(textext("I'm seeing double"),(-1mm,1mm)) withcolor blue ; > \stopMPcode > > DOES work. TESTED! ___

Re: [NTG-context] Metafun textext()

2013-01-10 Thread Aditya Mahajan
On Thu, 10 Jan 2013, Alan BRASLAU wrote: On Thu, 10 Jan 2013 06:51:50 -0500 Aditya Mahajan wrote: Since the beginning of MkIV, colors in metapost labels need to be set at the ConTeXt end (Untested): T := thelabel(textext("\color[blue]{I'm seeing double}"), origin); Aditya I don't believe

Re: [NTG-context] Metafun textext()

2013-01-10 Thread Mojca Miklavec
On Thu, Jan 10, 2013 at 2:01 PM, Alan BRASLAU wrote: > On Thu, 10 Jan 2013 06:51:50 -0500 > Aditya Mahajan wrote: > >> Since the beginning of MkIV, colors in metapost labels need to be set at >> the ConTeXt end (Untested): >> >> T := thelabel(textext("\color[blue]{I'm seeing double}"), origin); >>

Re: [NTG-context] Metafun textext()

2013-01-10 Thread Alan BRASLAU
On Thu, 10 Jan 2013 06:51:50 -0500 Aditya Mahajan wrote: > Since the beginning of MkIV, colors in metapost labels need to be set at > the ConTeXt end (Untested): > > T := thelabel(textext("\color[blue]{I'm seeing double}"), origin); > > Aditya I don't believe that this is true, but I am most

Re: [NTG-context] Metafun textext()

2013-01-10 Thread Aditya Mahajan
On Thu, 10 Jan 2013, Alan BRASLAU wrote: Metafun textext() has been changed in an attempt to be more efficient. However, this has a side effet that it now handles colors differently, among other things. The following example, intended to cause difficulties for the color blind, no longer works.

[NTG-context] Metafun textext()

2013-01-10 Thread Alan BRASLAU
Metafun textext() has been changed in an attempt to be more efficient. However, this has a side effet that it now handles colors differently, among other things. The following example, intended to cause difficulties for the color blind, no longer works. Is this a bug or a feature? \starttext \s

Re: [NTG-context] MetaFun: MetaPost example works with `mpost` but not embedded in ConTeXt: `! Redundant equation.`

2011-12-11 Thread Marco
On 2011-12-11 Paul Menzel wrote: > […] > > I then copied it into `\{start,stop}useMPgraphic`, > removed the `end ;` and `{begin,end}fig` and replaced > `{e,b}tex` by `textext()` but still get the following > error. I didn't check you code (try to make a minimal example next time)

<    1   2   3   4   >