Re: [NTG-context] embed metapost figure into document

2020-11-09 Thread Jairo A. del Rio
t helps. Jairo :) El lun., 9 de nov. de 2020 a la(s) 16:59, Sylvain Hubert ( champign...@gmail.com) escribió: > Dear List, > > I'm trying to embed a metapost image into the document. According the MetaFun > manual <http://www.pragma-ade.com/general/manuals/meta

[NTG-context] embed metapost figure into document

2020-11-09 Thread Sylvain Hubert
Dear List, I'm trying to embed a metapost image into the document. According the MetaFun manual <http://www.pragma-ade.com/general/manuals/metafun-p.pdf>, "embedding such a graphic is done by: \externalfigure[graphic.123][width=4cm]", but the following example p

Re: [NTG-context] About filling paths, unfill, etc.

2020-11-03 Thread Jairo A. del Rio
Oh, cool. I've found some info in the Metafun manual too. I should read more carefully next time. Thank you very much! Jairo :) El mar., 3 de nov. de 2020 a la(s) 07:29, Hans Hagen (j.ha...@xs4all.nl) escribió: > On 11/3/2020 12:59 PM, Jairo A. del Rio wrote: > > Hi everyone. I w

Re: [NTG-context] About filling paths, unfill, etc.

2020-11-03 Thread Hans Hagen
On 11/3/2020 12:59 PM, Jairo A. del Rio wrote: Hi everyone. I want to know if nowadays (2020) Metafun is able to do an actual unfill, like above: https://tex.stackexchange.com/questions/151068/how-can-i-fill-a-complex-path-with-metapost-metafun/218718#218718 Example of what I want to do

[NTG-context] About filling paths, unfill, etc.

2020-11-03 Thread Jairo A. del Rio
Hi everyone. I want to know if nowadays (2020) Metafun is able to do an actual unfill, like above: https://tex.stackexchange.com/questions/151068/how-can-i-fill-a-complex-path-with-metapost-metafun/218718#218718 Example of what I want to do: \startMPpage path A, B, C; A := unitcircle shifted

Re: [NTG-context] Changing the colors of Charts in luametafun

2020-10-19 Thread Jan U. Hasecke
On 18.10.20 22:59, Henning Hraban Ramm wrote: > Hi juh, > >> Am 16.10.2020 um 15:34 schrieb Jan U. Hasecke : >> >> as I'll need to make some business charts in the near future I had a >> look into metafun xl. > > you might like the new charts module by

Re: [NTG-context] Changing the colors of Charts in luametafun

2020-10-18 Thread Henning Hraban Ramm
Hi juh, > Am 16.10.2020 um 15:34 schrieb Jan U. Hasecke : > > as I'll need to make some business charts in the near future I had a > look into metafun xl. you might like the new charts module by Tamara Kocurová & Adriana Kašparová. Download: https://akela.mendelu.cz/~tha

Re: [NTG-context] Changing the colors of Charts in luametafun

2020-10-18 Thread Hans Hagen
On 10/16/2020 3:34 PM, Jan U. Hasecke wrote: Hi, as I'll need to make some business charts in the near future I had a look into metafun xl. Here is the first example: \startMPcode draw lmt_chart_circle [ samples = { { 1, 4, 3, 2, 5, 7, 6 } }, percentage = true, trace = true, ] ; \stopM

[NTG-context] Changing the colors of Charts in luametafun

2020-10-16 Thread Jan U. Hasecke
Hi, as I'll need to make some business charts in the near future I had a look into metafun xl. Here is the first example: \startMPcode draw lmt_chart_circle [ samples = { { 1, 4, 3, 2, 5, 7, 6 } }, percentage = true, trace = true, ] ; \stopMPcode How can I change the colors used fo

Re: [NTG-context] Combining modes and MetaFun

2020-09-06 Thread Jan Willem Flamma
Thank you Hans, this is exactly what I need. I will wikify the examples. Kind regards,Jan Willem Flamma  From: Hans HagenSent: Friday, 4 September 2020 15:09To: mailing list for ConTeXt users; Jan Willem FlammaSubject: Re: [NTG-context] Combining modes and MetaFun On 9/4/2020 2:20 PM, Jan Willem

Re: [NTG-context] Combining modes and MetaFun

2020-09-04 Thread Hans Hagen
On 9/4/2020 2:20 PM, Jan Willem Flamma wrote: Dear list members, Is it possible to combine modes and MetaFun? In the below MWE, the \doifmode construction does not work. Kind regards, Jan Willem Flamma === \enablemode[en] %\enablemode[nl] \starttext \startbuffer[square]     u := 2cm

[NTG-context] Combining modes and MetaFun

