Re: [NTG-context] Axis macro in MetaFun

2021-09-11 Thread kauśika cittūr via ntg-context
On Saturday, September 11, 2021 10:30:25 PM IST Hans Hagen wrote: > On 9/11/2021 4:27 PM, kauśika cittūr via ntg-context wrote: > > Dear All, > > > > I am truly grateful for the new additions to MetaFun. It has greatly > > helped me in producing neat dr

Re: [NTG-context] Axis macro in MetaFun

2021-09-11 Thread Hans Hagen via ntg-context
On 9/11/2021 4:27 PM, kauśika cittūr via ntg-context wrote: Dear All, I am truly grateful for the new additions to MetaFun. It has greatly helped me in producing neat drawings for my academic work. In this connection, I have a few queries. Currently I am using PGFPlots (with ConTeXt) to draw

Re: [NTG-context] Axis macro in MetaFun

2021-09-11 Thread Hans Hagen via ntg-context
On 9/11/2021 4:27 PM, kauśika cittūr via ntg-context wrote: My final query: is it possible to specify a co-ordinate transform for any/all of the axes? For instance in my work, I would like to plot the y-axis in the log-scale. Alan is working on that when he is in distraction mode ... we have

[NTG-context] Axis macro in MetaFun

2021-09-11 Thread kauśika cittūr via ntg-context
Dear All, I am truly grateful for the new additions to MetaFun. It has greatly helped me in producing neat drawings for my academic work. In this connection, I have a few queries. Currently I am using PGFPlots (with ConTeXt) to draw simple plots from CSV data. I was wondering if there is any

[NTG-context] MetaFun : textext.dflt / textext.dlft and MkIV / LMTX

2021-09-05 Thread Garulfo via ntg-context
Hi, After https://mailman.ntg.nl/pipermail/ntg-context/2021/102052.html It seems that there is no backward compatibility between MkIV and LMTX for textext.dflt (MVE below) | MkIV | LMTX | -|---|--| textext.dflt | OK | KO | as DefauLT (unlike ulft

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

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

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

2021-09-03 Thread fv leung via ntg-context
' fonts > preloading latin modern fonts (second stage) fonts > 'fallback modern-designsize rm 12pt' is loaded metapost> initializing instance 'metafun:1' using format 'metafun' and method 'default' metapost> loading 'metafun' as 'metafun.mpxl' using meth

Re: [NTG-context] Vector Brushes for MetaFun?

