Re: [NTG-context] MP: problem connecting paths.

2021-12-20 Thread Fabrice L via ntg-context
thcolor darkgreen ; >> drawpoints newcircleA ; drawpointlabels newcircleA ; >> >> % partial moon >> newcircleA := circleA cutbefore P1 cutafter P2 >> .. reverse(circleB cutbefore P1 cutafter P2) .. cycle; >> % & (reverse(circleB) cutbefore P2 cutafter P

Re: [NTG-context] MP: problem connecting paths.

2021-12-20 Thread Mikael Sundqvist via ntg-context
ewcircleA shifted(2in,-1.5in) ; > draw newcircleA withcolor magenta ; > drawpoints newcircleA ; drawpointlabels newcircleA ; > > \stopMPpage > % ——— > > Thanks for any help ! > Fabrice. > > > /Mikael > > On Mon, Dec 20, 2021 at 5:30 AM Fabrice L via

Re: [NTG-context] MP: problem connecting paths.

2021-12-20 Thread Fabrice L via ntg-context
& cycle; newcircleA := newcircleA shifted(2in,-1.5in) ;draw newcircleA  withcolor magenta ;drawpoints newcircleA ; drawpointlabels newcircleA ;\stopMPpage% ———Thanks for any help ! Fabrice./MikaelOn Mon, Dec 20, 2021 at 5:30 AM Fabrice L via ntg-context<ntg-context@ntg.nl>

Re: [NTG-context] MP: problem connecting paths.

2021-12-19 Thread Mikael Sundqvist via ntg-context
& » (page 16 Metafun > manual). The problem is illustrated by the code (and the joined PDF) which > follows. > > I draw random cycled forms (left part of the figure) and when they interact, > they are modified to « fit together » (right part of the figure) . When > buildin

[NTG-context] MP: problem connecting paths.

2021-12-19 Thread Fabrice L via ntg-context
Dear list, I have a problem connecting path with the operator « & » (page 16 Metafun manual). The problem is illustrated by the code (and the joined PDF) which follows. I draw random cycled forms (left part of the figure) and when they interact, they are modified to « fit together » (r

Re: [NTG-context] tikzplot displacement result [solved]

2021-12-14 Thread Jan-Erik Hägglöf via ntg-context
> \addplot[line > width=2.pt,color=ffvvqq,smooth,samples=100,domain=-3.2488079448294145:34.87398305791419]{x+3} > node[below right, pos= 0.1]{$h$}; > \stopaxis > \stoptikzpicture > \stopTEXpage > \stoptext > > I removed the clip command because it is causing a problem

Re: [NTG-context] tikzplot displacement result

2021-12-12 Thread Gavin via ntg-context
xis \stoptikzpicture \stopTEXpage \stoptext I removed the clip command because it is causing a problem and is unnecessary. I don’t know what you are trying to do with the node{$h$}, but I made it a label on the plot. The metafun graph module would also work for this plot, but it pgfplots is more mature

[NTG-context] tikzplot displacement result

2021-12-12 Thread Jan-Erik Hägglöf via ntg-context
HI! I’m trying to fit the funktion in the right place in this plot but it seems to get displaced. What is wrong with the code? Is there a way to do this in Metafun? Thanks in advance Sincerely Jan-Erik \setupbodyfont[10pt] \enableregime[utf] \usemodule[tikz] \usemodule[pgfplots

Re: [NTG-context] Problem with log coordinates in metafun graph module

2021-12-09 Thread Jean-Philippe Rey via ntg-context
ntg-context > a écrit : > > Dear list, > > Log coordinates seem to be broken in the last version of > ConTeXt/metafun/graph. > > Here is my failing example > > === > \usemodule[graph] > \starttext > \startMPcode{graph} > draw be

[NTG-context] Problem with log coordinates in metafun graph module

2021-12-08 Thread Jean-Philippe Rey via ntg-context
Dear list, Log coordinates seem to be broken in the last version of ConTeXt/metafun/graph. Here is my failing example === \usemodule[graph] \starttext \startMPcode{graph} draw begingraph(100mm, 100mm); setcoords(log, linear); % works fine with setcoords

Re: [NTG-context] Status of Asymptote

2021-12-07 Thread Hans Hagen via ntg-context
On 12/7/2021 7:29 AM, Aditya Mahajan via ntg-context wrote: On Mon, 6 Dec 2021, Alexandre Christe via ntg-context wrote: Dear all, I'd like to know what is the status of Asymptote in Context. To my knowledge, metapost/metafun only support 2D (except with the additional libraries from Roegel

Re: [NTG-context] Status of Asymptote

2021-12-06 Thread Aditya Mahajan via ntg-context
On Mon, 6 Dec 2021, Alexandre Christe via ntg-context wrote: > Dear all, > > I'd like to know what is the status of Asymptote in Context. To my > knowledge, metapost/metafun only support 2D (except with the additional > libraries from Roegel, which would have to be cleaned up a

Re: [NTG-context] Status of Asymptote

2021-12-06 Thread Fabrice L via ntg-context
computational work. This is not easy, but the diagrams are super fast, > and I think they will always work. I would be very interested to see an example of a Metafun drawing made with the help of LuaTeX to speed up some calculations. Thanks

Re: [NTG-context] Status of Asymptote

2021-12-06 Thread Gavin via ntg-context
chapter07-t-b-1970d2b3267b0f295617c8a8d3f078eb.pdf Description: Adobe PDF document > On Dec 6, 2021, at 1:43 AM, Alexandre Christe via ntg-context > wrote: > > Dear all, > > I'd like to know what is the status of Asymptote in Context. To my knowledge, > metapost/metafun on

[NTG-context] Status of Asymptote

2021-12-06 Thread Alexandre Christe via ntg-context
Dear all, I'd like to know what is the status of Asymptote in Context. To my knowledge, metapost/metafun only support 2D (except with the additional libraries from Roegel, which would have to be cleaned up a bit). Otherwise, what shall be used for 3D drawings in Context? TikZ? Something else

Re: [NTG-context] [DKIM] Re: [DKIM] Re: [DKIM] circuitikz module seems broken

2021-12-03 Thread Hans Hagen via ntg-context
On 12/3/2021 3:17 PM, skrantajanneman via ntg-context wrote: My thougts on this, if it is a possible alternative, to do such things in metafun instead? i guess so but we needs specs etc and time (nothing wrong with using tikz if one likes the syntax, apart from it being a dependency

Re: [NTG-context] [DKIM] Re: [DKIM] circuitikz module seems broken

2021-12-03 Thread skrantajanneman via ntg-context
My thougts on this, if it is a possible alternative, to do such things in metafun instead?By the way I try this out.Thanks for all help,  appreciated.mvh Jan-Erik Hägglöf  Originalmeddelande Från: Hans Hagen via ntg-context Datum: 2021-12-03 14:55 (GMT+01:00) Till: mailing

Re: [NTG-context] double underbars

2021-11-30 Thread Hans Hagen via ntg-context
, but unfortunately I don't know metafun yet. If my understanding of https://source.contextgarden.net/node-rul.mkiv is correct, it should be possible to build upon the defintion of rules:under:dots (l. 327) Any hints how I could get this started? Yes, that is the right part to get started with. You could just

Re: [NTG-context] double underbars

2021-11-30 Thread Denis Maier via ntg-context
> > I was thinking using mp to draw the combination could be solution, but > unfortunately I don't know metafun yet. > > > > If my understanding of https://source.contextgarden.net/node-rul.mkiv is > correct, it should be possible to build upon the defintion of rules:under:dots &g

Re: [NTG-context] double underbars

2021-11-30 Thread Taco Hoekwater via ntg-context
> On 30 Nov 2021, at 14:38, Denis Maier via ntg-context > wrote: > > Thanks, Taco. Good to know. Although it's not what I wanted to hear, of > course... > > I was thinking using mp to draw the combination could be solution, but > unfortunately I don't know

Re: [NTG-context] double underbars

2021-11-30 Thread Denis Maier via ntg-context
Thanks, Taco. Good to know. Although it's not what I wanted to hear, of course... I was thinking using mp to draw the combination could be solution, but unfortunately I don't know metafun yet. If my understanding of https://source.contextgarden.net/node-rul.mkiv is correct, it should

Re: [NTG-context] Neovim and ConTeXt

2021-11-25 Thread Clint Grady via ntg-context
yet) is written in Vim9 script, > which NeoVim does not implement. My time is limited, so I can't support > both platforms, and I have decided to stick with Vim. If anyone wants to > try the new plugin, feel free to contact me via email. > > > Metafun has added some ne

Re: [NTG-context] Neovim and ConTeXt

2021-11-25 Thread Nicola via ntg-context
an't support both platforms, and I have decided to stick with Vim. If anyone wants to try the new plugin, feel free to contact me via email. > Metafun has added some new keywords and it will be nice to support > those. I believe that context ships with a file that outputs all these >

Re: [NTG-context] Neovim and ConTeXt

2021-11-24 Thread Aditya Mahajan via ntg-context
..) which could be integrated. I don't know what is the current state of context syntax highlighting support in vim/neovim (I use a highly modifies syntax file). It will be nice to have support of \startMP(code|page) and \startluacode to do syntax highlighting for metapost and lua. Metafun has

Re: [NTG-context] Bug in lmt_arrow

2021-11-21 Thread Aditya Mahajan via ntg-context
path = p, > > location = "percentage", > > percentage = 50, > > alternative = "curved", > > ] > > withpen pencircle scaled 1bp; > > \stopMPcode > > \stoptext > >

Re: [NTG-context] Bug in lmt_arrow

2021-11-20 Thread Hans Hagen via ntg-context
ntage", percentage = 50, alternative = "curved", ] withpen pencircle scaled 1bp; \stopMPcode \stoptext I get an error: metafun > log > metafun > log > error: This can't happen (division by zero) meta

Re: [NTG-context] Bug in lmt_arrow

2021-11-19 Thread Aditya Mahajan via ntg-context
cation = "percentage", percentage = 50, alternative = "curved", ] withpen pencircle scaled 1bp; \stopMPcode \stoptext I get an error: metafun > log > metafun > log >