2020-09-04 Thread Jan Willem Flamma
Dear list members, Is it possible to combine modes and MetaFun? In the below MWE, the \doifmode construction does not work. Kind regards,Jan Willem Flamma ===\enablemode[en]%\enablemode[nl] \starttext \startbuffer[square]    u := 2cm ;    draw unitsquare scaled u ; drawdblarrow (0,-0.2u)..(u

Re: [NTG-context] memoir-style chapter heading

2020-08-18 Thread jbf
of your example), So at least I can get middle and right alignment. \define[2]\MemoirChapter {\midaligned{\startoverlay {#1} {#2} \stopoverlay}} Julian On 17/8/20 4:54 pm, Aditya Mahajan wrote: On Mon, 17 Aug 2020, jbf wrote: Am completely new to using Metafun, which I

Re: [NTG-context] memoir-style chapter heading

2020-08-18 Thread Otared Kavian
> > On 17/8/20 4:54 pm, Aditya Mahajan wrote: >> On Mon, 17 Aug 2020, jbf wrote: >> >>> Am completely new to using Metafun, which I presume I would need to use >>> to achieve a Hansen Memoir-style Chapter heading (chapter title >>> overlayed on a large l

Re: [NTG-context] memoir-style chapter heading

2020-08-17 Thread jbf
/8/20 4:54 pm, Aditya Mahajan wrote: On Mon, 17 Aug 2020, jbf wrote: Am completely new to using Metafun, which I presume I would need to use to achieve a Hansen Memoir-style Chapter heading (chapter title overlayed on a large lightgray number). Of course, I am assuming I would need to use Metafun

Re: [NTG-context] memoir-style chapter heading

2020-08-17 Thread jbf
an wrote: On Mon, 17 Aug 2020, jbf wrote: Am completely new to using Metafun, which I presume I would need to use to achieve a Hansen Memoir-style Chapter heading (chapter title overlayed on a large lightgray number). Of course, I am assuming I would need to use Metafun to create this... So my

Re: [NTG-context] memoir-style chapter heading

2020-08-16 Thread Aditya Mahajan
On Mon, 17 Aug 2020, jbf wrote: > Am completely new to using Metafun, which I presume I would need to use > to achieve a Hansen Memoir-style Chapter heading (chapter title > overlayed on a large lightgray number). Of course, I am assuming I would > need to use Metafun to create thi

[NTG-context] memoir-style chapter heading

2020-08-16 Thread jbf
Am completely new to using Metafun, which I presume I would need to use to achieve a Hansen Memoir-style Chapter heading (chapter title overlayed on a large lightgray number). Of course, I am assuming I would need to use Metafun to create this... So my first question is to ask if I could

Re: [NTG-context] A dumb question about MetaFun

2020-08-16 Thread Jairo A. del Rio
t; Try > > > > draw unitsquare scaled 1cm shifted (xcm, ycm); > > > > Page 11 of the manual metafun-p.pdf is your friend here. My recent > conversation with Taco on this list will be usefull as well. > > Also: > > \starttext > \startMPpage > % puts the

Re: [NTG-context] A dumb question about MetaFun

2020-08-16 Thread Taco Hoekwater
> On 16 Aug 2020, at 21:09, Keith McKay wrote: > > Jairo > > Try > > draw unitsquare scaled 1cm shifted (xcm, ycm); > > Page 11 of the manual metafun-p.pdf is your friend here. My recent > conversation with Taco on this list will be usefull as well. Also:

Re: [NTG-context] A dumb question about MetaFun

2020-08-16 Thread Keith McKay
Jairo Try draw unitsquare scaled 1cm shifted (xcm, ycm); Page 11 of the manual metafun-p.pdf is your friend here. My recent conversation with Taco on this list will be usefull as well. Best Wishes Keith On 16/08/2020 18:06, Jairo A. del Rio wrote: Hi list! A simple question: is there an

[NTG-context] A dumb question about MetaFun

2020-08-16 Thread Jairo A. del Rio
Hi list! A simple question: is there an equivalent of thetextext for a normal picture (an "image(draw ... ;)")? I want to move the center of a picture to an specific point, like this: \startMPpage draw thetextext("\tttf hello", origin) ; draw unitsquare scaled 1cm; \stopMPpage The "hello" is ce

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

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

2020-08-14 Thread Mojca Miklavec
;backend engine". 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 __

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): > &

[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 sou

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 t

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

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

2020-08-09 Thread Jairo A. del Rio
(j.ha...@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 bet

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 passin

[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 w

[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 cir

[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) o

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
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
/context-osx-64/tex/texmf-context/tex/context/base/mkiv/meta-imp-dum.mkiv' close source> level 3, order 5, name '/Users/janneman/context-osx-64/tex/texmf-context/tex/context/base/mkiv/meta-imp-dum.mkiv' metapost> library 'dum' is loaded metapost

[NTG-context] error running wiki example with labels

2020-06-24 Thread Jan-Erik Hägglöf
unknown font 'IBMPlexSans-regular', loading aborted fonts > defining > unable to define 'IBMPlexSans-regular' as 'ibmplex-11pt-ss-tf-0--0' open source > level 3, order 6, name '/Users/janneman/context-osx-64/tex/texmf-context/tex/context/

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 a

[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 if

[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
five, (tonumber(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 i

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 := 10mm

[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, (10

[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

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

2020-05-17 Thread Wolfgang Schuster
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 is of

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 arch

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 metapo

[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/on

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

2020-05-16 Thread Hans Hagen
ok 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(x

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

2020-05-16 Thread Keith McKay
g 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 jumps out at me. In t

[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 no

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

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

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/luametat

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

2020-05-09 Thread Giulio Bertellini
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/V

[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> ..(97,-17

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-18 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-overla

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

2020-04-18 Thread Jairo A. del Rio
ation 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 enclos

[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. Howeve

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

2020-04-12 Thread Jeong Dal
re doing 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_fl

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 avai

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 P.fact

[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 else

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 := imag

[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 multiple

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

2020-04-09 Thread Henri Menke
raight 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=double

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

2020-04-09 Thread Hans Hagen
tion); also, when 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

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 an

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’ve c

[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 is of

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

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 to

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

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 >

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

[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

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

2020-03-29 Thread Gerben Wierda
2:58, 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 f

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