[NTG-context] metapost graph and ConTeXt LMTX

2021-01-03 Thread Jean-Philippe Rey
Dear List, I have used TikZ and pgfplots for a few years and I am considering switching to metapost/metafun which appears more efficient with LMTX. I have already designed several figures with metapost/metafun and some with the help of metaobj and I am fully satisfied with the result. I am

Re: [NTG-context] drop shadows with metapost/ metafun

2021-01-02 Thread Henning Hraban Ramm
> Am 29.12.2020 um 22:56 schrieb Garulfo : > > Which process would you advice to add « drop shadows » to any kind of metafun > / metapost figures like: > picture p; > p := textext("MetaPost is fun!") shifted (10cm,10cm); > > > My current understanding of

Re: [NTG-context] drop shadows with metapost/ metafun

2020-12-31 Thread Aditya Mahajan
On Fri, 1 Jan 2021, Aditya Mahajan wrote: > On Tue, 29 Dec 2020, Garulfo wrote: > > > Which process would you advice to add « drop shadows » to any kind of > > metafun / metapost figures like: > > > Actually, all this seems long and tedious, and contrasts with the

Re: [NTG-context] drop shadows with metapost/ metafun

2020-12-31 Thread Aditya Mahajan
On Tue, 29 Dec 2020, Garulfo wrote: > Which process would you advice to add « drop shadows » to any kind of metafun > / metapost figures like: > picture p; > p := textext("MetaPost is fun!") shifted (10cm,10cm); > > My current understanding of the requir

[NTG-context] drop shadows with metapost/ metafun

2020-12-29 Thread Garulfo
Which process would you advice to add « drop shadows » to any kind of metafun / metapost figures like: picture p; p := textext("MetaPost is fun!") shifted (10cm,10cm); My current understanding of the required steps : 1- fill p with the shadow color 2- write it to an external met

[NTG-context] Metafun: dotlabel issue in latest LMTX

2020-12-27 Thread Otared Kavian
quot;,.5,red) ; mydotlabel(textext("\switchtobodyfont[8pt]" & "B"), point 1 of p) withcolor transparent("exclusion",.5,red) ; \stopMPcode \stoptext %% end squaredot-test.tex I get an error message, which is obscure to me, saying: %-- begin error message

Re: [NTG-context] freedotlabel not defined in LMTX ?

2020-12-26 Thread Hans Hagen
On 12/26/2020 11:28 AM, Otared Kavian wrote: Hi Hans, When I was testing your example with freelabel in another thread, I noticed that freedotlabel does not work in LMTX. Here is the code from the Metafun manual which works with ConTeXt version 2020.06.25 10:55 MKIV, but not with ConTeXt

[NTG-context] freedotlabel not defined in LMTX ?

2020-12-26 Thread Otared Kavian
Hi Hans, When I was testing your example with freelabel in another thread, I noticed that freedotlabel does not work in LMTX. Here is the code from the Metafun manual which works with ConTeXt version 2020.06.25 10:55 MKIV, but not with ConTeXt version 2020.12.24 17:30 LMTX. %% begin

Re: [NTG-context] MetaFun labels and xsized

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

Re: [NTG-context] MetaFun labels and xsized

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

Re: [NTG-context] MetaFun labels and xsized

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

Re: [NTG-context] MetaFun labels and xsized

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

[NTG-context] MetaFun labels and xsized

2020-12-25 Thread Pablo Rodriguez
Dear list, I have this minimal MetaFun sample (the only one in my real document): \setupbodyfont[pagella] \starttext \startMPcode pair a ; a := (1, 1) ; pair b ; b := (1, 10) ; pair c ; c := (10, 10) ; pair d ; d := (10, 1) ; draw (a--b--c--d--a) xsized .75TextWidth; draw

Re: [NTG-context] Check if two paths intersect in Metafun

2020-12-25 Thread Fabrice L
Hi, > Le 25 déc. 2020 à 08:48, Jairo A. del Rio a écrit : > > Hi, list. I've got a question about paths and intersections. The following: > > \starttext > \startMPpage > path p[]; > > p[1] = fullcircle scaled 2cm; > p[2] = unitsquare shifted (4cm,6cm); > > if (known (p[1] intersectionpoint