Re: [NTG-context] Bug in lmt_arrow

2021-11-14 Thread Aditya Mahajan via ntg-context
r) > > Thanks! Works perfectly here. Spoke too soon. Now straight lines don't work: \starttext \startMPcode newpath p; ahfactor := 5; p := origin .. (3cm,0); draw lmt_arrow [ path = p, location = "percentage",

Re: [NTG-context] Outlined text (from MP) inline in ConText has incorrect baseline (i.e. no depth)

2021-10-12 Thread Rudd, Kevin via ntg-context
u<mailto:r...@usna.edu> On Oct 8, 2021, at 07:36, Hans Hagen mailto:j.ha...@xs4all.nl>> wrote: On 10/7/2021 4:14 PM, Rudd, Kevin via ntg-context wrote: Hey--- I'm trying to insert outlined text (derived from MetaFun example code) into a document and it seems to work up to the point t

[NTG-context] Solved: Making metafun pictures fainter

2021-10-12 Thread Gavin via ntg-context
hadow" macro that produces a shadow of any picture with an adjustable gray. I’m having lots of metafun! Gavin \startMPinclusions picture ball; ball := image( fill fullcircle scaled 1cm withshademethod "circular" withshadecenter (.25,.25) withshadeco

[NTG-context] Solved: Making metafun pictures fainter

