Re: [NTG-context] Metapost graphic in setupbackground

2019-02-08 Thread Marco Patzer
On Fri, 8 Feb 2019 12:36:16 +0100 "Jan U. Hasecke" wrote: > \definelayer[kreisbackground][width=70mm,height=70mm] \definelayer[kreisbackground][width=70mm,height=70mm, state=repeat] start: layer appears only on the current page stop : layer doesn't show up repeat : layer prints on all

[NTG-context] Metapost graphic in setupbackground

2019-02-08 Thread Jan U. Hasecke
Hi all, I make my first steps with Metapost. I would like to set the background of all pages to a Metapost graphic. But only the first page has the defined background. I also tried with \startuseMPgraphic with no success --- mwe --- \startreusableMPgraphic{kreis} draw fullcircle scaled

Re: [NTG-context] About the macro path intersectionpoint path with Metapost

2019-02-04 Thread Fabrice L
Hi, I guess your problem is to find the two points of intersection between p and r ? If so, the problem is that intersectionpoint does return the same intersection when there is several, as it is the case here. So a quick solution that you can do is to find intersections for the two part. A drawin

Re: [NTG-context] Show the letters of the alphabet with a loop (Metapost)

2019-02-04 Thread Fabrice Couvreur
Hi, @ Henri Thank you @ Alan How to use it in my code ? Thank you Fabrice Le dim. 3 févr. 2019 à 21:26, Alan Braslau a écrit : > On Mon, 4 Feb 2019 09:19:26 +1300 > Henri Menke wrote: > > > Use the infont operator. > > Easier yet, the string can contain the font switch \bf: > > draw textext("\b

Re: [NTG-context] About the macro path intersectionpoint path with Metapost

2019-02-03 Thread Jeong Dal
Dear Fabrice, Metapost is great for drawiang figures but it is not easy for me to use it. > b:= fullcircle scaled 2cm shifted (0,-3cm); > pair A, B ; > A:= p intersectionpoint r ; > B:= p intersectionpoint r ; > path u ; > u:= A--B--cycle ; A and B are the same point.

Re: [NTG-context] Show the letters of the alphabet with a loop (Metapost)

2019-02-03 Thread Alan Braslau
On Mon, 4 Feb 2019 09:19:26 +1300 Henri Menke wrote: > Use the infont operator. Easier yet, the string can contain the font switch \bf: draw textext("\bf "&char(i)) ; ___ If your question is of interest to others a

Re: [NTG-context] Show the letters of the alphabet with a loop (Metapost)

2019-02-03 Thread Henri Menke
On 4/02/19 12:50 AM, Fabrice Couvreur wrote: > Sorry Henri, but I still have a question : how to have the letters in bold > type ? Use the infont operator. That info is a bit hidden in “2.10 Analyzing pictures” of the MetaFun manual. \starttext \startMPcode for i=0 upto 3 : for j=0 upto

Re: [NTG-context] Show the letters of the alphabet with a loop (Metapost)

2019-02-03 Thread Fabrice Couvreur
Sorry Henri, but I still have a question : how to have the letters in bold type ? Thank you. Fabrice Le dim. 3 févr. 2019 à 10:12, Fabrice Couvreur a écrit : > Hi Henry > Thank you for everything. > Fabrice > > Le sam. 2 févr. 2019 à 20:58, Henri Menke a écrit : > >> On 2/2/19 11:49 PM, Fabrice

[NTG-context] About the macro path intersectionpoint path with Metapost

2019-02-03 Thread Fabrice Couvreur
Hi, I would like to reproduce the attached figure. My problem is to create the points of intersection between the circles. It seems that my approach is not the right one. Thank you. Fabrice \starttext \startMPcode path p, q, r, b ; p:= fullcircle scaled 6cm ; q:= fullcircle scaled 4cm shifte

Re: [NTG-context] Show the letters of the alphabet with a loop (Metapost)

2019-02-03 Thread Fabrice Couvreur
Hi Henry Thank you for everything. Fabrice Le sam. 2 févr. 2019 à 20:58, Henri Menke a écrit : > On 2/2/19 11:49 PM, Fabrice Couvreur wrote: > > Hi Henri, > > Great ! I would also like these letters to be randomly colored. > > You should play with randomseed, the starting color (here white) and

Re: [NTG-context] Show the letters of the alphabet with a loop (Metapost)

2019-02-02 Thread Henri Menke
On 2/2/19 11:49 PM, Fabrice Couvreur wrote: > Hi Henri, > Great ! I would also like these letters to be randomly colored. You should play with randomseed, the starting color (here white) and the randomization amplitude (1,1,1). You mileage may vary. \starttext \startMPcode for i=0 upto 3 :

Re: [NTG-context] Show the letters of the alphabet with a loop (Metapost)

2019-02-02 Thread Fabrice Couvreur
Hi Henri, Great ! I would also like these letters to be randomly colored. Thank you. Fabrice Le sam. 2 févr. 2019 à 11:16, Henri Menke a écrit : > On 2/2/19 10:47 PM, Fabrice Couvreur wrote: > > The idea is to display the first 25 letters of the alphabet. The code > below > > shows the letter a

Re: [NTG-context] Show the letters of the alphabet with a loop (Metapost)

2019-02-02 Thread Henri Menke
On 2/2/19 10:47 PM, Fabrice Couvreur wrote: > The idea is to display the first 25 letters of the alphabet. The code below > shows the letter a to show what I want to do. > Thank you. > Fabrice Use char and ASCII. \starttext \startMPcode for i=0 upto 3 : for j=0 upto 3 : draw un

[NTG-context] Show the letters of the alphabet with a loop (Metapost)

2019-02-02 Thread Fabrice Couvreur
The idea is to display the first 25 letters of the alphabet. The code below shows the letter a to show what I want to do. Thank you. Fabrice \starttext \startMPcode for i=0 upto 3 : for j=0 upto 3 : draw unitsquare scaled 4cm shifted (4*i*cm,4*j*cm) ; endfor ; endfor ;

Re: [NTG-context] ! Declared variable conflicts with previous vardef [Metapost]

2019-01-03 Thread Taco Hoekwater
ction z := point > 3.6 of p ;) It works because of the "pair z” statement. Attempted explanation: Metapost variable names are built up hierarchically. When you say “path p” or “color V.Q” or “numeric z[]” or “vardef z”, it changes the type of just the last segment, not other segments

