Re: [NTG-context] MetaFun: Rotate picture without rotating labels

2018-04-05 Thread Henri Menke
On Fri, 2018-04-06 at 11:05 +1200, Henri Menke wrote: > Dear list, > > In the MWE below I would like py to be px rotated by 90 degrees but the labels > should not be rotated.  Is it possible? > > Cheers, Henri > > --- I thought of using vardef but that is kind of verbose because I gave to

[NTG-context] MetaFun: Rotate picture without rotating labels

2018-04-05 Thread Henri Menke
Dear list, In the MWE below I would like py to be px rotated by 90 degrees but the labels should not be rotated.  Is it possible? Cheers, Henri --- \startMPpage   path p ; p := origin .. (2,1) .. (3,0) .. (2,-1) .. (-2,1) .. (-3,0) .. (-2,-1) .. cycle ;   picture px, py ;   px := image (

Re: [NTG-context] Saving Metafun Graphic for use outside ConTeXt

2018-04-05 Thread Keith McKay
Thanks dr. Hans! It certainly will. Best Wishes Keith On 05/04/2018 19:55, dr. Hans van der Meer wrote: Maybe this script could help a bit too. Use with following code scheme in ConTeXt: \starttex t\startMPpage % Your Metapost/metafun code here \stopMPpage \stoptext It will produce

Re: [NTG-context] Saving Metafun Graphic for use outside ConTeXt

2018-04-05 Thread dr. Hans van der Meer
Maybe this script could help a bit too.  mpone Description: Binary data Use with following code scheme in ConTeXt:\starttext\startMPpage% Your Metapost/metafun code here\stopMPpage\stoptextIt will produce a standalone image in a pdf. dr. Hans van der Meer On 5 Apr 2018, at 18:45, Keith McKay

Re: [NTG-context] Saving Metafun Graphic for use outside ConTeXt

2018-04-05 Thread Keith McKay
Thanks Nicola and Alan. I'll look into that. Best Wishes Keith On 05/04/2018 17:42, Nicola wrote: On 05/04/2018 18:24, Alan Braslau wrote: On Thu, 5 Apr 2018 15:28:34 +0100 Keith McKay wrote: I use a mac-mini and it seems that mupdf, of which mutools is part off,

Re: [NTG-context] Saving Metafun Graphic for use outside ConTeXt

2018-04-05 Thread Nicola
On 05/04/2018 18:24, Alan Braslau wrote: On Thu, 5 Apr 2018 15:28:34 +0100 Keith McKay wrote: I use a mac-mini and it seems that mupdf, of which mutools is part off, does not have a macOS version, or I would have to build from source. However it looks like I can use

Re: [NTG-context] Saving Metafun Graphic for use outside ConTeXt

2018-04-05 Thread Alan Braslau
On Thu, 5 Apr 2018 15:28:34 +0100 Keith McKay wrote: > I use a mac-mini and it seems that mupdf, of which mutools is part > off, does not have a macOS version, or I would have to build from > source. However it looks like I can use Inkscape with a wee bit > thought to do

Re: [NTG-context] Saving Metafun Graphic for use outside ConTeXt

2018-04-05 Thread Keith McKay
. Keith On 05/04/2018 13:39, Hans Hagen wrote: On 4/5/2018 1:10 PM, Keith McKay wrote: Dear Readers, I have been playing about with METAFUN over the last few days trying to get a feel for it. I was wondering if it is possible to save the graphics produced in a context document for use outside

Re: [NTG-context] Saving Metafun Graphic for use outside ConTeXt

2018-04-05 Thread Hans Hagen
On 4/5/2018 1:10 PM, Keith McKay wrote: Dear Readers, I have been playing about with METAFUN over the last few days trying to get a feel for it. I was wondering if it is possible to save the graphics produced in a context document for use outside. On looking at the Metapost manual I see you

[NTG-context] Saving Metafun Graphic for use outside ConTeXt

2018-04-05 Thread Keith McKay
Dear Readers, I have been playing about with METAFUN over the last few days trying to get a feel for it. I was wondering if it is possible to save the graphics produced in a context document for use outside. On looking at the Metapost manual I see you can using the following commands save

Re: [NTG-context] Fwd: Macro to write a vector (Metafun) is broken

2018-03-22 Thread Fabrice Couvreur
modern fonts (second stage) fonts > 'fallback modern-designsize rm 12pt' is loaded metapost> initializing instance 'metafun' using format 'metafun' metapost> loading 'metafun' as '/home/fab/context/tex/texmf-context/metapost/context/base/mpiv/metafun.mpiv' using me

Re: [NTG-context] Fwd: Macro to write a vector (Metafun) is broken

2018-03-22 Thread Hans Hagen
-- Forwarded message -- From: Fabrice Couvreur <fabrice1.couvr...@gmail.com> Date: Tue, Mar 20, 2018 at 4:29 PM Subject: [NTG-context] Macro to write a vector (Metafun) is broken To: mailing list for ConTeXt users <ntg-context@ntg.nl> Hello Hans, The macro you w

[NTG-context] Macro to write a vector (Metafun) is broken

2018-03-20 Thread Fabrice Couvreur
Hello Hans, The macro you wrote to draw the arrows of the vectors does not seem to work anymore. Thank you Fabrice \useMPlibrary[mat] % will be in meta-imp-mat.mkiv \startMPextensions vardef math_stacker_arrow_shape = image ( drawarrow

Re: [NTG-context] getting metafun positions within (displayed) math mode

2017-11-17 Thread Sanjoy Mahajan
[Sorry for probably breaking the threading -- long story with not using the mailing-list administrative interface correctly at first.] Aditya writes: > No time for a detailed answer, but what you need is the following: > ... Thank you -- that should work. I won't have many of these equation

Re: [NTG-context] getting metafun positions within (displayed) math mode

2017-11-17 Thread Aditya Mahajan
On Thu, 16 Nov 2017, Sanjoy Mahajan wrote: However, the \hpos hides its argument in an \hbox, and thus hides it from the math layout. Thus, I have to do something like this minimal example: \starttext \startformula \sum_0^1 % what it should look like \quad

Re: [NTG-context] getting metafun positions within (displayed) math mode

2017-11-16 Thread Nigel King
rt (here, each symbol) is connected with an > line to its explanation. > > I'm trying to do so with a combination of ConTeXt, MetaPost/MetaFun, > TikZ, and whatever else might work. But I am a bit stuck at the > following spot. > > My plan is to use MetaFun to get the coordina

[NTG-context] getting metafun positions within (displayed) math mode

2017-11-16 Thread Sanjoy Mahajan
like (from page 2 of Fleisch's book). It's like a labeled part diagram (say, for a laptop), where each part (here, each symbol) is connected with an line to its explanation. I'm trying to do so with a combination of ConTeXt, MetaPost/MetaFun, TikZ, and whatever else might work. But I am a bit stuck

Re: [NTG-context] Metafun "Structure-Trees"

2017-09-18 Thread luigi scarso
On Mon, Sep 18, 2017 at 10:57 AM, Hans Hagen wrote: > On 9/18/2017 10:25 AM, Ursula Hermann wrote: >> >> Hello! >> >> I have tried an example: >> >> 1 \starttext >> 2 This is me >> 3 \startMPcode >> 4 u:=0.4cm; >> 5 dirlabel:=90; >> 6

Re: [NTG-context] Metafun "Structure-Trees"

2017-09-18 Thread Hans Hagen
On 9/18/2017 10:25 AM, Ursula Hermann wrote: Hello! I have tried an example: 1 \starttext 2 This is me 3 \startMPcode 4 u:=0.4cm; 5 dirlabel:=90; 6 abscoord:=true; 7 endlabelspace:=0.5cm; 8 draw startlable ("S") 9 draw

Re: [NTG-context] Metafun "Structure-Trees"

2017-09-18 Thread Ursula Hermann
rce > level 2, order 3, name 'D:/My Documents/graphic.tex' fonts > preloading latin modern fonts (second stage) fonts > 'fallback modern-designsize rm 12pt' is loaded metapost> initializing instance 'metafun' using format 'metafun' metapost>

Re: [NTG-context] Metafun "Structure-Trees"

2017-09-14 Thread Ursula Hermann
2017 20:26 An: mailing list for ConTeXt users Betreff: Re: [NTG-context] Metafun "Structure-Trees" What exactly do you mean? (we can build tree diagrams with Metapost) Alan > On 13 Sep 2017, at 12:43, Ursula Hermann <ursula.herm...@univie.ac.at> wrote: > >

Re: [NTG-context] Metafun "Structure-Trees"

2017-09-13 Thread Alan Braslau
What exactly do you mean? (we can build tree diagrams with Metapost) Alan > On 13 Sep 2017, at 12:43, Ursula Hermann wrote: > > Hello! > > My question is: Is it possible to make „Structure Trees“ for English > Sentences with „Categorial Grammar“? Sorry, I have

[NTG-context] Metafun "Structure-Trees"

2017-09-13 Thread Ursula Hermann
Hello! My question is: Is it possible to make "Structure Trees" for English Sentences with "Categorial Grammar"? Sorry, I have no example. Thanks Uschi Hermann ___ If your question is of interest to

Re: [NTG-context] Background with rounded corners (Metafun)

2017-09-08 Thread Meer, Hans van der
> \defineornament >[FrameTitle] >[preset=lefttop] I tried this example and I wonder what the [preset=lefttop] does. Because whatever I fill in for lefttop, the ornament appears always in the topleft corner and nowhere else. Hans van der Meer > On 23 Aug 2017, at 00:50, Aditya

Re: [NTG-context] Background with rounded corners (Metafun)

2017-08-30 Thread Fabrice Couvreur
Hi Pablo, I speak of the text in the frame as in the image https://mail.google.com/mail/u/0/?ui=2=d5d294e54c=att=15e0c2d8c5b8cf7c=0.1=safe=f_j6o6zsx20 Fabrice 2017-08-30 22:45 GMT+02:00 Pablo Rodriguez : > On 08/30/2017 06:07 PM, Fabrice Couvreur wrote: > > Hi Aditya, > > I tried :

Re: [NTG-context] Background with rounded corners (Metafun)

2017-08-30 Thread Pablo Rodriguez
On 08/30/2017 06:07 PM, Fabrice Couvreur wrote: > Hi Aditya, > I tried : > [...] > to have my text wrapped around the ornament as in the figure but it > does not work. Hi Fabrice, sorry if I’m missing something, but I wonder whether the next sample is what you intend.

Re: [NTG-context] Background with rounded corners (Metafun)

2017-08-30 Thread Fabrice Couvreur
m>: > >> Hi Aditya, >> Sorry I forgot to attach the image of what I want to do. I know corner=number >> parameter of framed and framed text but I wanted to do it with Metafun. >> Thank you >> Fabrice >> >> 2017-08-23 0:50 GMT+02:00 Aditya Mahajan <a

Re: [NTG-context] Background with rounded corners (Metafun)

2017-08-22 Thread Fabrice Couvreur
Sorry 'corner=00' ! 2017-08-23 1:01 GMT+02:00 Fabrice Couvreur <fabrice1.couvr...@gmail.com>: > Hi Aditya, > Sorry I forgot to attach the image of what I want to do. I know corner=number > parameter of framed and framed text but I wanted to do it with Metafun. > Thank you >

Re: [NTG-context] Background with rounded corners (Metafun)

2017-08-22 Thread Fabrice Couvreur
With your solution 'corner=01' 2017-08-23 1:01 GMT+02:00 Fabrice Couvreur <fabrice1.couvr...@gmail.com>: > Hi Aditya, > Sorry I forgot to attach the image of what I want to do. I know corner=number > parameter of framed and framed text but I wanted to do it with Metafun. > T

Re: [NTG-context] Background with rounded corners (Metafun)

2017-08-22 Thread Fabrice Couvreur
Hi Aditya, Sorry I forgot to attach the image of what I want to do. I know corner=number parameter of framed and framed text but I wanted to do it with Metafun. Thank you Fabrice 2017-08-23 0:50 GMT+02:00 Aditya Mahajan <adit...@umich.edu>: > On Wed, 23 Aug 2017, Fabrice Couvr

Re: [NTG-context] Background with rounded corners (Metafun)

2017-08-22 Thread Aditya Mahajan
On Wed, 23 Aug 2017, Fabrice Couvreur wrote: Hello, I would like to have three corners rounded as in the figure. Not sure if you had simplified your example or not. But if all you want is a rounded corner, you can consider using corner=number parameter of framed and framed text:

[NTG-context] Background with rounded corners (Metafun)

2017-08-22 Thread Fabrice Couvreur
Hello, I would like to have three corners rounded as in the figure. Thank you Fabrice \definecolor[MyColorA][r=0.8784, g=0.8784, b=0.8784] \definecolor[MyColorB][c=0.00,m=0.27,y=1.00,k=0.00] \startuseMPgraphic{MyFrame} path b ; picture p ; p :=

Re: [NTG-context] Creating SVG: using MetaFun, exporting proper units, conversion to DXF

2017-07-27 Thread Mojca Miklavec
On 27 July 2017 at 10:49, Hans Hagen wrote: > On 7/27/2017 3:52 AM, Mojca Miklavec wrote: >> >> Hi, >> >> I just wanted to say that I found a more reliable way to go from >> metapost to dxf. >> >> First run "context something.mp" and then >> >> pstoedit -dt -f dxf:-polyaslines\ -mm something.1

Re: [NTG-context] Creating SVG: using MetaFun, exporting proper units, conversion to DXF

2017-07-27 Thread Hans Hagen
On 7/27/2017 3:52 AM, Mojca Miklavec wrote: Hi, I just wanted to say that I found a more reliable way to go from metapost to dxf. First run "context something.mp" and then pstoedit -dt -f dxf:-polyaslines\ -mm something.1 something.dxf For some reason the SVG files from metapost get wrong

Re: [NTG-context] Creating SVG: using MetaFun, exporting proper units, conversion to DXF

2017-07-26 Thread Mojca Miklavec
Hi, I just wanted to say that I found a more reliable way to go from metapost to dxf. First run "context something.mp" and then pstoedit -dt -f dxf:-polyaslines\ -mm something.1 something.dxf For some reason the SVG files from metapost get wrong dimensions when converted via inkscape, but

Re: [NTG-context] Metafun: setting pen size in properties

2017-07-25 Thread Aditya Mahajan
On Mon, 24 Jul 2017, Alan Braslau wrote: On Mon, 24 Jul 2017 10:26:25 +0200 Hans Hagen wrote: On 7/24/2017 1:40 AM, Aditya Mahajan wrote: Hi, Is it possible to set pen width using properties(...)? The following does not work (the color is set, but not the pen width):

Re: [NTG-context] Metafun: setting pen size in properties

2017-07-24 Thread Alan Braslau
On Mon, 24 Jul 2017 10:26:25 +0200 Hans Hagen wrote: > On 7/24/2017 1:40 AM, Aditya Mahajan wrote: > > Hi, > > > > Is it possible to set pen width using properties(...)? The > > following does not work (the color is set, but not the pen width): > > > > \starttext > >

Re: [NTG-context] Metafun: setting pen size in properties

2017-07-24 Thread Hans Hagen
On 7/24/2017 1:40 AM, Aditya Mahajan wrote: Hi, Is it possible to set pen width using properties(...)? The following does not work (the color is set, but not the pen width): \starttext \startMPcode property p[] ; p[1] := properties(withcolor red withpen pencircle scaled 1bp); p[2] :=

Re: [NTG-context] Metafun: setting pen size in properties

2017-07-23 Thread Alan Braslau
withproperties is an experimental, metafun extension that appears to cover color and pre/postscripts. It could be extended to cover withpen, etc. Look at mp-mplib.mkiv. properties() returns an image object that can hold many things. The graph package does similar tricks. Alan On Sun, 23 Jul

[NTG-context] Metafun: setting pen size in properties

2017-07-23 Thread Aditya Mahajan
Hi, Is it possible to set pen width using properties(...)? The following does not work (the color is set, but not the pen width): \starttext \startMPcode property p[] ; p[1] := properties(withcolor red withpen pencircle scaled 1bp); p[2] := properties(withcolor blue withpen pencircle scaled

Re: [NTG-context] Creating SVG: using MetaFun, exporting proper units, conversion to DXF

2017-02-16 Thread Mojca Miklavec
On 16 February 2017 at 21:07, William Adams wrote: > Another option here would be to use a tool which directly accepts SVGs --- > one free/opensource tool for that is PartKAM/MakerCAM. > > My apologies for the late response --- investigating this sort of thing > myself, though I'll likely be using

Re: [NTG-context] Creating SVG: using MetaFun, exporting proper units, conversion to DXF

2017-02-16 Thread William Adams
t;>>> metapost -> svg -> dxf -> g-code >>>> for the first time. >>>> >>>> I have a few questions. >>>> >>>> (1) I love Hans' shortcuts in metafun, but I seem to remember that >>>> things >>>>

Re: [NTG-context] Customize a table with Metafun

2017-02-15 Thread Fabrice Couvreur
Hi Lutz, Thank you Fabrice 2017-02-14 17:04 GMT+01:00 Lutz Haseloff : > linecap:=butt ; > > > Am 14. Februar 2017 16:53:04 MEZ schrieb Fabrice Couvreur < > fabrice1.couvr...@gmail.com>: >> >> Hello, >> In the code below, the red vertical line extends beyond the edges of

Re: [NTG-context] Customize a table with Metafun

2017-02-14 Thread Lutz Haseloff
linecap:=butt ; Am 14. Februar 2017 16:53:04 MEZ schrieb Fabrice Couvreur : >Hello, >In the code below, the red vertical line extends beyond the edges of >the >cell. >Thank you >Fabrice > >\startuniqueMPgraphic{Vertical} > > linecap:=squared ; > path p ; p :=

[NTG-context] Customize a table with Metafun

2017-02-14 Thread Fabrice Couvreur
Hello, In the code below, the red vertical line extends beyond the edges of the cell. Thank you Fabrice \startuniqueMPgraphic{Vertical} linecap:=squared ; path p ; p := unitsquare xyscaled (OverlayWidth,OverlayHeight) ; drawoptions (withpen pencircle withcolor \MPcolor{red}) ; draw

Re: [NTG-context] sqrt(3)/2 with metafun

2017-02-02 Thread Fabrice Couvreur
Hi Michael, Thanks, it's ok. Fabrice 2017-02-02 22:02 GMT+01:00 Rogers, Michael K : > This seems to work in place of 0.866cm: sqrt(3)/2*cm > > Michael > > On Feb 2, 2017, at 3:54 PM, Fabrice Couvreur > wrote: > > Hello, > I wanted to use sqrt(3)/2

Re: [NTG-context] sqrt(3)/2 with metafun

2017-02-02 Thread Rogers, Michael K
This seems to work in place of 0.866cm: sqrt(3)/2*cm Michael On Feb 2, 2017, at 3:54 PM, Fabrice Couvreur > wrote: Hello, I wanted to use sqrt(3)/2 but without success. Instead, I replaced this value with an approximate value

[NTG-context] sqrt(3)/2 with metafun

2017-02-02 Thread Fabrice Couvreur
Hello, I wanted to use sqrt(3)/2 but without success. Instead, I replaced this value with an approximate value 0.866 How should it be done ? Thank you Fabrice \starttext \startMPcode draw fullcircle scaled 1cm withcolor magenta ; draw fullcircle scaled 1cm shifted (1cm,0) withcolor

Re: [NTG-context] Randomize control points in metapost/metafun?

2016-08-01 Thread Hans Hagen
On 8/1/2016 12:47 PM, Mikael P. Sundqvist wrote: Wow! That was fast! I just updated and it indeed works as expected. I hate to ask another thing when I just got this fast and nice help, but is there also a way to change the control points in such a way that no _new_ sharp corners occur?

Re: [NTG-context] Randomize control points in metapost/metafun?

2016-08-01 Thread Mikael P. Sundqvist
On Mon, Aug 1, 2016 at 10:12 AM, Hans Hagen wrote: > On 8/1/2016 8:03 AM, Mikael P. Sundqvist wrote: >> >> Hi! >> >> I look for a way to randomize control points of a path, leaving the >> coordinates themselves untouched. >> >> The reason is the following: I want to draw (for

Re: [NTG-context] Randomize control points in metapost/metafun?

2016-08-01 Thread Hans Hagen
On 8/1/2016 8:03 AM, Mikael P. Sundqvist wrote: Hi! I look for a way to randomize control points of a path, leaving the coordinates themselves untouched. The reason is the following: I want to draw (for example) a circle with a triangle inside, and I want them to look slightly randomized. If I

[NTG-context] Randomize control points in metapost/metafun?

2016-08-01 Thread Mikael P. Sundqvist
Hi! I look for a way to randomize control points of a path, leaving the coordinates themselves untouched. The reason is the following: I want to draw (for example) a circle with a triangle inside, and I want them to look slightly randomized. If I do (see attached pdf for a typical result of

Re: [NTG-context] Optimize code to create a environnementt with Metafun ?

2016-07-28 Thread Jean-Pierre Delange
This frame seems very nice in order to use it as a summary, or a chapter's conclusion. Thank you Fabrice, Wolfgang and Dalyoung ! Le 28/07/2016 à 15:36, Wolfgang Schuster a écrit : Jeong Dal 28. Juli 2016 um 15:17 Dear Fabrice and Wolfgang, I tried the following code

Re: [NTG-context] Optimize code to create a environnementt with Metafun ?

2016-07-28 Thread Jeong Dal
Dear Wolfgang, Thank you for the correction, It works fine. I couldn’t see extra ‘m’ when I check. Thanks again. Best regards, Dalyoung ___ If your question is of interest to others as well, please add an entry to

Re: [NTG-context] Optimize code to create a environnementt with Metafun ?

2016-07-28 Thread Wolfgang Schuster
Jeong Dal 28. Juli 2016 um 15:17 Dear Fabrice and Wolfgang, I tried the following code of yours, but I got “! undefined control sequence” error. Would you please tell me where I should to correct? Thank you so much, Best regards, Dalyoung %%%

Re: [NTG-context] Optimize code to create a environnementt with Metafun ?

2016-07-28 Thread Jeong Dal
Dear Fabrice and Wolfgang, I tried the following code of yours, but I got “! undefined control sequence” error. Would you please tell me where I should to correct? Thank you so much, Best regards, Dalyoung %%% \setupbodyfont[pagella,11pt] \setupcolors[state=start]

Re: [NTG-context] Optimize code to create a environnementt with Metafun ?

2016-07-26 Thread Fabrice Couvreur
Hi Wolfgang Thanks once again ! \startMyFrame[Title=Thanks ] \input knuth \stopMyFrame \startMyFrame[Title=once again !] \input knuth \stopMyFrame Fabrice 2016-07-26 21:49 GMT+02:00 Wolfgang Schuster : > Fabrice Couvreur > 26. Juli

Re: [NTG-context] Optimize code to create a environnementt with Metafun ?

2016-07-26 Thread Wolfgang Schuster
Fabrice Couvreur 26. Juli 2016 um 20:21 Hi Hans, I think I was not very clear. Title first framed : Hans Title second framed : Hagen You can pass a title to the optional framedtext argument (use camel case to avoid using existing key names) and access

Re: [NTG-context] Optimize code to create a environnementt with Metafun ?

2016-07-26 Thread Fabrice Couvreur
Pgraphic >> >> \defineoverlay >> [MyFrame] >> [\useMPgraphic{MyFrame}] >> >> \starttext >> >> >> \startSomeText{SomeText1} >> \input knuth >> \stopSomeText >> >> \startSomeText{SomeText2} >> \input knuth >> \stopSom

Re: [NTG-context] Optimize code to create a environnementt with Metafun ?

2016-07-26 Thread Hans Hagen
On 7/26/2016 2:20 PM, Fabrice Couvreur wrote: Hi Hans, So the code is "perfect"? : =) typography? sure, but more a discussion topic at the ctx meeting Seriously, where can we read the conference proceedings? such things don't end up in proceedings ... btw, it's those (and other)

Re: [NTG-context] Optimize code to create a environnementt with Metafun ?

2016-07-26 Thread Hans Hagen
...@wxs.nl>>: On 7/26/2016 10:18 AM, Fabrice Couvreur wrote: Hello, Hans and Wolfgang really helped me to create new environments with Metafun. I think Hans continuous development Metafun. So my question is simple: can we optimize this code?

Re: [NTG-context] Optimize code to create a environnementt with Metafun ?

2016-07-26 Thread Fabrice Couvreur
and Wolfgang really helped me to create new environments with >> Metafun. >> I think Hans continuous development Metafun. So my question is simple: >> can we optimize this code? >> > > in what sense ... > > speed? not much to gain > > correctness? mayhe use "

Re: [NTG-context] Optimize code to create a environnementt with Metafun ?

2016-07-26 Thread Fabrice Couvreur
r wrote: > >> Hello, >> Hans and Wolfgang really helped me to create new environments with >> Metafun. >> I think Hans continuous development Metafun. So my question is simple: >> can we optimize this code? >> > > in what sense ... > > speed

Re: [NTG-context] Optimize code to create a environnementt with Metafun ?

2016-07-26 Thread Hans Hagen
On 7/26/2016 10:18 AM, Fabrice Couvreur wrote: Hello, Hans and Wolfgang really helped me to create new environments with Metafun. I think Hans continuous development Metafun. So my question is simple: can we optimize this code? in what sense ... speed? not much to gain correctness? mayhe use

[NTG-context] Optimize code to create a environnementt with Metafun ?

2016-07-26 Thread Fabrice Couvreur
Hello, Hans and Wolfgang really helped me to create new environments with Metafun. I think Hans continuous development Metafun. So my question is simple: can we optimize this code ? Thanks, Fabrice \setupbodyfont[pagella,11pt] \setupcolors[state=start] \defineframedtext [MyDefinition

Re: [NTG-context] Place a text over an arrow (Metafun)

2016-07-25 Thread Otared Kavian
> On 25 Jul 2016, at 11:47, Fabrice Couvreur > wrote: > > Hi Hans and Otared, > I did not know this module (Context is so rich !), it's great ! > thanks > Fabrice Indeed… ConTeXt is so rich! Probably I use only one or two per cent of its capabilities, but still I

Re: [NTG-context] Place a text over an arrow (Metafun)

2016-07-25 Thread Fabrice Couvreur
Hi Hans and Otared, I did not know this module (Context is so rich !), it's great ! thanks Fabrice 2016-07-25 11:29 GMT+02:00 Otared Kavian : > Hi Fabrice, > > Do you know the step charts module in ConTeXt? I guess you can achieve > what you want as in the example below (sorry,

Re: [NTG-context] Place a text over an arrow (Metafun)

2016-07-25 Thread Otared Kavian
Hi Fabrice, Do you know the step charts module in ConTeXt? I guess you can achieve what you want as in the example below (sorry, I did not took your example, I am just copying an example from my archives…). %% \usemodule[steps] \starttext Pour voir que la composée de deux fonctions

Re: [NTG-context] Place a text over an arrow (Metafun)

2016-07-25 Thread Hans Hagen
On 7/25/2016 10:36 AM, Fabrice Couvreur wrote: Hello, My way is not very elegant but I would do this: Formula arrow text Formula arrow text Formula arrow text Formula #

[NTG-context] Place a text over an arrow (Metafun)

2016-07-25 Thread Fabrice Couvreur
Hello, My way is not very elegant but I would do this: Formula arrow text Formula arrow text Formula arrow text Formula # \startuseMPgraphic{MyArrow} path p ;

Re: [NTG-context] Remove files that are not needed (Metafun)

2016-07-12 Thread Fabrice Couvreur
Thanks Wolfgang and Aditya Fabrice 2016-07-12 21:04 GMT+02:00 Wolfgang Schuster : > Fabrice Couvreur > 12. Juli 2016 um 20:41 > > How filling the number ? > > \startusableMPgraphic{NumberHead} > draw outlinetext.b >

Re: [NTG-context] Remove files that are not needed (Metafun)

2016-07-12 Thread Wolfgang Schuster
Fabrice Couvreur 12. Juli 2016 um 20:41 How filling the number ? \startusableMPgraphic{NumberHead} draw outlinetext.b ("\bf\namedheadnumber{chapter}") (withcolor "lightgray") (withpen pencircle scaled .1) ysized 60pt ;

Re: [NTG-context] Remove files that are not needed (Metafun)

2016-07-12 Thread Aditya Mahajan
On Tue, 12 Jul 2016, Fabrice Couvreur wrote: this is more modern (the method, not the font): How filling the number ? \starttext \startMPpage draw outlinetext.d ("Hello") (withpen pencircle scaled 0.1bp withcolor red) ysized 60pt ; \stopMPpage

Re: [NTG-context] Remove files that are not needed (Metafun)

2016-07-12 Thread Fabrice Couvreur
> > this is more modern (the method, not the font): How filling the number ? 2016-07-12 17:56 GMT+02:00 Hans Hagen : > On 7/12/2016 5:21 PM, Fabrice Couvreur wrote: > >> Compiling this file returns files ntg46-mpgraph.log ntg46-mpgraph.tex >> ntg46-mpgraph.mpy ntg46-mpgraph.pdf

Re: [NTG-context] Remove files that are not needed (Metafun)

2016-07-12 Thread Hans Hagen
On 7/12/2016 5:21 PM, Fabrice Couvreur wrote: Compiling this file returns files ntg46-mpgraph.log ntg46-mpgraph.tex ntg46-mpgraph.mpy ntg46-mpgraph.pdf ntg46-mpgraph.tuc this is more modern (the method, not the font): \startusableMPgraphic{NumberHead} draw outlinetext.d

Re: [NTG-context] Remove files that are not needed (Metafun)

2016-07-12 Thread Fabrice Couvreur
Compiling this file returns files ntg46-mpgraph.log ntg46-mpgraph.tex ntg46-mpgraph.mpy ntg46-mpgraph.pdf ntg46-mpgraph.tuc % macros=mkvi \setuppagenumbering[location=footer] \startusableMPgraphic{NumberHead} picture r ; r := image ( graphictext

Re: [NTG-context] Remove files that are not needed (Metafun)

2016-07-12 Thread Hans Hagen
On 7/12/2016 3:30 PM, Fabrice Couvreur wrote: Thank youfor the information, but it remains to delete the files ... mpgraph.log fwiw, mkiv normally doesn't have such files Hans - Hans

Re: [NTG-context] Remove files that are not needed (Metafun)

2016-07-12 Thread Fabrice Couvreur
gt; > On 12 jul. 2016, at 12:44, Fabrice Couvreur <fabrice1.couvr...@gmail.com> > wrote: > > > > > > Hello, > > One of my command uses a macro build from Metafun. The compilation > generates many files. > > How to delete files in the formats mpgraph.log, mpgra

Re: [NTG-context] Remove files that are not needed (Metafun)

2016-07-12 Thread Willi Egger
context —purgeall is your friend. The pdfs you will have to delete manually. Willi > On 12 jul. 2016, at 12:44, Fabrice Couvreur <fabrice1.couvr...@gmail.com> > wrote: > > > Hello, > One of my command uses a macro build from Metafun. The compilation generates >

[NTG-context] Remove files that are not needed (Metafun)

2016-07-12 Thread Fabrice Couvreur
Hello, One of my command uses a macro build from Metafun. The compilation generates many files. How to delete files in the formats mpgraph.log, mpgraph.mpy, mpgraph.pdf, mpgraph.tex and mpgraph.tuc ? thank you, Fabrice

Re: [NTG-context] Creating SVG: using MetaFun, exporting proper units, conversion to DXF

2016-06-30 Thread Hans Hagen
decided to try to use the super ugly route with metapost -> svg -> dxf -> g-code for the first time. I have a few questions. (1) I love Hans' shortcuts in metafun, but I seem to remember that things like input metafun; or perhaps input mp-tool; used to work, so that I d

Re: [NTG-context] Creating SVG: using MetaFun, exporting proper units, conversion to DXF

2016-06-29 Thread Jan Tosovsky
On 2016-06-29 Mojca Miklavec wrote: > > I want to play with CNC and don't yet have any experience with CAD > software (nor the licence for the expensive ones) other than perhaps > some Blender, so I decided to try to use the super ugly route with > metapost -> svg -> dxf -> g-code for the first

Re: [NTG-context] Creating SVG: using MetaFun, exporting proper units, conversion to DXF

2016-06-29 Thread Mojca Miklavec
ome Blender, so I decided to try to use the super ugly route with >> metapost -> svg -> dxf -> g-code >> for the first time. >> >> I have a few questions. >> >> (1) I love Hans' shortcuts in metafun, but I seem to remember that things >> like >&

Re: [NTG-context] Creating SVG: using MetaFun, exporting proper units, conversion to DXF

2016-06-29 Thread Hans Hagen
t; g-code for the first time. I have a few questions. (1) I love Hans' shortcuts in metafun, but I seem to remember that things like input metafun; or perhaps input mp-tool; used to work, so that I don't have to remember to use mpost -mem=metafun my-drawings.mp when compiling the graph

[NTG-context] Creating SVG: using MetaFun, exporting proper units, conversion to DXF

2016-06-29 Thread Mojca Miklavec
s. (1) I love Hans' shortcuts in metafun, but I seem to remember that things like input metafun; or perhaps input mp-tool; used to work, so that I don't have to remember to use mpost -mem=metafun my-drawings.mp when compiling the graphics. Did the method with "input" ever work

Re: [NTG-context] metafun

2016-03-24 Thread Hans Hagen
On 3/24/2016 6:24 PM, Piotr Kopszak wrote: P.S. For your conveniance, the minimal example: \startMPpositiongraphic{mypos:arrow} pair c[] ; initialize_box(\MPpos{\MPvar{self}}); c[1] := cxy ; initialize_box(\MPpos{\MPvar{to}}); c[2] := cxy ; drawarrow c[1] -- c[2]

Re: [NTG-context] metafun

2016-03-24 Thread luigi scarso
}{arrow}. > As with most things in \CONTEXT, marking these words is separated > from declaring what to do with those words. This paragraph is keyed > in as: > > \stoptext > > > context testsuite http://www.pragma-ade.nl/context/latest/cont-tst.7z doc/context/tests/mkiv/metafun/

Re: [NTG-context] metafun

2016-03-24 Thread Piotr Kopszak
P.S. For your conveniance, the minimal example: \startMPpositiongraphic{mypos:arrow} pair c[] ; initialize_box(\MPpos{\MPvar{self}}); c[1] := cxy ; initialize_box(\MPpos{\MPvar{to}}); c[2] := cxy ; drawarrow c[1] -- c[2] withpen pencircle scaled 2bp ; \stopMPpositiongraphic

Re: [NTG-context] metafun

2016-03-24 Thread Piotr Kopszak
Hello list, The solution shown here no longer works with recent beta (indeed, it probably ceased to work some time ago). How should it be corrected? Best Piotr 2010-10-24 0:14 GMT+02:00 Aditya Mahajan : > On Sat, 23 Oct 2010, Herbert Voss wrote: > >> It is a hard job to

Re: [NTG-context] Loop and graphictext (Metafun)

2015-10-05 Thread Hans Hagen
On 10/5/2015 6:28 PM, Fabrice Couvreur wrote: Hi, I tried to write a loop to display the title, but it does not. How to do ? Thank you, Fabrice \setuppagenumbering[location=] \setupcolors [state=start] \definecolor[pagecolor][s=.6] \definecolor[textcolor][r=.6] \startMPinclusions

Re: [NTG-context] Loop and graphictext (Metafun)

2015-10-05 Thread Fabrice Couvreur
Hi Hans, In fact, as the loop does not work, I have not added to the code. It's true that your solution is simple ! Thank you, Fabrice 2015-10-05 19:48 GMT+02:00 Hans Hagen : > On 10/5/2015 6:28 PM, Fabrice Couvreur wrote: > >> Hi, >> I tried to write a loop to display the title,

Re: [NTG-context] Loop and graphictext (Metafun)

2015-10-05 Thread Fabrice Couvreur
\startmidaligned \startMPcode ... \stopMPcode \stopmidaligned 2015-10-05 20:31 GMT+02:00 Fabrice Couvreur : > How to center the title ? > > 2015-10-05 20:11 GMT+02:00 Fabrice Couvreur : > >> Hi Hans, >> In fact, as the loop does not

Re: [NTG-context] Loop and graphictext (Metafun)

2015-10-05 Thread Fabrice Couvreur
How to center the title ? 2015-10-05 20:11 GMT+02:00 Fabrice Couvreur : > Hi Hans, > In fact, as the loop does not work, I have not added to the code. > It's true that your solution is simple ! > Thank you, > Fabrice > > 2015-10-05 19:48 GMT+02:00 Hans Hagen

[NTG-context] Loop and graphictext (Metafun)

2015-10-05 Thread Fabrice Couvreur
Hi, I tried to write a loop to display the title, but it does not. How to do ? Thank you, Fabrice \setuppagenumbering[location=] \setupcolors [state=start] \definecolor[pagecolor][s=.6] \definecolor[textcolor][r=.6] \startMPinclusions color pagecolor ; pagecolor := \MPcolor{pagecolor} ;

Re: [NTG-context] Left border of a rectangle (Metafun)

2015-08-30 Thread Otared Kavian
Hi Fabrice, Your code works if you add setbounds currentpicture to OverlayBox ; Indeed with this Metapost determines the boundaries of the rectangle of which you draw the left side. Best regards: OK On 30 Aug 2015, at 09:50, Fabrice Couvreur fabrice1.couvr...@gmail.com wrote:

[NTG-context] Left border of a rectangle (Metafun)

2015-08-29 Thread Fabrice Couvreur
Hi, I want to draw the left border of the rectangle, but it is drawn in the middle. Why ? Thank you, Fabrice \setupcolors[state=start] \definecolor[MyColorA][c=0.3, m=0.00, y=0.00, k=0.05] \defineoverlay [Funny] [\useMPgraphic{Funny}] \startuseMPgraphic{Funny} interim linecap :=

Re: [NTG-context] Left border of a rectangle (Metafun)

2015-08-29 Thread Otared Kavian
Hi Fabrice, You can also use the following simpler method: % begin leftframe.tex \definecolor[MyColorA][c=0.3, m=0.00, y=0.00, k=0.05] \defineframedtext [MethodeB] [before={\blank}, after={\blank}, frame=off, leftframe=on, framecolor=MyColorA, rulethickness=6.5pt,

Re: [NTG-context] Left border of a rectangle (Metafun)

2015-08-29 Thread Hans Hagen
On 8/29/2015 1:11 PM, Otared Kavian wrote: Hi fabrice, I dont’t know whether this the best solution, but you can use the following definition of the MPgraphic Funny: \startuseMPgraphic{Funny} interim linecap := butt ; path p ; p := unitsquare xyscaled

Re: [NTG-context] Left border of a rectangle (Metafun)

2015-08-29 Thread Otared Kavian
Hi fabrice, I dont’t know whether this the best solution, but you can use the following definition of the MPgraphic Funny: \startuseMPgraphic{Funny} interim linecap := butt ; path p ; p := unitsquare xyscaled (OverlayWidth,OverlayHeight) ; drawoptions (withpen pencircle scaled

Re: [NTG-context] About graphictext macro (Metafun)

2015-08-27 Thread Fabrice Couvreur
Hagen pra...@wxs.nl: On 8/26/2015 7:12 PM, Fabrice Couvreur wrote: Hi, I try to understand how this macro by testing a simple example. Why pdf file is empty? This question follows my question Cover page (Metafun) http://www.ntg.nl/pipermail/ntg-context/2015/083078.html Thank you

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