[NTG-context] Check if two paths intersect in Metafun

2020-12-25 Thread Jairo A. del Rio
Hi, list. I've got a question about paths and intersections. The following: \starttext \startMPpage path p[]; p[1] = fullcircle scaled 2cm; p[2] = unitsquare shifted (4cm,6cm); if (known (p[1] intersectionpoint p[2])): draw textext("yes"); else: draw textext("no"); fi;

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

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

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

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

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

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

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

2020-12-23 Thread Hans Hagen
r) - What would be the work to do in order to make this mechanism directly   usable in metapost / metafun, within \startMPpage \stopMPpage,   - to avoid switching between \start\stopMPdrawing and TeX   - to have something like "draw followtext" in mp-blob.mpiv ? Maybe pic

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

2020-12-23 Thread Otared Kavian
be the work to do in order to make this mechanism directly > usable in metapost / metafun, within \startMPpage \stopMPpage, > - to avoid switching between \start\stopMPdrawing and TeX >

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

2020-12-23 Thread Garulfo
er to make this mechanism directly usable in metapost / metafun, within \startMPpage \stopMPpage, - to avoid switching between \start\stopMPdrawing and TeX - to have something like "draw followtext&q

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

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

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

2020-12-21 Thread Garulfo
Hi, * I try to "remove the paths of text" from a metapost pictures to let the background visible. * Using https://mailman.ntg.nl/pipermail/ntg-context/2018/thread.html#92725 * I was able to get the following with one glyph (MVE code below)

Re: [NTG-context] Problem with shading in Metafun (LMTX)

2020-12-21 Thread Jairo A. del Rio
Nice. It works again. Thank you very much! Cordially, Jairo El lun., 21 de dic. de 2020 2:45 a. m., Hans Hagen escribió: > On 12/21/2020 4:46 AM, Jairo A. del Rio wrote: > > While shading works with MkIV, with LMTX the following breaks: > > > > > > \startMPpage > > > > comment("two shades

Re: [NTG-context] Problem with shading in Metafun (LMTX)

2020-12-20 Thread Hans Hagen
On 12/21/2020 4:46 AM, Jairo A. del Rio wrote: While shading works with MkIV, with LMTX the following breaks: \startMPpage comment("two shades with named colors"); fill fullcircle scaled 5cm withshademethod "circular" withshadecolors ((1,0,0),(0,0,1,0)) ; fill fullcircle scaled 5cm

[NTG-context] Problem with shading in Metafun (LMTX)

2020-12-20 Thread Jairo A. del Rio
quot;circular" withcolor (1,0,0,0) shadedinto "blue" ; \stopMPpage The log says: metafun > log > metafun > log > error: Unknown relation will be considered false metafun > log > metapost > log > metapost > log > metapost > log > : meta

[NTG-context] A link to an example of poster build with ConTeXt

2020-12-19 Thread Garulfo
Hi, it's really fun to play with ConTeXt and MetaPost / Metafun to build posters (color, fonts, alignment, scaling, randomized geometry). Thanks to the ConTeXt team to make it easy. PDF: https://salsa.debian.org/zleap-guest/libreplanet2021/-/raw/master/ConTeXt_version

Re: [NTG-context] LMTX MetaFun SVG trouble, a portion of the SVG is cut of in the PDF

2020-12-18 Thread Hans Hagen
PDF-viewer-specific, I'm using Chromium as the PDF viewer). I tried doing this in two different ways: using includesvgfile with the offset option, and using startMPcode with setbounds in the MetaFun code. In both cases I just get blank space instead of the cut-off content How can I fix this? Relate

Re: [NTG-context] LMTX MetaFun SVG trouble, a portion of the SVG is cut of in the PDF

2020-12-17 Thread Pablo Rodriguez
On 12/17/20 6:45 PM, Pablo Rodriguez wrote: > On 12/17/20 5:08 PM, Neven Sajko wrote: >> On Thu, 17 Dec 2020 at 15:27, Aditya Mahajan wrote: >> [...] >>> Can you check with a desktop pdf viewer as well. >> >> It looks the same with MuPDF. > > Hi Neven, > > it seems to be an issue with the

Re: [NTG-context] LMTX MetaFun SVG trouble, a portion of the SVG is cut of in the PDF

2020-12-17 Thread Pablo Rodriguez
On 12/17/20 5:08 PM, Neven Sajko wrote: > On Thu, 17 Dec 2020 at 15:27, Aditya Mahajan wrote: > [...] >> Can you check with a desktop pdf viewer as well. > > It looks the same with MuPDF. Hi Neven, it seems to be an issue with the conversion of the SVG file. > This is a combined TeX file

Re: [NTG-context] LMTX MetaFun SVG trouble, a portion of the SVG is cut of in the PDF

2020-12-17 Thread Neven Sajko
On Thu, 17 Dec 2020 at 15:27, Aditya Mahajan wrote: > OT but can Gadfly directly produce PDFs? [...] Yes it can. Going to try that route if this doesn't work out. > [..] Depending on how complicated plots you want to generate, you can also > use metapost graph module or pdfplots package for

Re: [NTG-context] LMTX MetaFun SVG trouble, a portion of the SVG is cut of in the PDF

2020-12-17 Thread Aditya Mahajan
m using Chromium as the PDF viewer). Can you check with a desktop pdf viewer as well. > I tried doing this in two different ways: using includesvgfile with > the offset option, and using startMPcode with setbounds in the MetaFun > code. In both cases I just get blank space instead of th