Re: [NTG-context] ! Declared variable conflicts with previous vardef [Metapost]

2019-01-03 Thread Fabrice Couvreur
\stopMPpage \stoptext Le jeu. 3 janv. 2019 à 07:12, Alan Braslau a écrit : > On Thu, 3 Jan 2019 16:22:06 +1300 (UTC) > Henri Menke wrote: > > > z is a MetaPost intrinsic, something along the lines of > > > > vardef z@#=(x@#,y@#) enddef; > > >

Re: [NTG-context] ! Declared variable conflicts with previous vardef [Metapost]

2019-01-02 Thread Alan Braslau
On Thu, 3 Jan 2019 16:22:06 +1300 (UTC) Henri Menke wrote: > z is a MetaPost intrinsic, something along the lines of > > vardef z@#=(x@#,y@#) enddef; > > so you can't use the same name for a pair. Actually you can simply > delete the declaration > >

Re: [NTG-context] ! Declared variable conflicts with previous vardef [Metapost]

2019-01-02 Thread Henri Menke
z is a MetaPost intrinsic, something along the lines of vardef z@#=(x@#,y@#) enddef; so you can't use the same name for a pair. Actually you can simply delete the declaration pair z[]; from your file and it will work as intended. If you insist on using your own declaration of z,

[NTG-context] ! Declared variable conflicts with previous vardef [Metapost]

2019-01-02 Thread Fabrice Couvreur
Hi, I have a problem compiling this file. Thanks. Fabrice ## test file \starttext \setupbodyfont [pagella,9pt] \startMPpage[offset=2pt] path p, q, r, b ; pair z[]; p := unitsquare xyscaled (9cm,5cm) ; z[0] = (2cm,0cm) ; z[1] = (2cm,2cm)

Re: [NTG-context] Question about defining a path with Metapost

2018-12-20 Thread Alan Braslau
On Fri, 21 Dec 2018 00:17:25 +0100 Fabrice Couvreur wrote: > Why does the definition of the r path that Hans proposed give the > same result as what I propose ? Look at the definition of bottomboundary in mp-tool.mpiv Use whatever you prefer. You might also be interested in the modification tha

[NTG-context] Question about defining a path with Metapost

2018-12-20 Thread Fabrice Couvreur
Hi, I need to make a figure with shaded areas and I found this code proposed by Hans. Why does the definition of the r path that Hans proposed give the same result as what I propose ? Thank you. Fabrice \starttext \startMPpage[offset=2pt] path p, q, r ; pair z ; p := unitsquare scaled 4c

Re: [NTG-context] Scale image in MetaPost, maintaining aspect ratio

2018-07-08 Thread Alan Braslau
extensive and complicated MP graphics, this yields a huge gain. Hans is at present working out all side-effects (such as recursive MP/TeX/lua calls) and is cleaning up some old ways of doing things that date from mkii. This might seem somewhat minor but is really exciting for those who use a lot of g

Re: [NTG-context] Scale image in MetaPost, maintaining aspect ratio

2018-07-08 Thread Hans Hagen
On 7/8/2018 11:02 AM, Marco Patzer wrote: On Sun, 8 Jul 2018 10:39:52 +0200 Hans Hagen wrote: On 7/8/2018 1:45 AM, Marco Patzer wrote: On Sat, 7 Jul 2018 14:27:38 -0600 Alan Braslau wrote: For "historic" reasons, draw externalfigure "cow" scaled 5cm ; normalizes the figure to a sq

