Re: [NTG-context] Missing graphic in MPpage when viewing in Apple MAC Preview or GIMP 2.10 but not Adobe

2020-08-16 Thread Keith McKay
Thanks Taco! I have been playing about with an example from this site https://tex.loria.fr/prod-graph/zoonekynd/metapost/metapost.html which was originally for a square and I obviously didn't get my angles right. Thanks for spotting it. I'm beginning to appreciate where the Fun in MetaFun

Re: [NTG-context] How can I use ConTeXt from TeXLive2020 ?

2020-08-14 Thread Mojca Miklavec
;. What's missing is better integration though (to end up with almost as good integration as metapost/metafun offers), and 3D with javascript mousing support never worked either. Mojca ___ If your question is of

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

2020-08-13 Thread Jairo A. del Rio
Using \MPcolor does it for me. Thank you very much, Aditya :) Jairo :) El jue., 13 de ago. de 2020 a la(s) 18:47, Aditya Mahajan (adit...@umich.edu) escribió: > On Thu, 13 Aug 2020, Jairo A. del Rio wrote: > > > Hi, list! I have two questions concerning MetaFun: > > >

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

2020-08-13 Thread Aditya Mahajan
On Thu, 13 Aug 2020, Jairo A. del Rio wrote: > Hi, list! I have two questions concerning MetaFun: > > 1st: > > What is the correct way to pass a ConTeXt named color (e.g. xwi's "maroon") > to MetaFun. Using (with \usecolors[xwi] loaded in the preamble): > > w

[NTG-context] Two questions about color in MetaFun

2020-08-13 Thread Jairo A. del Rio
Hi, list! I have two questions concerning MetaFun: 1st: What is the correct way to pass a ConTeXt named color (e.g. xwi's "maroon") to MetaFun. Using (with \usecolors[xwi] loaded in the preamble): withcolor maroon does not work. I could copy-paste definitions from ConTeXt sources

Re: [NTG-context] How to properly pass TeX/Lua data to MetaPost/MetaFun?

2020-08-09 Thread Jairo A. del Rio
Nice, I'm reading results right now. Thank you a lot, Hans. Jairo :) El dom., 9 de ago. de 2020 a la(s) 13:05, Hans Hagen (j.ha...@xs4all.nl) escribió: > On 8/9/2020 8:03 PM, Jairo A. del Rio wrote: > > Oh, thank you a lot, Hans, that's a really cleaner way than mine. One > > more question, is

Re: [NTG-context] How to properly pass TeX/Lua data to MetaPost/MetaFun?

2020-08-09 Thread Hans Hagen
On 8/9/2020 8:03 PM, Jairo A. del Rio wrote: Oh, thank you a lot, Hans, that's a really cleaner way than mine. One more question, is there something similar to EmWidth for \textwidth or \linewidth? Better, a better way to access TeX dimensions? Thank you again. When you grep for EmWidth ...

Re: [NTG-context] How to properly pass TeX/Lua data to MetaPost/MetaFun?

2020-08-09 Thread Jairo A. del Rio
...@xs4all.nl) escribió: > On 8/9/2020 5:39 PM, Jairo A. del Rio wrote: > > Hi, list! I'm doing the following to scale squares and other stuff in > > MetaPost/MetaFun. Although the following kinda works (maybe I'm just > > lucky with this), I want to know how to do a better piece from

Re: [NTG-context] How to properly pass TeX/Lua data to MetaPost/MetaFun?

2020-08-09 Thread Hans Hagen
On 8/9/2020 5:39 PM, Jairo A. del Rio wrote: Hi, list! I'm doing the following to scale squares and other stuff in MetaPost/MetaFun. Although the following kinda works (maybe I'm just lucky with this), I want to know how to do a better piece from it. I'm concerned with passing data from Lua

[NTG-context] How to properly pass TeX/Lua data to MetaPost/MetaFun?

2020-08-09 Thread Jairo A. del Rio
Hi, list! I'm doing the following to scale squares and other stuff in MetaPost/MetaFun. Although the following kinda works (maybe I'm just lucky with this), I want to know how to do a better piece from it. I'm concerned with passing data from Lua and TeX to Metapost and better ways to do

[NTG-context] Is there a bug in lmt_shade[...=...,...=...]

2020-07-29 Thread Keith McKay
] ; StopPage; \stopMPpage \stoptext The console output gives this: system > system > ConTeXt ver: 2020.07.29 14:08 LMTX fmt: 2020.7.29 int: english/english system > metapost > log > metapost > log > loading metafun, including plain.mp version 1.004 for meta

Re: [NTG-context] Fill an area defined by a subpath (Metafun)

2020-07-23 Thread Fabrice Couvreur
Hello Taco Thank you so much ; I did not know the reverse operator. Fabrice Le jeu. 23 juil. 2020 à 11:56, Taco Hoekwater a écrit : > > > > On 23 Jul 2020, at 11:48, Fabrice Couvreur > wrote: > > > > Hello, > > I have a little problem with coloring an area (path b). > > Thanks for your help. >