[NTG-context] LMTX MetaFun SVG trouble, a portion of the SVG is cut of in the PDF

2020-12-17 Thread Neven Sajko
iewer). I tried doing this in two different ways: using includesvgfile with the offset option, and using startMPcode with setbounds in the MetaFun code. In both cases I just get blank space instead of the cut-off content How can I fix this? Related question: is it possible to get the MetaPost co

Re: [NTG-context] upload / metafun

2020-12-16 Thread Hans Hagen
On 12/15/2020 9:18 PM, Pablo Rodriguez wrote: On 12/15/20 8:24 PM, Otared Kavian wrote: [...] However after running install. sh on MacOS, I still get current version: 2020.12.10 22:26, even after removing the .tma files.> So I guess I have to wait a little bit for the new version to be

Re: [NTG-context] upload / metafun

2020-12-15 Thread Pablo Rodriguez
On 12/15/20 8:24 PM, Otared Kavian wrote: > [...] > However after running install. sh on MacOS, I still get current > version: 2020.12.10 22:26, even after removing the .tma files.> So I guess I > have to wait a little bit for the new version to be > upoaded. Hans, I’m afraid I’m having the same

Re: [NTG-context] upload / metafun

2020-12-15 Thread Otared Kavian
Hi Hans, Thanks for the new upload. With your comments, I understand that, following the discussion with Aditya, when using the new version I should not define in Metafun a new function named dotlabel in order to have a square dot… Actually I called it mydotlabel in order to be able

[NTG-context] RE : upload / metafun

2020-12-15 Thread Joseph
HagenEnvoyé le :mardi 15 décembre 2020 10:35À : mailing list for ConTeXt usersObjet :[NTG-context] upload / metafun Hi, I uploaded a new lmtx. This time some work has been done at the metafun end. At the tex end we're working on some overload protection mechanism which involves tagging many macro so

[NTG-context] upload / metafun

2020-12-15 Thread Hans Hagen
Hi, I uploaded a new lmtx. This time some work has been done at the metafun end. At the tex end we're working on some overload protection mechanism which involves tagging many macro so that will take a while (most tagging is done but checking left over cases take time). So, I wondered if we

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

2020-12-10 Thread Hans Hagen
back in the day, I would never try to use fonts for "drawing". Especially, math fonts, where every designer has a different idea of what the shape should look like. ah pictex memories ... drawing lines with cmr5 periods ... but actually, we can define a stable font with symbols in me

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

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

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