Re: [NTG-context] Scale image in MetaPost, maintaining aspect ratio

2018-07-08 Thread Marco Patzer
On Sun, 8 Jul 2018 10:39:52 +0200 Hans Hagen wrote: > On 7/8/2018 1:45 AM, Marco Patzer wrote: > > On Sat, 7 Jul 2018 14:27:38 -0600 > > Alan Braslau wrote: > > > >> For "historic" reasons, > >> draw externalfigure "cow" scaled 5cm ; > >> normalizes the figure to a square. This will not

Re: [NTG-context] Scale image in MetaPost, maintaining aspect ratio

2018-07-08 Thread Hans Hagen
On 7/8/2018 1:45 AM, Marco Patzer wrote: On Sat, 7 Jul 2018 14:27:38 -0600 Alan Braslau wrote: For "historic" reasons, draw externalfigure "cow" scaled 5cm ; normalizes the figure to a square. This will not be changed as it is a very old feature of MetaFun. The solution is draw rawt

Re: [NTG-context] Scale image in MetaPost, maintaining aspect ratio

2018-07-07 Thread Marco Patzer
On Sat, 7 Jul 2018 14:27:38 -0600 Alan Braslau wrote: > For "historic" reasons, > draw externalfigure "cow" scaled 5cm ; > normalizes the figure to a square. This will not be changed as it is a > very old feature of MetaFun. > > The solution is > draw rawtextext("\externalfigure[cow]") x

Re: [NTG-context] Scale image in MetaPost, maintaining aspect ratio

2018-07-07 Thread Marco Patzer
On Sat, 7 Jul 2018 22:27:51 +0200 Hans Hagen wrote: > On 7/7/2018 8:58 PM, Marco Patzer wrote: > > Hi! > > > > How to scale an image in MetaPost, maintaining the aspect ratio > > (without specifying the height explicitly)? > > > > Example: > >

Re: [NTG-context] Scale image in MetaPost, maintaining aspect ratio

2018-07-07 Thread Hans Hagen
On 7/7/2018 8:58 PM, Marco Patzer wrote: Hi! How to scale an image in MetaPost, maintaining the aspect ratio (without specifying the height explicitly)? Example: \setupexternalfigures [location=default] \starttext \externalfigure [cow][width=5cm] \startMPcode draw externalfigure

Re: [NTG-context] Scale image in MetaPost, maintaining aspect ratio

2018-07-07 Thread Alan Braslau
On Sat, 7 Jul 2018 20:58:40 +0200 Marco Patzer wrote: > Hi! > > How to scale an image in MetaPost, maintaining the aspect ratio > (without specifying the height explicitly)? > > Example: > > \setupexternalfigures [location=default] > \starttext > \

[NTG-context] Scale image in MetaPost, maintaining aspect ratio

2018-07-07 Thread Marco Patzer
Hi! How to scale an image in MetaPost, maintaining the aspect ratio (without specifying the height explicitly)? Example: \setupexternalfigures [location=default] \starttext \externalfigure [cow][width=5cm] \startMPcode draw externalfigure "cow" scaled 5cm; \stopMPcode

Re: [NTG-context] MetaPost shading broken with latest beta