2021-09-01 Thread Henning Hraban Ramm via ntg-context
Designer does). >> (https://affinity.serif.com/designer/) >> Is this possible with MetaFun, i.e. use a closed path and distort/stretch it >> along an open path? >> If, how? > you can try to 'reverse engineer the result' and see what is done by looking > at the output

Re: [NTG-context] Passing colors to Metafun and TeX's bitmapimage macros

2021-09-01 Thread Hans Hagen via ntg-context
On 9/1/2021 1:08 PM, Jairo A. del Rio via ntg-context wrote: Hi, list! I want to know if there's a handy way to pass predefined colors, either RGB or CMYK, e.g. those in svg or crayola, to Metafun's bitmapimage. Say, something like: \startMPpage % svg's gold definition draw bitmapimage(2,

Re: [NTG-context] Vector Brushes for MetaFun?

2021-09-01 Thread Hans Hagen via ntg-context
/ This stretches the whole shape over the path – not perfect but good enough (and the same what e.g. “my” Affinity Designer does). (https://affinity.serif.com/designer/) Is this possible with MetaFun, i.e. use a closed path and distort/stretch it along an open path? If, how? you can try to 'reverse

[NTG-context] Passing colors to Metafun and TeX's bitmapimage macros

2021-09-01 Thread Jairo A. del Rio via ntg-context
Hi, list! I want to know if there's a handy way to pass predefined colors, either RGB or CMYK, e.g. those in svg or crayola, to Metafun's bitmapimage. Say, something like: \startMPpage % svg's gold definition draw bitmapimage(2, 2, "ffd700 ffd700 ffd700 00") scaled 3cm; \stopMPpage using

[NTG-context] Vector Brushes for MetaFun?

2021-09-01 Thread Henning Hraban Ramm via ntg-context
enough (and the same what e.g. “my” Affinity Designer does). (https://affinity.serif.com/designer/) Is this possible with MetaFun, i.e. use a closed path and distort/stretch it along an open path? If, how? Hraban

Re: [NTG-context] Delivering the value of a variable in MetaFun to ConTeXt

2021-06-25 Thread Jeong Dal
Dear Aditya and Hans, Thank you for your suggestion. I add > \startMPcalculation > > \stopMPcalculation and it works. \setupinteraction[state=start] \usemodule[animation] \starttext %\startanimation[menu=yes] %{ \startMPcalculation path p; \stopMPcalculation \dorecurse{\udCount}

Re: [NTG-context] simplifying repeated macro calls in metafun

2021-06-25 Thread Jeong Dal
Dear Aditya, > A while back, I wrote some code to easily generate metapost animations. > > https://adityam.github.io/context-blog/post/metapost-animation/ > > I haven't used it much because I am mostly on linux, and its is a PITA to get > an older version of Adobe Reader to work under wine.

Re: [NTG-context] simplifying repeated macro calls in metafun

2021-06-24 Thread Hans Hagen
On 6/24/2021 5:42 AM, Aditya Mahajan wrote: On Wed, 23 Jun 2021, Aditya Mahajan wrote: On Thu, 24 Jun 2021, Jeong Dal wrote: Now, I am trying to do the same thing using \startuseMPgraphic, but I don’t the correct result yet. Using \startuseMPgraphic, and \dorecurse, the code is simpler.

Re: [NTG-context] Delivering the value of a variable in MetaFun to ConTeXt

2021-06-24 Thread Jeong Dal
Dear Hans, Your code works fine. > \starttext > > \startMPcode >numeric maxCount; >maxCount := 10; >setglobalmacro("MyMacro",decial maxCount); >setglobalcount("MyCount",maxCount); > \stopMPcode > > > \dorecurse{\MyMacro}{It is \recurselevel. }\par > \dorecurse{\MyCount}{It is

Re: [NTG-context] Delivering the value of a variable in MetaFun to ConTeXt

2021-06-24 Thread Hans Hagen
On 6/24/2021 5:39 AM, Aditya Mahajan wrote: You need to call the setglobalmacro(...) macro. The code inside \startMPinitializations is only executed when you call any MP environment. But you are using \udCount before \useMPgraphic. A simple solution is to run dummy MP code so that MP

Re: [NTG-context] simplifying repeated macro calls in metafun

2021-06-23 Thread Aditya Mahajan
On Wed, 23 Jun 2021, Aditya Mahajan wrote: > On Thu, 24 Jun 2021, Jeong Dal wrote: > > > Now, I am trying to do the same thing using \startuseMPgraphic, but I don’t > > the correct result yet. > > Using \startuseMPgraphic, and \dorecurse, the code is simpler. But, it > > seems to me that

Re: [NTG-context] Delivering the value of a variable in MetaFun to ConTeXt

2021-06-23 Thread Aditya Mahajan
On Thu, 24 Jun 2021, Jeong Dal wrote: > Dear Hans, > > Your code works fine. > > > \starttext > > > > \startMPcode > >numeric maxCount; > >maxCount := 10; > >setglobalmacro("MyMacro",decial maxCount); > >setglobalcount("MyCount",maxCount); > > \stopMPcode > > > > > >

Re: [NTG-context] simplifying repeated macro calls in metafun

2021-06-23 Thread Aditya Mahajan
On Thu, 24 Jun 2021, Jeong Dal wrote: > Now, I am trying to do the same thing using \startuseMPgraphic, but I don’t > the correct result yet. > Using \startuseMPgraphic, and \dorecurse, the code is simpler. But, it seems > to me that \startanimation … \stopanimation is not working with >

Re: [NTG-context] simplifying repeated macro calls in metafun

2021-06-23 Thread Jeong Dal
Dear Otared, > > Regarding the way Aditya uses \startuseMPgraphic, it is also very > instructive. > Dalyoung, can you also share the animation example for the foldings ? I am > sure we are a few on the list to learn something… > 1. Here is the working sample of animation using

[NTG-context] Delivering the value of a variable in MetaFun to ConTeXt

2021-06-23 Thread Jeong Dal
Hi, Is there a way to deliver the value of a variable in MetaFun to ConTeXt. For example, I want to do the following: \starttext \startMPcode numeric maxCount; % … some code maxCount := 10; \stopMPcode dorecurse{maxCount} {It is \recurselevel.\par} \stoptext Thank you for reading. Best

Re: [NTG-context] Delivering the value of a variable in MetaFun to ConTeXt

2021-06-23 Thread Hans Hagen
On 6/23/2021 10:00 PM, Jeong Dal wrote: Hi, Is there a way to deliver the value of a variable in MetaFun to ConTeXt. For example, I want to do the following: \starttext \startMPcode numeric maxCount; % … some code maxCount := 10; \stopMPcode dorecurse{maxCount} {It is \recurselevel.\par

Re: [NTG-context] simplifying repeated macro calls in metafun

2021-06-22 Thread Wolfgang Schuster
Otared Kavian schrieb am 22.06.2021 um 15:49: Dear Dalyoung, dear Mikael Thank you both for your explanations: indeed this « whatever » command in MetaPost is magic and very useful (I am not sure whether it is a command only in MetaFun, or it exists also in the original MetaPost). You have

Re: [NTG-context] simplifying repeated macro calls in metafun

2021-06-22 Thread Otared Kavian
Dear Dalyoung, dear Mikael Thank you both for your explanations: indeed this « whatever » command in MetaPost is magic and very useful (I am not sure whether it is a command only in MetaFun, or it exists also in the original MetaPost). Regarding the way Aditya uses \startuseMPgraphic

Re: [NTG-context] simplifying repeated macro calls in metafun

2021-06-21 Thread Jeong Dal
Dear Otared, I received list mail in condensed form, I didn’t see your mail before I sent one. As Mikael explained, “whatever” is very nice to find the intersection point of two lines. You can see nice examples which use “whatever” in MetaFun manual. In my code, the next point

Re: [NTG-context] simplifying repeated macro calls in metafun

2021-06-21 Thread Mikael Sundqvist
ailed file you sent to answer Dalyoung’s question and > >> file. And going through both files I have a question. > >> I see that both of you use a function « whatever » (but is it a function > >> ?): what does this do and where can it be used (actually I have seen

Re: [NTG-context] simplifying repeated macro calls in metafun

2021-06-21 Thread Jeong Dal
Dear Aditya, Your code works perfectly. Thank you for your help. Best regards, Dalyoung ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl /

Re: [NTG-context] simplifying repeated macro calls in metafun

2021-06-21 Thread Otared Kavian
>> I see that both of you use a function « whatever » (but is it a function ?): >> what does this do and where can it be used (actually I have seen Hans using >> this expression, but I had always thought this is just a name… >> >> Best regards: Otared >> >>

Re: [NTG-context] simplifying repeated macro calls in metafun

2021-06-21 Thread Mikael Sundqvist
2021, Jeong Dal wrote: > > > >> > >> Hi, > >> > >> I defined a macro definition in metafun, and draw figures using > >> \startbuffer[] … \stopbuffer and \processMPbuffer[]. > >> As you see in the attached code, the same macro definitio

Re: [NTG-context] simplifying repeated macro calls in metafun

2021-06-21 Thread Otared Kavian
this expression, but I had always thought this is just a name… Best regards: Otared > On 21 Jun 2021, at 06:26, Aditya Mahajan wrote: > > On Mon, 21 Jun 2021, Jeong Dal wrote: > >> >> Hi, >> >> I defined a macro definition in metafun, and draw figures us

Re: [NTG-context] simplifying repeated macro calls in metafun

2021-06-20 Thread Aditya Mahajan
On Mon, 21 Jun 2021, Jeong Dal wrote: > > Hi, > > I defined a macro definition in metafun, and draw figures using > \startbuffer[] … \stopbuffer and \processMPbuffer[]. > As you see in the attached code, the same macro definition is used repeatedly > by changing

[NTG-context] simplifying repeated macro calls in metafun

2021-06-20 Thread Jeong Dal
Hi, I defined a macro definition in metafun, and draw figures using \startbuffer[] … \stopbuffer and \processMPbuffer[]. As you see in the attached code, the same macro definition is used repeatedly by changing the numeric argument. Is there a better way to simplify the code, for example

Re: [NTG-context] metafun transformation error

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

Re: [NTG-context] metafun transformation error

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

Re: [NTG-context] metafun transformation error

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

Re: [NTG-context] metafun transformation error

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

[NTG-context] metafun transformation error

2021-06-04 Thread Ajith R
Hi all, I am new to context and need help in solving an error. I am trying to print some numbers in a grid onto a transparent sheet as mirror images so that the numbers are correctly displayed when I view it from the non printed side. The numbers have a particular sequence which cannot be

Re: [NTG-context] metafun transformation error

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

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

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

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

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

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

2021-05-21 Thread Taco Hoekwater
6 > mtx-context | main context file: > /home/vm/context/tex/texmf-context/tex/context/base/mkxl/context.mkxl > mtx-context | current version: 2021.05.20 16:06 > > > it will produce an error (and an empty page) > > > metapost> initializing instance

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

2021-05-21 Thread Floris van Manen
> initializing instance 'metafun:1' using format 'metafun' and method 'default' metapost> loading 'metafun' as 'metafun.mpxl' using method 'default' metapost> initializing number mode 'scaled' metafun > log > metafun > log > er

Re: [NTG-context] randomize direction of arrow in metafun

2021-05-15 Thread Thomas A. Schmitz
On 5/15/21 2:42 PM, Mikael Sundqvist wrote: Hi, you could do something like this: \startMPpage for i = 0 upto 10: drawarrow if uniformdeviate(1)<0.5: reverse fi ((0,0)--(2cm,0)) yshifted i*cm; endfor; \stopMPpage /Mikael Hi Mikael, wonderful, thanks for the quick answer! Yes that works

Re: [NTG-context] randomize direction of arrow in metafun

2021-05-15 Thread Mikael Sundqvist
Hi, you could do something like this: \startMPpage for i = 0 upto 10: drawarrow if uniformdeviate(1)<0.5: reverse fi ((0,0)--(2cm,0)) yshifted i*cm; endfor; \stopMPpage /Mikael On Sat, May 15, 2021 at 2:30 PM Thomas A. Schmitz wrote: > > Hi all, > > for a slide template, I want to draw

[NTG-context] randomize direction of arrow in metafun

2021-05-15 Thread Thomas A. Schmitz
Hi all, for a slide template, I want to draw colored arrows in a randomized color (from a list of colors). This works (and the code is far too clever for me, I must have copied it somewhere): save mycolor ; color mycolor[] ; mycolor[1] := (0.2, 0.3, 0.4) ; mycolor[2] := (0.6, 0.6, 0.4) ;

Re: [NTG-context] A Metafun-Problem

2021-04-13 Thread Hans Hagen
On 4/12/2021 11:47 PM, Willi Egger wrote: Hi, Ok, changing the unitsquare into fullsquare is giving a better result, however it is still not the right drawing. I realise, that in this case probably the use of a vector in this way is not appropriate. — I have changed the drawing into

Re: [NTG-context] A Metafun-Problem

2021-04-12 Thread Willi Egger
Hi, Ok, changing the unitsquare into fullsquare is giving a better result, however it is still not the right drawing. I realise, that in this case probably the use of a vector in this way is not appropriate. — I have changed the drawing into something with rotating the top-line of the

Re: [NTG-context] A Metafun-Problem

2021-04-12 Thread Willi Egger
Thank you Jairo for your immediate answer. Although it is not yet what I have in mind, I see now what to do. Thanks! Willi > On 12 Apr 2021, at 23:22, Jairo A. del Rio wrote: > > Is this what you need? If so, change unitsquare by fullsquare. > > Jairo > > El lun, 12 de abr. de 2021 a la(s)

Re: [NTG-context] A Metafun-Problem

2021-04-12 Thread Jairo A. del Rio
Is this what you need? If so, change unitsquare by fullsquare. Jairo El lun, 12 de abr. de 2021 a la(s) 16:06, Willi Egger (cont...@boede.nl) escribió: > Hi > > can somebody tell me why I do not get a trapezoid with bottom angles of > 120 degrees? > > Please try the attached minimal example. >

[NTG-context] A Metafun-Problem

2021-04-12 Thread Willi Egger
Hican somebody tell me why I do not get a trapezoid with bottom angles of 120 degrees?Please try the attached minimal example.Thank you!Willi test.tex Description: Binary data test.pdf Description: Adobe PDF document

Re: [NTG-context] metafun / patterns

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

Re: [NTG-context] metafun / patterns

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

Re: [NTG-context] metafun / patterns

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

[NTG-context] metafun / patterns

2021-03-25 Thread Hans Hagen
Hi, As I'm still in metafun (and svg) mode I decided to support patterns (that are already supported at the tex end) also in metafun. As there has never been demands I suppose it's not that interesting but it sort of fits in. There are some tricky aspectx involved so the interface might

Re: [NTG-context] missing "{ }" in metafun.

2021-03-14 Thread Jeong Dal
Dear Hans, > \$ \_ \& \{ \} > > become letters when we flush a mp graphic, so use > > \lbrace \rbrace instead > It works well. Thank you so much. Best regards, Dalyoung ___ If your question is of interest to

[NTG-context] missing "{ }" in metafun.

2021-03-14 Thread Jeong Dal
Hi, Set notation “{}” is OK in TeX mode. But it is missing in the output of the metafun code. Here is an MWE. It is same in two different versions. ConTeXt ver: 2021.01.17 21:42 LMTX fmt: 2021.2.4 int: english/english ConTeXt ver: 2021.03.13 11:22 LMTX fmt: 2021.3.14 int: english/english

Re: [NTG-context] missing "{ }" in metafun.

2021-03-14 Thread Hans Hagen
On 3/14/2021 10:22 AM, Jeong Dal wrote: Hi, Set notation “{}” is OK in TeX mode. But it is missing in the output of the metafun code. Here is an MWE. It is same in two different versions. ConTeXt  ver: 2021.01.17 21:42 LMTX  fmt: 2021.2.4  int: english/english ConTeXt  ver: 2021.03.13 11:22

Re: [NTG-context] Center a text (Metafun)

2021-03-06 Thread Hans Hagen
On 3/6/2021 11:17 AM, Fabrice Couvreur wrote: Hi Hans, Some time ago, you offered this code to respond to a specific request from me. I used this code again and wanted to know if it was possible for the title "Algorithm" to be automatically centered based on the content. Thank you See

Re: [NTG-context] Center a text (Metafun)

2021-03-06 Thread Wolfgang Schuster
Fabrice Couvreur schrieb am 06.03.2021 um 11:17: Hi Hans, Some time ago, you offered this code to respond to a specific request from me. I used this code again and wanted to know if it was possible for the title "Algorithm" to be automatically centered based on the content. Thank you Fabrice

[NTG-context] Center a text (Metafun)

2021-03-06 Thread Fabrice Couvreur
Hi Hans, Some time ago, you offered this code to respond to a specific request from me. I used this code again and wanted to know if it was possible for the title "Algorithm" to be automatically centered based on the content. Thank you Fabrice \definecolor[MyBlue][c=0.2 , m=0.03, y=0.00, k=0.00]

Re: [NTG-context] metafun

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

Re: [NTG-context] metafun

2021-02-20 Thread Otared Kavian
hen making sure that the metafun manual processes with lmtx (where we have > sometimes different implementations of macros) I also checked performance. > > When we started with this manual, it was still MKII time so we either had > direct calls or inbetween calls. Especially multi

[NTG-context] metafun

2021-02-20 Thread Hans Hagen
Hi, When making sure that the metafun manual processes with lmtx (where we have sometimes different implementations of macros) I also checked performance. When we started with this manual, it was still MKII time so we either had direct calls or inbetween calls. Especially multiple runs

[NTG-context] odd seems to be broken in lmtx-metafun

2021-01-07 Thread Damien Thiriet
Hi, I think I found the bug that made me send a "false positive" a few days ago. Looks like something messes up with metafun odd function. This snippet of code: \starttext \startMPpage path p;p:=origin--(20,20); draw p; draw p reflectedabout ((10,10),(10,-10)) withcolor red; for

Re: [NTG-context] Problem with show command in MetaFun

2021-01-07 Thread Keith McKay
e Texworks), however this does not seem to be happening. I haven't used "show" in MetaFun for a while, am I implementing it correctly? Best Wishes Keith McKay MWE % \setuppapersize[A4, portrait] \starttext \startMPpage StartPage; width := PaperWidth ; height := Pape

Re: [NTG-context] Problem with show command in MetaFun

2021-01-07 Thread Hans Hagen
On 1/7/2021 4:11 PM, Keith McKay wrote: In the MWE below I would expect the "show" command to print the value of p in the console output (I use Texworks), however this does not seem to be happening. I haven't used "show" in MetaFun for a while, am I implementing it corr

[NTG-context] Problem with show command in MetaFun

2021-01-07 Thread Keith McKay
In the MWE below I would expect the "show" command to print the value of p in the console output (I use Texworks), however this does not seem to be happening. I haven't used "show" in MetaFun for a while, am I implementing it correctly? Best Wishes Keith

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

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

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