2020-12-10 Thread Hans Hagen
it not conflict with the internal definitions of dotlabel in Metafun in some other place? Maybe it is safer for me to call it something like « dotshapelabel » ? In general, I agree. Redefining internal macros has the advantage that your code doesn't have to change. See, for example: it depends a bit

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

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

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

2020-12-10 Thread Aditya Mahajan
with the internal definitions > of dotlabel in Metafun in some other place? > Maybe it is safer for me to call it something like « dotshapelabel » ? In general, I agree. Redefining internal macros has the advantage that your code doesn't have to change. See, for example: https://github.com/adity

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

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

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

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

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

2020-12-10 Thread Otared Kavian
Hi all, In Metafun when representing a point I woul dlike to have some dots represented by a square (or even by another scalable symbol): for instance in the following I would like the dot at the point B to be a square: \starttext \startMPcode draw (2cm,3cm) -- (3cm,5cm) ; dotlabel(textext

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

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

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

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

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

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

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

2020-12-09 Thread Otared Kavian
hows how wonderful Metafun >> is ! > > Or, if you want to use high school algebra: > > \starttext > \startMPcode >z1 = (1cm,3cm) ; >z2 = (5cm, 9cm) ; >z3 = 1cm * dir(angle (z2 - z1)) shifted z2; >draw z1 -- z3 ; >draw z1 -- z

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

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

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

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

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

2020-12-09 Thread Fabrice L
on of the line and then compute by > hand the coordinates of the new end points, but I think there is a simpler > way in Metafun to do this. The shortened operation is the solution ! See MetaFun manual section 1.18 \starttext \startMPpage z1 = (1cm,3cm) ; z2 = (5cm, 9cm) ; draw (z1--z2) shortened -1

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

2020-12-09 Thread Otared Kavian
both the end points of this segment (that is in this example, a point before z1 and a point after z2 on the straight line) . Indeed it is possible to write the equation of the line and then compute by hand the coordinates of the new end points, but I think there is a simpler way in Metafun to do

Re: [NTG-context] Parallelizing typesetting of large documents with lots of cross-references

2020-12-03 Thread Hans Hagen
concurrent compiling and execution), you only need to process those snippets when something has changed and there are ways in context to deal with that (like \typesetbuffer and such which only processes when something changed between runs) - containing multiple MetaFun graphics, those don't take

[NTG-context] Parallelizing typesetting of large documents with lots of cross-references

2020-12-03 Thread Stephen Gaito
ss-referenced documents, - with embedded literate-programmed code (which needs concurrent compiling and execution), - containing multiple MetaFun graphics, all based upon ConTeXt-LMTX. "In theory", it should be possible to typeset individual "sub-documents" (any section which is

Re: [NTG-context] Using ConTeXt-LMTX for modern Mathematically-Literate-Programming 1/2

2020-12-03 Thread Stephen Gaito
he "pages" (which were all blank, not > > surprisingly). > > > > However, on my elderly desktop from 2008, both callbacks > > essentially cut only 6-8 seconds out of 18 seconds, for the > > `luametatex` document, and 190 seconds, for the `luametafun` > >

Re: [NTG-context] Using ConTeXt-LMTX for modern Mathematically-Literate-Programming 2/2

2020-12-03 Thread Stephen Gaito
luametatex we have no c++ ... all is > just C.) > > > Finally, the computational complexity of my proof engine, will be > > comparable to MetaFun/MetaPost... which I suspect you would not > > consider implementing in pure Lua. Some things are faster in C. > > Hard

Re: [NTG-context] Using ConTeXt-LMTX for modern Mathematically-Literate-Programming 2/2

2020-12-02 Thread Hans Hagen
we have no c++ ... all is just C.) Finally, the computational complexity of my proof engine, will be comparable to MetaFun/MetaPost... which I suspect you would not consider implementing in pure Lua. Some things are faster in C. Hard to say ... I think that the parser / expansion machinery