2018-06-24 Thread Hans Hagen
On 6/24/2018 12:17 AM, Adam Reviczky wrote: Hi, Using the shading function in a metapost image the whole page is filled in instead of the figure that defines it. Minimal example as from the metafun manual 8.3.3 (http://www.pragma-ade.nl/general/manuals/metafun-p.pdf): \starttext \startMPcode

[NTG-context] MetaPost shading broken with latest beta

2018-06-23 Thread Akira Kakuto
With this, I get a full A4 page with the shading colors. This worked until the beta 2018-06-22 16:02 and the desired output is shown when using live.contextgarden.net. Even in the previous mtx-context | current version: 2018.06.22 15:55 I get a full A4 page with the shading colors if I use L

[NTG-context] MetaPost shading broken with latest beta

2018-06-23 Thread Adam Reviczky
Hi, Using the shading function in a metapost image the whole page is filled in instead of the figure that defines it. Minimal example as from the metafun manual 8.3.3 (http://www.pragma-ade.nl/general/manuals/metafun-p.pdf): \starttext \startMPcode fill fullsquare xyscaled (1cm,1cm

Re: [NTG-context] Fatal error with followtokens (metapost)

2018-04-07 Thread Hans Hagen
On 4/7/2018 6:34 PM, Pablo Rodriguez wrote: On 04/07/2018 12:59 PM, Gerhard Kugler wrote: Hi, the code: - \mainlanguage[de] \enableregime[utf-8] In ConTeXt MkIV, UTF-8 is the default encoding for source files. The second line isn’t required. Just incase it helps, also i often see color

Re: [NTG-context] Fatal error with followtokens (metapost)

2018-04-07 Thread Pablo Rodriguez
On 04/07/2018 12:59 PM, Gerhard Kugler wrote: > Hi, > > the code: > > - > > \mainlanguage[de] > \enableregime[utf-8] In ConTeXt MkIV, UTF-8 is the default encoding for source files. The second line isn’t required. Just incase it helps, Pablo -- http://www.ousia.tk ___

Re: [NTG-context] Fatal error with followtokens (metapost)

2018-04-07 Thread Hans Hagen
On 4/7/2018 12:59 PM, Gerhard Kugler wrote: Hi, If change the content of the first followtokens the error disappears. i'll send you a patch - Hans Hagen | PRAGMA ADE Ridder

[NTG-context] Fatal error with followtokens (metapost)

2018-04-07 Thread Gerhard Kugler
Hi, the code: - \mainlanguage[de] \enableregime[utf-8] \useMPlibrary[txt] \starttext \setupbodyfont[big] \setupcolors[state=start] \setuplayout [topspace=192pt, backspace=48pt, cutspace=12pt, width=500pt, margin=0cm, rightedge=88pt, rightedgedistance=48pt, header=0cm, footer=0cm, heigh

Re: [NTG-context] Circled text in metapost

2018-04-04 Thread Gerhard Kugler
One question: How can I give the several half circle text lines the same origin (that of the circles)? Gerhard -- Gerhard Kugler Bensheim ___ If your question is of interest to others as well, please add an entry t

Re: [NTG-context] Circled text in metapost

2018-04-02 Thread Gerhard Kugler
On Mon, Apr 02, 2018 at 11:30:05AM -0600, Alan Braslau wrote: > This is very easy to do in MetaPost, but you should not expect the > mailing list to design your graphic for you. > You are right totally. It is not my expectation. I succeeded in programming several graphics in metapost in

Re: [NTG-context] Circled text in metapost

2018-04-02 Thread Alan Braslau
This is very easy to do in MetaPost, but you should not expect the mailing list to design your graphic for you. Alan On Mon, 2 Apr 2018 19:21:05 +0200 Gerhard Kugler wrote: > Perhaps it is better if I send the final graphic which I have > prorammed with the programming langguage "

Re: [NTG-context] Circled text in metapost

2018-04-02 Thread Gerhard Kugler
Perhaps it is better if I send the final graphic which I have prorammed with the programming langguage "logo". See attachment! The problem: it is pixel graphic. Gerhard On Mon, Apr 02, 2018 at 06:34:42PM +0200, Gerhard Kugler wrote: > Finally I want to place 8 (halfcircled) texts within 8 color

Re: [NTG-context] Circled text in metapost

2018-04-02 Thread Gerhard Kugler
Finally I want to place 8 (halfcircled) texts within 8 colores (full)rings. Your proposal places the second text outside of the circles. Gerhard On Mon, Apr 02, 2018 at 06:08:56PM +0200, Hans Hagen wrote: > On 4/2/2018 5:52 PM, Gerhard Kugler wrote: > >Thank you very much! > > > >And if I want t

Re: [NTG-context] Circled text in metapost

2018-04-02 Thread Hans Hagen
On 4/2/2018 5:52 PM, Gerhard Kugler wrote: Thank you very much! And if I want to place different text between the (half-)circles? \startuseMPgraphic{followtokens-1} path RotPath ; RotPath := halfcircle scaled 7cm rotated 180 ; for i=1 upto 6 : draw halfcircle scaled (i*cm) rota

Re: [NTG-context] Circled text in metapost

2018-04-02 Thread Gerhard Kugler
Thank you very much! And if I want to place different text between the (half-)circles? Gerhard On Mon, Apr 02, 2018 at 03:16:11PM +0200, Hans Hagen wrote: > \useMPlibrary[txt] > > \starttext > > \startuseMPgraphic{followtokens} > path RotPath ; RotPath := halfcircle scaled 7cm rotated 180

Re: [NTG-context] Circled text in metapost

2018-04-02 Thread Alan Braslau
On Mon, 2 Apr 2018 15:16:11 +0200 Hans Hagen wrote: > \useMPlibrary[txt] > > \starttext > > \startuseMPgraphic{followtokens} > path RotPath ; RotPath := halfcircle scaled 7cm rotated 180 ; > for i=1 upto 6 : > draw halfcircle scaled (i*cm) rotated 180 ; > endfor ; > \sto

Re: [NTG-context] Circled text in metapost

2018-04-02 Thread Hans Hagen
On 3/31/2018 7:22 PM, Gerhard Kugler wrote: Hi, my very slow proceedings are here: \useMPlibrary[txt] \starttext \setupbodyfont[pp1] \setupcolors[state=start] \setuplayout [topspace=192pt, backspace=48pt, cutspace=12pt, width=400pt, margin=0cm, rightedge=88pt, rightedgedistance=4

Re: [NTG-context] Circled text in metapost

2018-03-31 Thread Gerhard Kugler
Hi, my very slow proceedings are here: \useMPlibrary[txt] \starttext \setupbodyfont[pp1] \setupcolors[state=start] \setuplayout [topspace=192pt, backspace=48pt, cutspace=12pt, width=400pt, margin=0cm, rightedge=88pt, rightedgedistance=48pt, header=0cm, footer=0cm, height=400pt]

Re: [NTG-context] Circled text in metapost

2018-03-30 Thread Henri Menke
On Sat, 2018-03-31 at 12:22 +1300, Henri Menke wrote: > On Thu, 2018-03-29 at 18:05 +0200, Gerhard Kugler wrote: > > > > On Thu, Mar 29, 2018 at 07:11:50AM -0600, Alan Braslau wrote: > > > > > > > > > On Thu, 29 Mar 2018 12:43:56 +0200 > > > Gerhard Kugler wrote: > > > > > > > > > > > > > >

Re: [NTG-context] Circled text in metapost

2018-03-30 Thread Henri Menke
On Thu, 2018-03-29 at 18:05 +0200, Gerhard Kugler wrote: > On Thu, Mar 29, 2018 at 07:11:50AM -0600, Alan Braslau wrote: > > > > On Thu, 29 Mar 2018 12:43:56 +0200 > > Gerhard Kugler wrote: > > > > > > > > One misunderstanding made by my post: I want to write the text curved > > > as a (half-)c

Re: [NTG-context] Circled text in metapost

2018-03-30 Thread Gerhard Kugler
Thank you, this seems a very informative explanation for me, and now I will try to transpose it for my intention. Gerhard On Fri, Mar 30, 2018 at 08:44:23AM -0600, Alan Braslau wrote: > Hello, > > luatex includes the MetaPost library MPlib, so MetaPost code is called > and then i

Re: [NTG-context] Circled text in metapost

2018-03-30 Thread Alan Braslau
Hello, luatex includes the MetaPost library MPlib, so MetaPost code is called and then injected into the output stream. As a user, it is useful to know that MP is in fact called in two passes, thus twice, and this can have some unexpected consequences when not programmed cleanly. Global variable

Re: [NTG-context] Circled text in metapost

2018-03-30 Thread Gerhard Kugler
Hello, my problem is that in other programming langguages there is a main procedure which calls others. In metapost in the context of ConteXt I can use \starttext ... \stoptext or \startMPpage ... \stopMPpage or \beginfig ... \endfig And it seems not to be transparent how procedures are called

Re: [NTG-context] Circled text in metapost

2018-03-29 Thread Gerhard Kugler
On Thu, Mar 29, 2018 at 07:11:50AM -0600, Alan Braslau wrote: > On Thu, 29 Mar 2018 12:43:56 +0200 > Gerhard Kugler wrote: > > > One misunderstanding made by my post: I want to write the text curved > > as a (half-)circle. > > Take a look at the Metafun manual. > In the manual is an example on

Re: [NTG-context] Circled text in metapost

2018-03-29 Thread Alan Braslau
On Thu, 29 Mar 2018 12:43:56 +0200 Gerhard Kugler wrote: > One misunderstanding made by my post: I want to write the text curved > as a (half-)circle. Take a look at the Metafun manual. Alan ___ If your question is

Re: [NTG-context] Circled text in metapost

2018-03-29 Thread Gerhard Kugler
Thank you very much for these examples. The most important hints are given now. Perhaps I am able to apply them. One misunderstanding made by my post: I want to write the text curved as a (half-)circle. Gerhard -- Gerhard Kugler Bensheim _

Re: [NTG-context] Circled text in metapost

2018-03-29 Thread Hans Hagen
On 3/29/2018 11:52 AM, Henri Menke wrote: On 03/29/2018 10:28 PM, Gerhard Kugler wrote: Hi, in documentations I can find various examples of circled text. But copying them I had no success till now. I want to place text in half circles of various radiuses. Is there anywhere a simple example?

Re: [NTG-context] Circled text in metapost

2018-03-29 Thread Henri Menke
On 03/29/2018 10:28 PM, Gerhard Kugler wrote: > Hi, > > in documentations I can find various examples of circled text. But > copying them I had no success till now. > > I want to place text in half circles of various radiuses. Is there > anywhere a simple example? The Metafun experts would proba

[NTG-context] Circled text in metapost

2018-03-29 Thread Gerhard Kugler
Hi, in documentations I can find various examples of circled text. But copying them I had no success till now. I want to place text in half circles of various radiuses. Is there anywhere a simple example? My greatest problems seem to be in the embedding code. Gerhard -- Gerhard Kugler Benshe

Re: [NTG-context] about makempy (metapost outlines)

2018-02-19 Thread Jeong Dal
Dear Otared, I am sorry that the sample code is not fully loaded. Although Hans said that we don’t need ‘makempy’, I copied the whole code again for the sake of test. \setuphead[section][style={\effect[outer]}] is working well. For korean, use \setupbodyfont[unfonts] as Hans said. Thank you.

Re: [NTG-context] about makempy (metapost outlines)

2018-02-19 Thread Hans Hagen
On 2/19/2018 3:21 AM, Jeong Dal wrote: tex error       > tex error on line 4 in file /Users/graph/Documents/TeXfiles/test-mpgraph.tex: ! Undefined control sequence \setstrut \begstrut \getheadtitle                                   \endstrut \MPLIBgraphictext ...\startTEXpage [scale=1]#

Re: [NTG-context] about makempy (metapost outlines)

2018-02-19 Thread Hans Hagen
On 2/19/2018 8:09 AM, Otared Kavian wrote: Tha sample code below runs correctly, except that the Korean words are not displayed, since there is no body fonts set up for that language. Could you please send a more complete sample in order for us to see what you are reporting? \setupbodyfont[unf

Re: [NTG-context] about makempy (metapost outlines)

2018-02-18 Thread Otared Kavian
:21, Jeong Dal wrote: > > > Hi, > > During the search Euler font, I found a manual “creating metapost outlines”. > It is what I looking for at the last year. > > I tried an example for section head, but it issued an undefined control > sequence message. > > Ple

[NTG-context] about makempy (metapost outlines)

2018-02-18 Thread Jeong Dal
Hi, During the search Euler font, I found a manual “creating metapost outlines”. It is what I looking for at the last year. I tried an example for section head, but it issued an undefined control sequence message. Please tell me what is wrong and how to change. I copied the sample code and

Re: [NTG-context] Can MetaPost draw directly datapoints from a data file?

2017-12-28 Thread Jorge Manuel
Thanks a lot for this nice and clean solution. It’s fantastic. Now it is very easy to make scatter plots from the output of c++ libraries and other kind of applications: two axes and a path build like this path curve; numeric i; i:=1; curve := my_offset(i) forever: hide(i := i + 1) exitif i

Re: [NTG-context] Can MetaPost draw directly datapoints from a data file?

2017-12-28 Thread Hans Hagen
label(\"%s\", (%0.6f u, %0.6f u));", a, x[i],y[i])    i=i+1 end context("\\stopMPcode”) \stopluacode \stoptext *Is there a way to pass directly the external data to MetaPost without using Lua?* I know that I can use a similar function to gdata from graph.mp. I try

[NTG-context] Can MetaPost draw directly datapoints from a data file?

2017-12-28 Thread Jorge Manuel
de”)\stopluacode\stoptextIs there a way to pass directly the external data to MetaPost without using Lua?I know that I can use a similar function to gdata from graph.mp. I try to reuse this piece of code, but not works.\startMPcodevardef Grdln_@#(expr f) =  save n_, s_; string s_;  s_ = readfrom f;  s

Re: [NTG-context] Metapost: How to get total number of pages?

2017-11-17 Thread Procházka Lukáš Ing .
Hello Thomas, thank you, I'll keep it in mind! Best regards, Lukas On Fri, 17 Nov 2017 14:42:58 +0100, Thomas A. Schmitz wrote: On 17.11.2017 14:02, Procházka Lukáš Ing. wrote: it seems that there is 'PageNumber' variable (macro) available within MP code, maybe introduced by 'StartPage',

Re: [NTG-context] Metapost: How to get total number of pages?

2017-11-17 Thread Thomas A. Schmitz
On 17.11.2017 14:02, Procházka Lukáš Ing. wrote: it seems that there is 'PageNumber' variable (macro) available within MP code, maybe introduced by 'StartPage', within MP. How do I get total number of pages or last page number within MP (in Ctx: \totalnumberofpages, \lastpage)? NOfPages If

[NTG-context] Metapost: How to get total number of pages?

2017-11-17 Thread Procházka Lukáš Ing .
Hello, it seems that there is 'PageNumber' variable (macro) available within MP code, maybe introduced by 'StartPage', within MP. How do I get total number of pages or last page number within MP (in Ctx: \totalnumberofpages, \lastpage)? TIA. Best regards, Lukas -- Ing. Lukáš Procházka | m

Re: [NTG-context] question for metapost experts

2017-08-10 Thread Schmitz Thomas A.
one of included metapost graphics, so now I can correct this! All best Thomas ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/m

Re: [NTG-context] question for metapost experts

2017-08-10 Thread Hans Hagen
On 8/10/2017 2:07 PM, Schmitz Thomas A. wrote: Hi all, this one is for all the metapos/metafun experts out there (Alan, are you there?). For a counter in one of my slide backgrounds, I have to calculate an intersectionpoint, given in percentage of the difference between current page and last

[NTG-context] question for metapost experts

2017-08-10 Thread Schmitz Thomas A.
Hi all, this one is for all the metapos/metafun experts out there (Alan, are you there?). For a counter in one of my slide backgrounds, I have to calculate an intersectionpoint, given in percentage of the difference between current page and last page. I have always had some difficulties on the

Re: [NTG-context] Passing data back and forth between metapost and lua

2017-03-19 Thread Hans Hagen
On 3/19/2017 7:29 PM, Aditya Mahajan wrote: On Sun, 19 Mar 2017, Aditya Mahajan wrote: On Tue, 20 Dec 2016, Alan Braslau wrote: On Mon, 19 Dec 2016 08:19:25 -0800 Aditya Mahajan wrote: The ability to pass parameters to metapost has been around since the beginning. See the metafun manual

Re: [NTG-context] Passing data back and forth between metapost and lua

2017-03-19 Thread Aditya Mahajan
On Sun, 19 Mar 2017, Aditya Mahajan wrote: On Tue, 20 Dec 2016, Alan Braslau wrote: On Mon, 19 Dec 2016 08:19:25 -0800 Aditya Mahajan wrote: The ability to pass parameters to metapost has been around since the beginning. See the metafun manual for details (search for MPvar). Hans has

[NTG-context] Passing data back and forth between metapost and lua

2017-03-19 Thread Aditya Mahajan
On Tue, 20 Dec 2016, Alan Braslau wrote: On Mon, 19 Dec 2016 08:19:25 -0800 Aditya Mahajan wrote: The ability to pass parameters to metapost has been around since the beginning. See the metafun manual for details (search for MPvar). Hans has developed tools making it quite easy to pass

Re: [NTG-context] Asymptote or Metapost and ConTeXt parameters.

2016-12-23 Thread Aditya Mahajan
On Sat, 24 Dec 2016, Jaroslav Hajtmar wrote: It seems now, that everything at this time works as intended. Many thanks for your support. Below is a minimal example. Attached is a PDF sample result. Nice to know that it works. I tried also to experiment with the choice "object = no", as sugge

Re: [NTG-context] Asymptote or Metapost and ConTeXt parameters.

2016-12-23 Thread Jaroslav Hajtmar
Hello Adytia. It seems now, that everything at this time works as intended. Many thanks for your support. Below is a minimal example. Attached is a PDF sample result. I tried also to experiment with the choice "object = no", as suggested by Hans, but without success. I would asking if you make a

Re: [NTG-context] Asymptote or Metapost and ConTeXt parameters.

2016-12-23 Thread Hans Hagen
On 12/23/2016 8:22 PM, Aditya Mahajan wrote: On Fri, 23 Dec 2016, Jaroslav Hajtmar wrote: Thanks for sending Your code. It seems that it works with Asymptote. Unfortunately, when I am trying to multiple call a macro then I get fatal error, and then compile collapse. I do not know what it could

Re: [NTG-context] Asymptote or Metapost and ConTeXt parameters.

2016-12-23 Thread Aditya Mahajan
On Fri, 23 Dec 2016, Jaroslav Hajtmar wrote: Thanks for sending Your code. It seems that it works with Asymptote. Unfortunately, when I am trying to multiple call a macro then I get fatal error, and then compile collapse. I do not know what it could be. When called for the first time, the cod

Re: [NTG-context] Asymptote or Metapost and ConTeXt parameters.

2016-12-23 Thread Jaroslav Hajtmar
Mahajan napsal(a): On Tue, 20 Dec 2016, Jaroslav Hajtmar wrote: > very much for your Metapost example. This I certainly sufficient for the > production of simple images for my ideas. > \define[1]\mycircle{ > \startASY > import graph; > dr

Re: [NTG-context] Asymptote or Metapost and ConTeXt parameters.

2016-12-21 Thread Aditya Mahajan
On Tue, 20 Dec 2016, Jaroslav Hajtmar wrote: very much for your Metapost example. This I certainly sufficient for the production of simple images for my ideas. \define[1]\mycircle{ \startASY import graph; draw(Circle((0,0),#1)); \stopASY } \starttext

Re: [NTG-context] Asymptote or Metapost and ConTeXt parameters.

2016-12-20 Thread Aditya Mahajan
On Tue, 20 Dec 2016, Alan Braslau wrote: On Mon, 19 Dec 2016 08:19:25 -0800 Aditya Mahajan wrote: The ability to pass parameters to metapost has been around since the beginning. See the metafun manual for details (search for MPvar). Hans has developed tools making it quite easy to pass

Re: [NTG-context] Asymptote or Metapost and ConTeXt parameters.

2016-12-20 Thread Alan Braslau
On Mon, 19 Dec 2016 08:19:25 -0800 Aditya Mahajan wrote: > The ability to pass parameters to metapost has been around since the > beginning. See the metafun manual for details (search for MPvar). Hans has developed tools making it quite easy to pass data back and forth between MetaPost a

Re: [NTG-context] Asymptote or Metapost and ConTeXt parameters.

2016-12-20 Thread Jaroslav Hajtmar
Thanx Aditya very much for your Metapost example. This I certainly sufficient for the production of simple images for my ideas. I attach source code, which outlines how I imagined inserting Asymptote images into Context. In the lower part of commented code is fully functional, compiled ConTEXt

Re: [NTG-context] Asymptote or Metapost and ConTeXt parameters.

2016-12-19 Thread Aditya Mahajan
On Mon, 19 Dec 2016, Jaroslav Hajtmar wrote: There is a similar possibility, at least in Metapost? For simpler pictures it would probably suffice The ability to pass parameters to metapost has been around since the beginning. See the metafun manual for details (search for MPvar). For

Re: [NTG-context] Asymptote or Metapost and ConTeXt parameters.

2016-12-19 Thread Hans Hagen
sense to deal with such a thing ... I suppose the impossibility of combining asymptote code and such Lua code (or not?). __ __ There is a similar possibility, at least in Metapost? For simpler pictures it would probably suffice __ __

Re: [NTG-context] Asymptote or Metapost and ConTeXt parameters.

2016-12-19 Thread Fabrice Couvreur
combining asymptote code and such Lua code (or not?). > > > > There is a similar possibility, at least in Metapost? For simpler pictures > it would probably suffice > > > > Thanx > > Jaroslav Hajtmar > > > > ___

[NTG-context] Asymptote or Metapost and ConTeXt parameters.

2016-12-18 Thread Jaroslav Hajtmar
... I suppose the impossibility of combining asymptote code and such Lua code (or not?). There is a similar possibility, at least in Metapost? For simpler pictures it would probably suffice Thanx Jaroslav Hajtmar

Re: [NTG-context] Bug in latest beta, shifted metapost (possibly with drawarrow)

2016-11-04 Thread Hans Hagen
On 11/3/2016 5:09 PM, Mikael P. Sundqvist wrote: Dear list, the example below has shifted axes. I updated to the latest standalone earlier today. The problem was not present some weeks ago. In particular look at the red line that should start from the origin... \starttext \startMPpage ut:=1.0c

[NTG-context] Bug in latest beta, shifted metapost (possibly with drawarrow)

2016-11-03 Thread Mikael P. Sundqvist
Dear list, the example below has shifted axes. I updated to the latest standalone earlier today. The problem was not present some weeks ago. In particular look at the red line that should start from the origin... \starttext \startMPpage ut:=1.0cm; ux:=0.6cm; vardef diffp(expr riktn) = ((-1,0)-

Re: [NTG-context] [metapost] ANN: Updated Vim scripts for METAFONT/MetaPost

2016-10-05 Thread luigi scarso
On Wed, Oct 5, 2016 at 10:26 AM, Nicola wrote: > FYI: > https://github.com/vim/vim/commit/2ec618c9feac4573b154510236ad8121c77d0eca > > Click on "changed files". > good. Btw http://www.guitex.org/home/meeting -- luigi __

Re: [NTG-context] ANN: Updated Vim scripts for METAFONT/MetaPost

2016-09-18 Thread Nicola
On 2016-09-18 12:09:12 +, luigi scarso said: On Sun, Sep 18, 2016 at 12:46 PM, Nicola wrote: Hello, as a Vim user, I was not satisfied with its support for MetaPost (especially indenting). I have updated the {mf,mp}.vim scripts in Vim, which you find attached, and which I have forwarded

Re: [NTG-context] [metapost] ANN: Updated Vim scripts for METAFONT/MetaPost

2016-09-18 Thread luigi scarso
On Sun, Sep 18, 2016 at 12:46 PM, Nicola wrote: > Hello, > as a Vim user, I was not satisfied with its support for MetaPost > (especially indenting). I have updated the {mf,mp}.vim scripts > in Vim, which you find attached, and which I have forwarded to > the respective maintai

Re: [NTG-context] ANN: Updated Vim scripts for METAFONT/MetaPost

2016-09-18 Thread Nicola
On 2016-09-18 10:46:44 +, Nicola said: I have updated the {mf,mp}.vim scripts in Vim ConTeXt users will benefit from these scripts, too, inside MetaPost environments. Put these lines in ./vim/after/ftplugin/context.vim: setlocal omnifunc=syntaxcomplete#Complete let

Re: [NTG-context] Info about MetaPost

2016-09-09 Thread Nicola
On 2016-09-09 13:21:21 +, luigi scarso said: On Fri, Sep 9, 2016 at 12:47 PM, Nicola wrote: Hi, I write to this mailing list because the MetaPost mailing list has been silent for a while. I hope it is ok. I am getting to grips with MetaPost after a long hiatus, so I have not followed

Re: [NTG-context] Info about MetaPost

2016-09-09 Thread luigi scarso
On Fri, Sep 9, 2016 at 12:47 PM, Nicola wrote: > Hi, > I write to this mailing list because the MetaPost mailing list has been > silent for a while. I hope it is ok. > > I am getting to grips with MetaPost after a long hiatus, so I have not > followed recent developments. I se

[NTG-context] Info about MetaPost

2016-09-09 Thread Nicola
Hi, I write to this mailing list because the MetaPost mailing list has been silent for a while. I hope it is ok. I am getting to grips with MetaPost after a long hiatus, so I have not followed recent developments. I see that the version shipped with TeX Live 2016 is 1.9991 and that the current

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? that'

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 example) a circle >>

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

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