2021-10-12 Thread Gavin via ntg-context
uot; macro that produces a shadow of any picture with an adjustable gray.I’m having lots of metafun!Gavin\startMPinclusions  picture ball;  ball := image(    fill fullcircle scaled 1cm  withshademethod "circular"  withshadecenter (.25,.25)  withshadecolors (.8white, black);    draw f

Re: [NTG-context] Making metafun pictures fainter (shading, uncolored clash)

2021-10-11 Thread Hans Hagen via ntg-context
On 10/11/2021 6:30 AM, Gavin via ntg-context wrote: Hi List, I made good progress producing fainter pictures in metafun. Here is a uniformly accelerated cow in the style of my book. I abandoned transparency, since I actually don’t want to see through anything. I am using uncolored to get

Re: [NTG-context] Making metafun pictures fainter (shading, uncolored clash)

2021-10-10 Thread Gavin via ntg-context
Hi List, I made good progress producing fainter pictures in metafun. Here is a uniformly accelerated cow in the style of my book. PastedGraphic-2.pdf Description: Adobe PDF document I abandoned transparency, since I actually don’t want to see through anything. I am using uncolored to get

[NTG-context] Making metafun pictures fainter

2021-10-10 Thread Gavin via ntg-context
Hi list, I’m trying to produce figures like this, showing motion as a series of snap-shots, with the earlier moments more faint. PastedGraphic-1.pdf Description: Adobe PDF document Here are three examples of metafun code using transparency and “decorated". \startMPinclusions picture

Re: [NTG-context] Outlined text (from MP) inline in ConText has incorrect baseline (i.e. no depth)

2021-10-08 Thread Rudd, Kevin via ntg-context
via ntg-context wrote: Hey--- I'm trying to insert outlined text (derived from MetaFun example code) into a document and it seems to work up to the point that the text has depth (descenders). There's a previous post that mentions using textcommand for titles to ensure that the appropriate baseline

Re: [NTG-context] Outlined text (from MP) inline in ConText has incorrect baseline (i.e. no depth)

2021-10-08 Thread Hans Hagen via ntg-context
On 10/7/2021 4:14 PM, Rudd, Kevin via ntg-context wrote: Hey--- I'm trying to insert outlined text (derived from MetaFun example code) into a document and it seems to work up to the point that the text has depth (descenders). There's a previous post that mentions using textcommand for titles

[NTG-context] hatching an area without drawing its borders

2021-10-07 Thread Damien Thiriet via ntg-context
Hi, I read the 2015 thread Hatch an area with Metapost (Metafun) and started playing with anglestriped. However in my maps I would like to get my shapes hatched with no borders drawn. How can I achieve it? path p; p := fullcircle scaled 50 randomized 5; draw p anglestriped (1,60,4); Damien

[NTG-context] Outlined text (from MP) inline in ConText has incorrect baseline (i.e. no depth)

2021-10-07 Thread Rudd, Kevin via ntg-context
Hey--- I'm trying to insert outlined text (derived from MetaFun example code) into a document and it seems to work up to the point that the text has depth (descenders). There's a previous post that mentions using textcommand for titles to ensure that the appropriate baseline is used but I

Re: [NTG-context] metafun: circular arc

2021-10-05 Thread Floris van Manen via ntg-context
In the example the text is drawn as: draw followtext(q, "\strut TEXT ONE") it looks as if the \strut generates a space before the text. e.g. if you omit the \strut, the text will align at the start point. In my perception, the \strut is a zero width box, so it should not generate the space

Re: [NTG-context] metafun: circular arc

2021-10-05 Thread Thomas A. Schmitz via ntg-context
Thank you so much, Hans, that's a neat solution! I was banging my head against the wall, but this makes sense. On 10/5/21 6:38 PM, Hans Hagen wrote: Because you know how to rotate and scale: \startuseMPgraphic{empedocless} path p, q, r ; pair a ; p := fullcircle scaled 10cm ; drawarrow p   

Re: [NTG-context] metafun: circular arc

2021-10-05 Thread Hans Hagen via ntg-context
aw followtext(S[18], "\strut\hbox to 2em{\EmpArrow}\hskip2em RUHEPAUSE\hskip4em\strut") ; draw followtext(S[19], "\strut\hbox to 2em{\EmpArrow}EINHEIT (SPHAIROS)\hskip2em\strut") ; \stopuseMPgraphic \useMPgraphic{empedocles} \stoptext I have a big problem and some smaller ques

[NTG-context] metafun: circular arc

2021-10-05 Thread Thomas A. Schmitz via ntg-context
\hskip2em RUHEPAUSE\hskip4em\strut") ; draw followtext(S[19], "\strut\hbox to 2em{\EmpArrow}EINHEIT (SPHAIROS)\hskip2em\strut") ; \stopuseMPgraphic \useMPgraphic{empedocles} \stoptext I have a big problem and some smaller questions, for those who are better at math and at metaf

[NTG-context] Running the examples from METAFUN-p

2021-10-01 Thread Alain Delmotte via ntg-context
Hi! I am looking to METAFUN and I wanted to follow the Growing Graphics demonstration (page 314-- ). I copied the instructions and everything went OK up to page 320; the command to place the figure with a button returns an error

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

[NTG-context] colors and contours in luametafun

2021-09-01 Thread Jacob Kauffmann via ntg-context
Dear list, I am a huge fan of the new metafun interface. Hans asked for luametafun requests, so here are a few. - color by value in lmt_surface We want to show a surface plot of a function where the color indicates the function value (instead, or in addition to a light source). The easiest

Re: [NTG-context] Best way to apply a fill-pattern to a closed shape?

2021-08-30 Thread Hans Hagen via ntg-context
On 8/30/2021 6:35 AM, Ramkumar KB wrote: Hans, Thank you! Yes, it would be great to learn more about MetaFun - if you can point me to the test suite, then I can document a few good tutorial level examples in the Wiki (beginner & intermediate). MetaFun's turbo charged capabilities are awe

Re: [NTG-context] Best way to apply a fill-pattern to a closed shape?

2021-08-29 Thread Ramkumar KB via ntg-context
Hans, Thank you! Yes, it would be great to learn more about MetaFun - if you can point me to the test suite, then I can document a few good tutorial level examples in the Wiki (beginner & intermediate). MetaFun's turbo charged capabilities are awesome! One idea I am thinking (maybe for a stu

Re: [NTG-context] Best way to apply a fill-pattern to a closed shape?

2021-08-29 Thread Hans Hagen via ntg-context
On 8/29/2021 4:48 AM, Ramkumar KB wrote: Hans, Thank you for the snippets. These are super helpful (I am assuming commands like `withpatternscale` are MetaFun extensions and Wow!). yes, just metafun, already there for a while ... (often examples show up first in the test suite) (if folks

Re: [NTG-context] Best way to apply a fill-pattern to a closed shape?

2021-08-28 Thread Ramkumar KB via ntg-context
Hans, Thank you for the snippets. These are super helpful (I am assuming commands like `withpatternscale` are MetaFun extensions and Wow!). I have added them to a new Wiki Page - https://wiki.contextgarden.net/Fill_Patterns and linked it the main MetaFun wiki page - https

Re: [NTG-context] Footnotes in columns

2021-08-12 Thread Henning Hraban Ramm via ntg-context
lumn > break disappeared: > > \starttext > \startcolumnset > \dorecurse{10}{\input knuth\footnote{D. E. Knuth}\ } > \stopcolumnset > \stoptext > > We are running out of options :) Could you, please, have a look at it when > your metafun mode is over? > > Thanks, > Jano &g

Re: [NTG-context] using a red frame as an overlay

2021-08-02 Thread Hans Hagen via ntg-context
On 8/2/2021 1:38 PM, Jeong Dal via ntg-context wrote: Hi, I used red frame which is in the metafun manual for long time. But it is not working now. Here is a MWE and a part of the log file. What should I change in the definitions? just update I am using "ConTeXt  ver: 2021.07.10 21:51

[NTG-context] using a red frame as an overlay

2021-08-02 Thread Jeong Dal via ntg-context
Hi, I used red frame which is in the metafun manual for long time. But it is not working now. Here is a MWE and a part of the log file. What should I change in the definitions? I am using "ConTeXt ver: 2021.07.10 21:51 LMTX fmt: 2021.7.12 int: english/english”. framed

Re: [NTG-context] Percentage stacked bars chart

2021-07-23 Thread Jorge Manuel
, live forever. Your ideas and your work are just amazing. Jorge Magalhães On 23 Jul 2021, 17:01 +0100, Hans Hagen , wrote: > On 7/23/2021 4:43 PM, Jorge Manuel wrote: > > Dear Sirs, > > > > Is there a way (out of the box) to draw percentage stacked bars chart > > w

Re: [NTG-context] Percentage stacked bars chart

2021-07-23 Thread Hans Hagen
On 7/23/2021 4:43 PM, Jorge Manuel wrote: Dear Sirs, Is there a way (out of the box) to draw percentage stacked bars chart with  metapost or MetaFun xl? Thanks for your time and support. you can have a look at https://akela.mendelu.cz/~thala/statcharts/ (at some point i'll see if i can

[NTG-context] Percentage stacked bars chart

2021-07-23 Thread Jorge Manuel
Dear Sirs, Is there a way (out of the box) to draw percentage stacked bars chart with   metapost or MetaFun xl? Thanks for your time and support. Jorge Magalhães ___ If your question is of interest to others

[NTG-context] MP keyword function: string parameters no longer accept string variables directly

2021-07-21 Thread Rudd, Kevin
.07.16 22:03 LMTX fmt: 2021.7.21 int: english/english metapost> trace > This is MPLIB for LuaMetaTeX, version 3.11, running in scaled mode. metapost> trace > metapost > trace > loading metafun for lmtx, including the plain 1.004 base definitions metapos

[NTG-context] MP boxes: boxjoin not recognized?

2021-07-21 Thread Rudd, Kevin
iv" instead of "mp-xbox.mpxl". Here is some log output and a (mostly) MWE. Thanks for any suggestions, ---K % system > ConTeXt ver: 2021.07.16 22:03 LMTX fmt: 2021.7.21 int: english/english % metapost > initializing instance 'metafun:1' using format 'me

[NTG-context] new lmtx upload

2021-07-06 Thread Hans Hagen
Hi, I upgrsded lmtx. A few small things (emntioned already) at the tex end but Alan and I are now in metafun mode. I (finally) adpated lmtx to delegated mplib logging, so \startMPcode{doublefun} tracingall ; fill fullcircle scaled 3cm withcolor "darkmagenta" ; \stopMPcode s

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

[NTG-context] new upload

2021-05-31 Thread Hans Hagen
\ showed, an equivalent positioning mechanism was added there. In \MKIV\ positioning support was optimized a bit as part of the upgrading process but the principles remained the same. The interface to positioning comes with a lot of commands and many of them relate to what we want to do with \METAFUN

Re: [NTG-context] \startstaticMPfigure not producing .pdf or .mp.md5 files

2021-05-30 Thread Jairo A. del Rio
ext --directives="system.showerror" --autopdf "$1” > > I’ve also tried MkIV and the TeXLive 2021 versions with the same results. > > I don’t actually need the separate pdf, but I do want the diagrams to be > redrawn only when something has changed. Without a .mp.md5

[NTG-context] \startstaticMPfigure not producing .pdf or .mp.md5 files

2021-05-30 Thread Gavin
lly need the separate pdf, but I do want the diagrams to be redrawn only when something has changed. Without a .mp.md5, I’m not sure what to expect. If the behavior has changed, I can update the wiki. I’m also curious about why \staticMPfigure is not mentioned i

Re: [NTG-context] How to write readable source files?

2021-05-30 Thread Nicola
nce, for MetaFun I currently have `mpDef` (MetaPost def macro), `mpVardef` (MetaPost vardef), `mpPrimaryDef`, `mpSecondaryDef`, `mpTertiaryDef`, `mpCommand`, `mpConstant`, `mpVariable`, `mpType`, `mpNewInternal`, and a few others. An excerpt from the current syntax file looks like this: ... &

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