Re: [NTG-context] Fill an area defined by a subpath (Metafun)

2020-07-23 Thread Taco Hoekwater
> On 23 Jul 2020, at 11:48, Fabrice Couvreur > wrote: > > Hello, > I have a little problem with coloring an area (path b). > Thanks for your help. > Fabrice > > \starttext > \startMPcode > > path circle, p, q, b; > > circle = fullcircle xscaled 6cm yscaled 3.5cm; > p = (point 2 of

[NTG-context] Fill an area defined by a subpath (Metafun)

2020-07-23 Thread Fabrice Couvreur
Hello, I have a little problem with coloring an area (path b). Thanks for your help. Fabrice \starttext \startMPcode path circle, p, q, b; circle = fullcircle xscaled 6cm yscaled 3.5cm; p = (point 2 of circle .. (-0.15cm,1.5cm) ..(0,0)..(0.15cm,-1.5cm).. point 6 of circle); q = (subpath(0,2)

Re: [NTG-context] Code lua in a table

2020-07-20 Thread Jeong Dal
Dear Hans, Thank you for new methods! It would take some time for me to understand them fully. Learning Lua, metafun, lmtx, wiki is always a challenge for me. I also wonder where is the boundary of ConTeXt. I hope that you and all members in this list are well from COVID-19. Thank you again

Re: [NTG-context] Code lua in a table

2020-07-20 Thread Fabrice Couvreur
_ncr_x() > mp.print(ncr(mp.scan.pair())) > end > > and then use: > > tt := runscript("MP.pascal_ncr_x()") (n,r) ; > > Of course one can decide to pick to two numerics instead, like > > tt := runscript("MP.pascal_ncr_x()&

Re: [NTG-context] Code lua in a table

2020-07-20 Thread Jeong Dal
ode for Pascal’s triangle in two different ways using Lua, Metafun and ConTeXt. You may enhance the code. \startbuffer[pt1] numeric n,r,s,u,dx,dy,tt; u := 1.8cm; path p, q; pair A,B,start,now; A := dir(210)*u; B := dir(-30)*u; dy := sind(30)*u; dx := 2*cosd(30)*u; for n=0 upto 4: start := n*dir(210

Re: [NTG-context] Code lua in a table

2020-07-20 Thread Hans Hagen
r) ; However, we still have the rather verbose runscript here, so we go further, we register pascal as script: \startluacode metapost.registerscript("pascal_ncr",MP.pascal_ncr_x) \stopluacode And then define an alias at the metafun end: \startMPextensions newinternal mp_pascal_n

Re: [NTG-context] error running wiki example with labels

2020-06-26 Thread Jan-Erik Hägglöf
ame '/Users/janneman/context-osx-64/tex/texmf-context/tex/context/base/mkiv/meta-imp-dum.mkiv' metapost> library 'dum' is loaded metapost > initializing instance 'metafun:1' using format 'metafun' and method 'default' metapost> loading 'metafun' as '/Users/janne

[NTG-context] error running wiki example with labels

2020-06-24 Thread Jan-Erik Hägglöf
source > level 3, order 6, name '/Users/janneman/context-osx-64/tex/texmf-context/tex/context/base/mkiv/meta-imp-dum.mkiv' close source> level 3, order 6, name '/Users/janneman/context-osx-64/tex/texmf-context/tex/context/base/mkiv/meta-imp-dum.mkiv' metapost> library '

Re: [NTG-context] How to define an array of colors in Metafun

2020-06-20 Thread Hans Hagen
On 6/20/2020 4:48 PM, Otared Kavian wrote: Hi all, I have a family of graphs to draw in Metapost and I would like to attribute a different color to each of them according to the value of a certain variable. Assuming that the path mygraph(j) depends on the variable j, which is computed within

[NTG-context] How to define an array of colors in Metafun

2020-06-20 Thread Otared Kavian
Hi all, I have a family of graphs to draw in Metapost and I would like to attribute a different color to each of them according to the value of a certain variable. Assuming that the path mygraph(j) depends on the variable j, which is computed within a lua code and passed to Metapost, I wonder

[NTG-context] Asymptote and lmtx

2020-06-13 Thread Otared Kavian
Hi all, Recently I have been using (in a very elementary way) Metafun in order to visualize a small set of data in 2 dimensions, as a scattered set of labeled dots, and I wanted to do the same in 3 dimensions. Indeed one can write an analogous Metafun code for 3d, but I thought using Asymptote

[NTG-context] Two questions concerning numerals in ConTeXt

2020-06-01 Thread Jairo A. del Rio
umber(n)//5))..string.rep(one, (tonumber(n)%5)) end \stopluacode \def\tallymarks#1{\ctxlua{userdata.tallymarks("#1")}} \starttext \tallyfont \tallymarks{47} \stoptext This works on Lua 5.4.0 (rc4) interpreter, but it doen't on ConTeXt LMTX nor LuaTeX and codes are printed instead (1D3781D

Re: [NTG-context] Is it possible to have a rotated label in Metafun?

2020-05-25 Thread Hans Hagen
On 5/24/2020 10:41 AM, Otared Kavian wrote: Hi all, In a graph which I am trying to draw with LuaMetafun, I have a variable the values of which I want to show on the graph rotated 90 degrees (or whatever other value). Is it possible to do that? An example is: numeric a, u ; u :=

[NTG-context] Is it possible to have a rotated label in Metafun?

2020-05-24 Thread Otared Kavian
Hi all, In a graph which I am trying to draw with LuaMetafun, I have a variable the values of which I want to show on the graph rotated 90 degrees (or whatever other value). Is it possible to do that? An example is: numeric a, u ; u := 10mm ; a := 4.5 ; label.bot(a,

[NTG-context] metapost boxes error

2020-05-20 Thread jk...@inradius.net
int: english/english metapost log> loading metafun, including plain.mp version 1.004 for metafun iv and xl metapost log> metapost log> >> _dojoin metapost log> ! Isolated expression. __

[NTG-context] Looking for a way to use lua to output console/debug messages from MetaPost instead of 'show'

2020-05-18 Thread Gerben Wierda
it out as number and let ‘show' make a lot of lines out of it). I would like to instead use a lua function and I think I recall having seen somewhere the use of a call like lua( ….) or lua.foo.bar() in a MetaPost/MetaFun/LMTX example but I cannot find it anymore. Is it possible to do a lua

Re: [NTG-context] Building a page based on exact location of graphical elements (PDF)

2020-05-17 Thread Wolfgang Schuster
a good explanation/introduction into layers (which I think ConTeXtgarden says I should use) but haven’t found one. I recommend the following manuals:   - details.pdf   - metafun-p.pdf Wolfgang ___ If your question

Re: [NTG-context] Arithmetic Overflow error in MetaFun

2020-05-17 Thread Keith McKay
Thanks for your help Hans and the pointer to the extended math library. Lots more to explore now. Best Wishes Keith On Sat, 16 May 2020, 20:46 Hans Hagen, wrote: > On 5/16/2020 4:48 PM, Keith McKay wrote: > > Answering my own problem here. > > > > I've just searched through the mailing list

Re: [NTG-context] Arithmetic Overflow error in MetaFun

2020-05-16 Thread Hans Hagen
On 5/16/2020 4:48 PM, Keith McKay wrote: Answering my own problem here. I've just searched through the mailing list archives and it seems that if I add [instance=doublefun] I do not get the Arithmetic Overflow error. Joy! fwiw, we have also instance=decimalfun concerning arithmic: in

[NTG-context] \goto not working from within \textext()

2020-05-16 Thread Gerben Wierda
This does give me ythe look of a link, but not a working link. Outside of textext() it works. Is there a way to get a working link in a MetaFun picture? Thx, G \setupinteraction [state=start, color=blue, style=bold] \starttext \goto{works}[url(https://ea.rna.nl/2011/06/05

Re: [NTG-context] Arithmetic Overflow error in MetaFun

2020-05-16 Thread Hans Hagen
in the Metafun and Metafont manuals but nothing jumps out at me. In the minimum working example below, this Arithmetic Overflow occurs when xord =13.5 but I can get the calculation to work if I separate out the equation and then add together, since it seems to be failing on the pow(xord,4

Re: [NTG-context] Arithmetic Overflow error in MetaFun

2020-05-16 Thread Keith McKay
with an Arithmetic Overflow error when calculating the x and y values for functions of the form: y = ax^4 + bx^3 + cx^2 + dx + e to which I then add a bit of randomness and other embellishments. I have had a look in the Metafun and Metafont manuals but nothing jumps out at me. In the minimum

[NTG-context] Arithmetic Overflow error in MetaFun

2020-05-16 Thread Keith McKay
Colleagues I'm having problems with an Arithmetic Overflow error when calculating the x and y values for functions of the form: y = ax^4 + bx^3 + cx^2 + dx + e to which I then add a bit of randomness and other embellishments. I have had a look in the Metafun and Metafont manuals but nothing

Re: [NTG-context] Retrieving original value of enviroment variable HOME

2020-05-10 Thread context
nment.oldhome or "??") \stopluacode \stoptext ChkEnv.pdf Description: Adobe PDF document -- generator : luat-sta.lua -- state tag : whatever return { ["context"]={ ["version"]="beta", }, ["engines"]={ ["luatex"]=true, [&quo

Re: [NTG-context] error during the installation of luametatex

2020-05-09 Thread Hans Hagen
On 5/9/2020 6:26 PM, Giulio Bertellini wrote: >> >>>> sh-3.2# context metafun Ha, I admit that I never tried that yet with lmtx. (The reason is that I then have to enter updating mode for all these new features. More something for end-of-the-year dark evenings with a

Re: [NTG-context] error during the installation of luametatex

2020-05-09 Thread Rik Kabel
installed Context LMTX and tested the download by compiling the Metafun manual sources as indicated below: >>>> sh-3.2# context metafun resolvers | formats | executing runner 'run luametatex format': /System/Volumes/Data/opt/data/context/tex/texmf-osx-64/bin/luametatex --jobn

Re: [NTG-context] error during the installation of luametatex

2020-05-09 Thread Giulio Bertellini
by compiling the Metafun manual sources as indicated below: >>>> sh-3.2# context metafun resolvers | formats | executing runner 'run luametatex format': /System/Volumes/Data/opt/data/context/tex/texmf-osx-64/bin/luametatex --jobname="metafun" --fmt=/System/Volumes/Dat

[NTG-context] Is this a MetaFun bug or intended behaviour?

2020-04-30 Thread Gerben Wierda
I wanted to use the macro simplified to remove duplicate points from a path, but it removes more than that: metapost log> (127,-107)..controls (117,-107) and (107,-107) metapost log> ..(97,-107)..controls (97,-130.34) and (97,-153.66) metapost log>

Re: [NTG-context] Using \startuseMPgraphic inside a textext() in METAPOST?

2020-04-27 Thread Hans Hagen
On 4/27/2020 10:47 AM, Gerben Wierda wrote: I am in METAPOST which is inside TeX and I’d like (in METAPOST, not in TeX) to let a string follow a path. Adapting from the MetaFun manual around page 250, I tried this: \starttext \startMPpage[instance=doublefun] pic p; p := textext

[NTG-context] Using \startuseMPgraphic inside a textext() in METAPOST?

2020-04-27 Thread Gerben Wierda
I am in METAPOST which is inside TeX and I’d like (in METAPOST, not in TeX) to let a string follow a path. Adapting from the MetaFun manual around page 250, I tried this: \starttext \startMPpage[instance=doublefun] pic p; p := textext("\startuseMPgraphic[instance=doublefun]{followtokens

[NTG-context] Text size with lmt_text [ ]

2020-04-22 Thread Fabrice Couvreur
Hi, As an extension of this discussion https://mail.google.com/mail/u/0/#inbox/QgrcJHsNlRfcqCPHBTrnSFbJKjGPwjbJnLL?compose=CllgCJZWxJlpNNfzrPpFwWRqsFfdXqmnxkCwWVjvXKQJBwQmBfZGvchjMbsJDKXLtKldJtpWVqq (thanks to Wolfgang), I used the MetaFun interface with lmt_text [] ; I managed to pass the text

Re: [NTG-context] METAPOST: How do I get this 'max' cutafter to work?

2020-04-21 Thread Gerben Wierda
a else: cuttings:= subpath (0,t) of a; subpath (t,length a) of a fi endgroup enddef; tertiarydef a cutafter b = reverse (reverse a cutbefore b) hide(cuttings:=reverse cuttings) enddef; secondarydef p intersectionpoint q = begingroup save x_,y_; (x_,y_)=p intersectiontimes q; if x_<0:

Re: [NTG-context] Unexpected result when using PaperHeight and MetaFUun

2020-04-19 Thread Keith McKay
Thank you Wolfgang! I thought it must be simple! And if I had stayed the course and got to the end of the MetaFun manual I would have found it. Thanks for your help. Keith On 19/04/2020 13:04, Wolfgang Schuster wrote: Keith McKay schrieb am 19.04.2020 um 13:15: Dear All I have problem

Re: [NTG-context] Unexpected result when using PaperHeight and MetaFUun

2020-04-19 Thread Wolfgang Schuster
Keith McKay schrieb am 19.04.2020 um 13:15: Dear All I have problem understanding what is happening in the MWE below which is different from what I expected. I have created a shaded background using MetaFun with dimensions PaperWidth by PaperHeight which mimics \setuppapersize[A4,landscape

[NTG-context] Unexpected result when using PaperHeight and MetaFUun

2020-04-19 Thread Keith McKay
Dear All I have problem understanding what is happening in the MWE below which is different from what I expected. I have created a shaded background using MetaFun with dimensions PaperWidth by PaperHeight which mimics \setuppapersize[A4,landscape} as expected.  I then within \starttext

Re: [NTG-context] Fwd: Adding optional enumeration text to framed enumeration header

2020-04-19 Thread Aditya Mahajan
On Sun, 19 Apr 2020, Jairo A. del Rio wrote: I've seen the following solution in Stack Exchange to add referenceable enumeration labels to a framed enumeration environment: https://tex.stackexchange.com/questions/438588/context-and-metafun-framed-enumeration-with-counter-as-part-of-overlay

[NTG-context] Fwd: Adding optional enumeration text to framed enumeration header

2020-04-18 Thread Jairo A. del Rio
labels to a framed enumeration environment: https://tex.stackexchange.com/questions/438588/context-and-metafun-framed-enumeration-with-counter-as-part-of-overlay It uses \wrappedcurrentconstruction. However, it only prints the counter label and the counter name. What if I need the text enclosed

[NTG-context] (no subject)

2020-04-18 Thread Jairo A. del Rio
I've seen the following solution in Stack Exchange to add referenceable enumeration labels to a framed enumeration environment: https://tex.stackexchange.com/questions/438588/context-and-metafun-framed-enumeration-with-counter-as-part-of-overlay It uses \wrappedcurrentconstruction. However

Re: [NTG-context] running lua in metafun and in ConTeXt

2020-04-12 Thread Jeong Dal
ing math in mp, in lmtx (which has some extra metafun > features) we have some more math functions available: > > m_acos m_acosh m_asin m_asinh m_atan m_atantwo m_atanh m_cbrt m_ceil > m_copysign > m_cos m_cosh m_deg m_erf m_erfc m_exp m_exptwo m_expm m_fabs m_fdim m_floor

Re: [NTG-context] running lua in metafun and in ConTeXt

2020-04-12 Thread Hans Hagen
Hi Dal, Thank you for your nice code. lua.MP.Whatever is something! just keep in mind that lua.MP is the user namespace and lua.mp (lowercase) the system one btw, as you're doing math in mp, in lmtx (which has some extra metafun features) we have some more math functions available

Re: [NTG-context] running lua in metafun and in ConTeXt

2020-04-11 Thread Jeong Dal
Dear Hans, Thank you for your nice code. lua.MP.Whatever is something! Have a nice weekend. Best regards, Dalyoung > 2020. 4. 12. 오전 2:08, Hans Hagen 작성: > > On 4/11/2020 4:15 PM, Jeong Dal wrote: >> Dear all, >> The problem is solved by using the namespace of lua as below: >> I am not sure

Re: [NTG-context] running lua in metafun and in ConTeXt

2020-04-11 Thread Hans Hagen
On 4/11/2020 4:15 PM, Jeong Dal wrote: Dear all, The problem is solved by using the namespace of lua as below: I am not sure what I did is the right way. If it is not the right way, please let me know. Thanks for reading. Best regards, Dalyoung \startluacode P={} combi = P function

[NTG-context] running lua in metafun and in ConTeXt

2020-04-11 Thread Jeong Dal
Dear all, The problem is solved by using the namespace of lua as below: I am not sure what I did is the right way. If it is not the right way, please let me know. Thanks for reading. Best regards, Dalyoung \startluacode P={} combi = P function P.fact (n) if n <= 0 then return 1

Re: [NTG-context] running lua in metafun and in ConTeXt

2020-04-11 Thread Otared Kavian
s code to a ConTeXt file composed product > and components, > and using the second method, i.e. combi(n,r). The first method is still > working well. > The error message is as following: > > metapost log> loading metafun, including plain.mp version 1.004 for > metafun iv a

[NTG-context] running lua in metafun and in ConTeXt

2020-04-11 Thread Jeong Dal
, when I added this code to a ConTeXt file composed product and components, and using the second method, i.e. combi(n,r). The first method is still working well. The error message is as following: metapost log> loading metafun, including plain.mp version 1.004 for metafun iv and xl metapost

Re: [NTG-context] METAPOST/MetaFun withtransparency doesn't accept my pair primary argument, what am I doing wrong?

2020-04-10 Thread Gerben Wierda
As I only use one transparency method anyway I could also fix this by passing a numeric instead of a pair and use the standard withtransparency (I don’t like overriding a standard MetaFun method, one never knows what might break in future updates). vardef Foo( expr w, h, fillColor

Re: [NTG-context] METAPOST/MetaFun withtransparency doesn't accept my pair primary argument, what am I doing wrong?

2020-04-09 Thread Hans Hagen
On 4/9/2020 4:58 PM, Gerben Wierda wrote: \starttext \startMPpage[instance=doublefun] vardef Foo( expr w, h, fillColor, fillTransparency) =   show "FOO:", w, h, fillColor, fillTransparency;   save pic; picture pic;   save circ; path circ;   circ := (fullcircle xyscaled (h,h));   pic :=

[NTG-context] METAPOST/MetaFun withtransparency doesn't accept my pair primary argument, what am I doing wrong?

2020-04-09 Thread Gerben Wierda
I have refactored my code to use withtransparency and separate parameters for colors, sizes, transparency, etc. But I’m running into a problem. The fillTransparency parameter is a pair primary (as can be seen from the show command) Here is a pretty minimum example (in reality there are

Re: [NTG-context] Why does this example from the MetaFun manual not work?

2020-04-09 Thread Henri Menke
my macros, so I > > can pass the colors with transparency using a single parameter. That should > > be possible if I understand the MetaFun manual (where I’ve copy-pasted this > > example from): > > > > \starttext > > \startMPpage[instance=doublefun] >

Re: [NTG-context] Why does this example from the MetaFun manual not work?

2020-04-09 Thread Hans Hagen
en making vardef's one need to omit the final semi colon in order to apply more properties to the 'return value'. At some point I will update the metafun manual which means: remove old methods and exclusively use the new ones (currently the manual also discusses mpii while in context mkiv/lm

Re: [NTG-context] Why does this example from the MetaFun manual not work?

2020-04-09 Thread Taco Hoekwater
Hi, Using multiple (text ) arguments in macros doesn’t work, you would need to convert all but the last argument into (expr ) somehow. That means that you probably cannot do a call like the one below at all. (I, at least, do not see how you could convert one of those transparent colours into

Re: [NTG-context] Why does this example from the MetaFun manual not work?

2020-04-09 Thread Gerben Wierda
my macros, so I >>> can pass the colors with transparency using a single parameter. That should >>> be possible if I understand the MetaFun manual (where I’ve copy-pasted this >>> example from): >>> >>> \starttext >>> \startMPpage[instance=do

Re: [NTG-context] Why does this example from the MetaFun manual not work?

2020-04-09 Thread Taco Hoekwater
an pass the colors with transparency using a single parameter. That should >> be possible if I understand the MetaFun manual (where I’ve copy-pasted this >> example from): >> >> \starttext >> \startMPpage[instance=doublefun] >> >> vardef SampleText (expr t

Re: [NTG-context] Why does this example from the MetaFun manual not work?

2020-04-09 Thread Gerben Wierda
Nobody? > On 8 Apr 2020, at 12:20, Gerben Wierda wrote: > > I would like to use the result of transparent() straight in my macros, so I > can pass the colors with transparency using a single parameter. That should > be possible if I understand the MetaFun manual (where I

[NTG-context] Why does this example from the MetaFun manual not work?

2020-04-08 Thread Gerben Wierda
I would like to use the result of transparent() straight in my macros, so I can pass the colors with transparency using a single parameter. That should be possible if I understand the MetaFun manual (where I’ve copy-pasted this example from): \starttext \startMPpage[instance=doublefun] vardef

Re: [NTG-context] "Remember picture" does not work (again)

2020-04-06 Thread Aditya Mahajan
On Mon, 6 Apr 2020, Jairo A. del Rio wrote: A Metapost alternative would be fine, too. See Chapter 5 of the metafun manual, which describes how anchors and position graphics. Aditya ___ If your question

Re: [NTG-context] What was that 'rounding paths' metafun(?) function again?

2020-04-05 Thread Gerben Wierda
> On 5 Apr 2020, at 15:24, Keith McKay wrote: > > Would sections 1.3, 1.18, 2.5 and 2.6 in the Metafun manual help? I used what is in 1.3 (though I actually used Peter Grogono’s PDF MetaPost: A Reference Manual <https://users.encs.concordia.ca/~grogono/Writings/mpref.pdf>

Re: [NTG-context] What was that 'rounding paths' metafun(?) function again?

2020-04-05 Thread Keith McKay
Would sections 1.3, 1.18, 2.5 and 2.6 in the Metafun manual help? Keith On 05/04/2020 11:31, Gerben Wierda wrote: I think I saw a function in MetaFun somehwre that you could give a ‘hard’ path, i.e. (0,0) -- (0,1) — (1,1) and it would become a path with nicely rounded (part of a circle

Re: [NTG-context] What was that 'rounding paths' metafun(?) function again?

2020-04-05 Thread Gerben Wierda
5.04.2020 um 12:31: >> I think I saw a function in MetaFun somehwre that you could give a ‘hard’ >> path, i.e. (0,0) -- (0,1) — (1,1) and it would become a path with nicely >> rounded (part of a circle) corners (still straight lines), but I can’t find >> it anymore.

Re: [NTG-context] What was that 'rounding paths' metafun(?) function again?

2020-04-05 Thread Wolfgang Schuster
Gerben Wierda schrieb am 05.04.2020 um 12:31: I think I saw a function in MetaFun somehwre that you could give a ‘hard’ path, i.e. (0,0) -- (0,1) — (1,1) and it would become a path with nicely rounded (part of a circle) corners (still straight lines), but I can’t find it anymore. I wrote my

[NTG-context] What was that 'rounding paths' metafun(?) function again?

2020-04-05 Thread Gerben Wierda
I think I saw a function in MetaFun somehwre that you could give a ‘hard’ path, i.e. (0,0) -- (0,1) — (1,1) and it would become a path with nicely rounded (part of a circle) corners (still straight lines), but I can’t find it anymore. I wrote my own, but it is giving me headaches so I’d like

Re: [NTG-context] Compile a file embedding modules with the lmtx engine

2020-04-03 Thread Fabrice Couvreur
scripts source tex VERSION [viserion@archlinux texmf-modules]$ Fabrice Le ven. 3 avr. 2020 à 13:10, Pablo Rodriguez a écrit : > On 4/3/20 12:38 PM, Fabrice Couvreur wrote: > > Hi, > > I'm sorry but I didn't necessarily follow all the threads. I use to make > > my graphic

Re: [NTG-context] Compile a file embedding modules with the lmtx engine

2020-04-03 Thread Pablo Rodriguez
On 4/3/20 12:38 PM, Fabrice Couvreur wrote: > Hi, > I'm sorry but I didn't necessarily follow all the threads. I use to make > my graphics Metapost or Metafun, but I also sometimes use TiKz. This > file compiles with context but not with lmtx because the modules are not > recognize

Re: [NTG-context] Compile a file embedding modules with the lmtx engine

2020-04-03 Thread Hans Hagen
On 4/3/2020 12:38 PM, Fabrice Couvreur wrote: Hi, I'm sorry but I didn't necessarily follow all the threads. I use to make my graphics Metapost or Metafun, but I also sometimes use TiKz. This file compiles with context but not with lmtx because the modules are not recognized. I am willing

[NTG-context] Compile a file embedding modules with the lmtx engine

2020-04-03 Thread Fabrice Couvreur
Hi, I'm sorry but I didn't necessarily follow all the threads. I use to make my graphics Metapost or Metafun, but I also sometimes use TiKz. This file compiles with context but not with lmtx because the modules are not recognized. I am willing to use only lmtx which seems to be the future

Re: [NTG-context] How do I handle strings with " characters in it in METAPOST?

2020-03-29 Thread Gerben Wierda
Wolfgang Schuster >>>>> >>>> <mailto:wolfgang.schuster.li...@gmail.com>> wrote: >>>>> >>>>> Gerben Wierda schrieb am 29.03.2020 um 12:52: >>>>>> I am using MetaFun (Lua code) to create METAPOST commands from a

[NTG-context] What alternative for scantokens( "btex " & texcommands & " etex")?

2020-03-29 Thread Gerben Wierda
I’m trying in METAPOST to build a command to pass on to ConTeXt using btex/etex. picture p; p := scantokens( "btex " & texcommands & " etex”); with texcommands a variable that holds a string of TeX commands doesn’t work. The METAPOST parser complains about not finding e

Re: [NTG-context] How do I handle strings with " characters in it in METAPOST?

2020-03-29 Thread Wolfgang Schuster
t; wrote: Gerben Wierda schrieb am 29.03.2020 um 12:52: I am using MetaFun (Lua code) to create METAPOST commands from an XML file. One of the issues I am running into that in METAPOST I have to handle strings with " characters in them and METAPOST doesn’t like those. The argument using th

Re: [NTG-context] How do I handle strings with " characters in it in METAPOST?

2020-03-29 Thread Gerben Wierda
> On 29 Mar 2020, at 14:35, Wolfgang Schuster > wrote: > > Gerben Wierda schrieb am 29.03.2020 um 14:30: >>> On 29 Mar 2020, at 12:58, Wolfgang Schuster >>> wrote: >>> >>> Gerben Wierda schrieb am 29.03.2020 um 12:52: >>>> I

Re: [NTG-context] How do I handle strings with " characters in it in METAPOST?

2020-03-29 Thread Gerben Wierda
> On 29 Mar 2020, at 12:58, Wolfgang Schuster > wrote: > > Gerben Wierda schrieb am 29.03.2020 um 12:52: >> I am using MetaFun (Lua code) to create METAPOST commands from an XML file. >> One of the issues I am running into that in METAPOST I have to handle >

Re: [NTG-context] How do I handle strings with " characters in it in METAPOST?

2020-03-29 Thread Wolfgang Schuster
Gerben Wierda schrieb am 29.03.2020 um 14:30: On 29 Mar 2020, at 12:58, Wolfgang Schuster wrote: Gerben Wierda schrieb am 29.03.2020 um 12:52: I am using MetaFun (Lua code) to create METAPOST commands from an XML file. One of the issues I am running into that in METAPOST I have to handle

[NTG-context] How do I handle strings with " characters in it in METAPOST?

2020-03-29 Thread Gerben Wierda
I am using MetaFun (Lua code) to create METAPOST commands from an XML file. One of the issues I am running into that in METAPOST I have to handle strings with " characters in them and METAPOST doesn’t like those. The argument using the string Foo "Bar” Foo turns into someCall( &quo

Re: [NTG-context] How do I handle strings with " characters in it in METAPOST?

2020-03-29 Thread Wolfgang Schuster
Gerben Wierda schrieb am 29.03.2020 um 12:52: I am using MetaFun (Lua code) to create METAPOST commands from an XML file. One of the issues I am running into that in METAPOST I have to handle strings with " characters in them and METAPOST doesn’t like those. The argument using the string

Re: [NTG-context] I could use some ideas for a strategy to get these kind of labels in a METAPOST picture

2020-03-28 Thread Gerben Wierda
I want to turn into labels for objects > in a METAPOST picture (using MetaFun). These strings can have arbitrary > characters (like accents) and some characters are coded. Examples of how > these are coded: > > My "Application” Fünction > > [My] Application

[NTG-context] I could use some ideas for a strategy to get these kind of labels in a METAPOST picture

2020-03-27 Thread Gerben Wierda
I have strings I get from an XML that I want to turn into labels for objects in a METAPOST picture (using MetaFun). These strings can have arbitrary characters (like accents) and some characters are coded. Examples of how these are coded: My "Application” Fünction

Re: [NTG-context] Issue with rendering arrows in lmtx

2020-03-17 Thread Jan-Erik Hägglöf
Ok, thanks for your advice. It seems that it is better to do framework in MetaFun and use svg picture as a component instead of opposite. Best wishes to you all Janne > 17 mars 2020 kl. 16:58 skrev Taco Hoekwater : > > > >> On 17 Mar 2020, at 15:51, Jan-Erik Hägglöf &

Re: [NTG-context] Including a separate .mp file

2020-03-15 Thread Pablo Rodriguez
On 3/15/20 4:48 PM, Gerben Wierda wrote: > I’d like to load a separate file with definitions. Something that contains > > % file: my definitions.mp > \startMPdefinitions > … my definitions ... > \stopMPdefinitions Hi Gerben, I never use MetaFun, but a simple \input{definitions.

Re: [NTG-context] Up-to-date documentation / tutorials. Where?

2020-02-29 Thread Wolfgang Schuster
-mkiv.pdf luametafun.pdf luametatex.pdf luatex.pdf ma-cb-en.pdf math-mkiv.pdf metafun-p.pdf metafun-s.pdf mk.pdf mkiv-publications.pdf mmlexamp.pdf mmlprime.pdf mreadme.pdf musings.pdf nodes.pdf notnow.pdf onandon.pdf pagecolumns.pdf rules-mkiv.pdf spacing-mkiv.pdf spreadsheets-mkiv.pdf sql-mkiv.pdf

Re: [NTG-context] Shading

2020-02-26 Thread Fabrice Couvreur
ikzpicture \shade[ball color=red] (0,0) ellipse (0.5cm and 0.44cm); \stoptikzpicture \stoptext Le mar. 25 févr. 2020 à 17:18, Wolfgang Schuster < wolfgang.schuster.li...@gmail.com> a écrit : > On Tue, 25 Feb 2020 12:34:00 +0100 > Fabrice Couvreur wrote: > > > Hi, > >

Re: [NTG-context] Error in MetaFun LMTX

2020-02-25 Thread Marcus Vinicius Mesquita
e 'scaled' > metapost log> > metapost log> loading metafun, including plain.mp version 1.004 for > metafun iv and xl > metapost log> > metapost log> >> unknown path D > metapost log> ! Isolated expression. > metapost lo

Re: [NTG-context] Error in MetaFun LMTX

2020-02-25 Thread Hans Hagen
On 2/25/2020 6:34 PM, Jan-Erik Hägglöf wrote: The following code gives an error, my goal is to draw 4 different arrows but only three functions successfully. The error log shows metapost        > initializing number mode 'scaled' metapost log    > metapost log    > loading metafun,

Re: [NTG-context] Error in MetaFun LMTX

2020-02-25 Thread Jan-Erik Hägglöf
successfully. > > The error log shows > > metapost> initializing number mode 'scaled' > metapost log> > metapost log> loading metafun, including plain.mp version 1.004 for > metafun iv and xl > metapost log> > metapost log> >&

[NTG-context] Error in MetaFun LMTX

2020-02-25 Thread Jan-Erik Hägglöf
The following code gives an error, my goal is to draw 4 different arrows but only three functions successfully. The error log shows metapost> initializing number mode 'scaled' metapost log> metapost log> loading metafun, including plain.mp version 1.004 for metafun

Re: [NTG-context] Shading

2020-02-25 Thread Wolfgang Schuster
On Tue, 25 Feb 2020 12:34:00 +0100 Fabrice Couvreur wrote: > Hi, > In the Metafun documentation on page 410, there is a shaded bullet "fill > fullcircle shaded cshade". > I tried to reproduce the same effect, but it is not exactly the same result. It's different because yo

[NTG-context] Shading

2020-02-25 Thread Fabrice Couvreur
Hi, In the Metafun documentation on page 410, there is a shaded bullet "fill fullcircle shaded cshade". I tried to reproduce the same effect, but it is not exactly the same result. Thank you. Fabrice \starttext \startMPcode fill fullcircle scaled 4cm shaded withshademethod

Re: [NTG-context] Metapost and TikZ color code equivalent

2020-02-15 Thread Fabrice Couvreur
en. 14 févr. 2020 à 16:43, Fabrice L a > écrit : > >> Hi, >> >> Le 13 févr. 2020 à 16:45, Fabrice Couvreur >> a écrit : >> >> >> How to have the color defined by {yellow!60!black} with Metapost

Re: [NTG-context] Metapost and TikZ color code equivalent

2020-02-14 Thread Fabrice Couvreur
it : > Hi, > > Le 13 févr. 2020 à 16:45, Fabrice Couvreur > a écrit : > > > How to have the color defined by {yellow!60!black} with Metapost ? > > > color MyColor ; MyColor := .6[yellow,black] ; > > See metafun manual, section 1.13. >

Re: [NTG-context] Label in externalfigures

2020-02-14 Thread Jan-Erik Hägglöf
Now finally after consulting the luametafun and the MetaFun manual I’ve found what I was looking for:The code:\startMPcode picture p; p := lmt_svg [ filename = "steguppgift.svg", width = 400 ] ;draw p;path linje ; linje := (15,-330) -- (280,-90); % adding a missing line in the .svg fil

<    1   2   3   4   5   6   7   8   9   10   >