Re: [NTG-context] Using ConTeXt-LMTX for modern Mathematically-Literate-Programming 1/2

2020-12-02 Thread Hans Hagen
ly desktop from 2008, both callbacks essentially cut only 6-8 seconds out of 18 seconds, for the `luametatex` document, and 190 seconds, for the `luametafun` document. hm, on my 2013 laptop the luametatex manual needs 10 sec (i have all the fonts, so that includes a bunch) and a metafun manua

Re: [NTG-context] Using ConTeXt-LMTX for modern Mathematically-Literate-Programming 2/2

2020-12-02 Thread Stephen Gaito
rogramming approach), *and* (since I can not even hope to prove the compilers are *correct*), there must be many *different* compiler implementations (to show that the results are not artefacts of one particular implementation). Finally, the computational complexity of my proof engine, will b

Re: [NTG-context] Using ConTeXt-LMTX for modern Mathematically-Literate-Programming 1/2

2020-12-02 Thread Stephen Gaito
backs essentially cut only 6-8 seconds out of 18 seconds, for the `luametatex` document, and 190 seconds, for the `luametafun` document. In the case of the `luametafun` document, it is the MetaFun/MetaPost processing which, of course, is taking a long time (as it should, the graphics comput

Re: [NTG-context] Units of xpart and ypart of a pair in MetaFun

2020-11-27 Thread Keith McKay
Thanks Taco! I understand much better now. I think it's best to leave the units out until the drawing stage as you suggest. Thanks again Keith McKay On Fri, 27 Nov 2020, 08:30 Taco Hoekwater, wrote: > > > > On 26 Nov 2020, at 16:09, Keith McKay wrote: > > > > Hi, > > > > I have been using

Re: [NTG-context] Units of xpart and ypart of a pair in MetaFun

2020-11-27 Thread Taco Hoekwater
> On 26 Nov 2020, at 16:09, Keith McKay wrote: > > Hi, > > I have been using xpart and ypart to extract these values from pairs of > points in a path but I wasn't getting the correct result. I was expecting: > > pair (2cm, 11cm) to give xpart 2 and ypart 11 As explained by various people,

Re: [NTG-context] Units of xpart and ypart of a pair in MetaFun

2020-11-26 Thread Keith McKay
/First « //uniformdeviate(1) - 0.5// » could be modified to « //uniformdeviate(0.5)//»./ / / /To add noise, you can use the randomized function of Metafun. For exemple, you can write:/ / / /draw pp randomized 1cm ;/ / / That's true Fabrice but in this use case I wanted a random number between

Re: [NTG-context] Units of xpart and ypart of a pair in MetaFun

2020-11-26 Thread Keith McKay
e xpart 2 and ypart 11 However I was getting: pair (2cm, 11cm) -> xpart 56.6929 and ypart 311.8096 After much head scratching and reading the MetaPost and MetaFun manuals, I realised that the units of xpart or ypart are in Postcript points or Big Points (bp), and 1 bp is 1/72 of an inch, and

Re: [NTG-context] Units of xpart and ypart of a pair in MetaFun

2020-11-26 Thread Fabrice L
hanks > Keith McKay First « uniformdeviate(1) - 0.5 » could be modified to « uniformdeviate(0.5)». To add noise, you can use the randomized function of Metafun. For exemple, you can write: draw pp randomized 1cm ; Fabrice. > > On 26/11/2020 15:19, Fabrice L wrote: >> Hi keith, >

Re: [NTG-context] Units of xpart and ypart of a pair in MetaFun

2020-11-26 Thread Hans Hagen
of points in a path but I wasn't getting the correct result. I was expecting: pair (2cm, 11cm) to give xpart 2 and ypart 11 However I was getting: pair (2cm, 11cm) -> xpart 56.6929 and ypart 311.8096 After much head scratching and reading the MetaPost and MetaFun manuals, I realised that the un

Re: [NTG-context] Units of xpart and ypart of a pair in MetaFun

2020-11-26 Thread Keith McKay
result. I was expecting: pair (2cm, 11cm) to give xpart 2 and ypart 11 However I was getting: pair (2cm, 11cm) -> xpart 56.6929 and ypart 311.8096 After much head scratching and reading the MetaPost and MetaFun manuals, I realised that the units of xpart or ypart are in Postcript points or Bi

Re: [NTG-context] Units of xpart and ypart of a pair in MetaFun

2020-11-26 Thread Hans Hagen
art 56.6929 and ypart 311.8096 After much head scratching and reading the MetaPost and MetaFun manuals, I realised that the units of xpart or ypart are in Postcript points or Big Points (bp), and 1 bp is 1/72 of an inch, and thus to get the values of xpart or ypart in cm I would have to

Re: [NTG-context] Units of xpart and ypart of a pair in MetaFun

2020-11-26 Thread Fabrice L
ypart 11 > > However I was getting: > > pair (2cm, 11cm) -> xpart 56.6929 and ypart 311.8096 > > After much head scratching and reading the MetaPost and MetaFun manuals, I > realised that the units of xpart or ypart are in Postcript points or Big > Points (bp), and 1 bp is 1

[NTG-context] Units of xpart and ypart of a pair in MetaFun

2020-11-26 Thread Keith McKay
ead scratching and reading the MetaPost and MetaFun manuals, I realised that the units of xpart or ypart are in Postcript points or Big Points (bp), and 1 bp is 1/72 of an inch, and thus to get the values of xpart or ypart in cm I would have to use a correction factor. I had made the assumpt

Re: [NTG-context] new upload

2020-11-25 Thread Hans Hagen
On 11/25/2020 10:12 AM, Giulio Bertellini wrote: Great. Made a clean install from scratch and now metafun manual compiles great at first run: mkiv lua stats  > used engine:*luametatex version: 2.0803, functionality level: 20201123*, format id: 547, compiler: gcc mkiv lua stats  &g

Re: [NTG-context] new upload

2020-11-25 Thread Giulio Bertellini
Great. Made a clean install from scratch and now metafun manual compiles great at first run: mkiv lua stats > used engine:* luametatex version: 2.0803, functionality level: 20201123*, format id: 547, compiler: gcc mkiv lua stats > tex properties: 740024 hash slots used of 2097152, appro

Re: [NTG-context] Current LMTX unable to compile file metafun-positioning.tex - error on line 240

2020-11-23 Thread Giulio Bertellini
Dear All Unable to compile metafun manual with current release of LMTX for linux X86_64 and RPI 4 (both Raspberry PI OS 32 bit and Manjaro Linux ARM 64). engine: luametatex version: 2.0802, functionality level: 20201118 tex error > tex error on line 240 in file metafun-positioning.

Re: [NTG-context] reusableMPgraphic not working

2020-11-18 Thread Bruce Horrocks
> On 18 Nov 2020, at 13:28, Rik Kabel wrote: > > > On 11/18/2020 08:11, Bruce Horrocks wrote: >> Just working through the Metafun manual and have hit a problem. In the >> following MWE the green circle appears but the blue one doesn't. Surely >> reusable gra

Re: [NTG-context] reusableMPgraphic not working

2020-11-18 Thread Rik Kabel
On 11/18/2020 08:11, Bruce Horrocks wrote: Just working through the Metafun manual and have hit a problem. In the following MWE the green circle appears but the blue one doesn't. Surely reusable graphics must be so commonly used that it has to be me that's doing something wrong? (Context

[NTG-context] reusableMPgraphic not working

2020-11-18 Thread Bruce Horrocks
Just working through the Metafun manual and have hit a problem. In the following MWE the green circle appears but the blue one doesn't. Surely reusable graphics must be so commonly used that it has to be me that's doing something wrong? (Context version is: 2020.11.05 23:01) \starttext

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

2020-11-09 Thread Jairo A. del Rio
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/metafun-p.pdf>

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

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 wan

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 Tamar

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/~thala/st

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, ] ; \stopMPcode

[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

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
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 presume I would need to use to achieve

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
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 first question is to ask if I could

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

2020-08-17 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
y > > > > 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 cente

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

[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

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