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

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

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

[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

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

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

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

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

[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

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

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

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

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 <g.w.kug...@posteo.de> wrote: > Perhaps it is better if I send the final graphic which I have > prorammed with the

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

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

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)

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

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,

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

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 t

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

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

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

[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

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

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?

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

2018-02-18 Thread Otared Kavian
:21, Jeong Dal <hak...@me.com> 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 > sequen

[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

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

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

2017-12-28 Thread Hans Hagen
ot;%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 to reuse t

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

2017-12-28 Thread Jorge Manuel
topluacode\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;  string @#[]

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,

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 |

Re: [NTG-context] question for metapost experts

2017-08-10 Thread Schmitz Thomas A.
the slide background and 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.n

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 <adit...@umich.edu> wrote: The ability to pass parameters to metapost has been around since the beginnin

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 <adit...@umich.edu> wrote: The ability to pass parameters to metapost has been around since the beginning. See the metafun manual for details (

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

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

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

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

2016-12-23 Thread Jaroslav Hajtmar
Mahajan <ntg-context-boun...@ntg.nl za uživatele adit...@umich.edu> 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. > \def

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 <adit...@umich.edu> 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

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 <adit...@umich.edu> 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 ba

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

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

2016-12-19 Thread Hans Hagen
whether it makes 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 __ __ Th

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

2016-12-19 Thread Fabrice Couvreur
... 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 > > > >

[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

[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) =

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 <nvitacolo...@gmail.com> 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 at

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 <nvitacolo...@gmail.com> 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 t

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 <nvitacolo...@gmail.com> 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 hiat

Re: [NTG-context] Info about MetaPost

2016-09-09 Thread luigi scarso
On Fri, Sep 9, 2016 at 12:47 PM, Nicola <nvitacolo...@gmail.com> 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 > foll

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

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

[NTG-context] Colors not showing inside metapost after \showcolor

2016-07-23 Thread Bou Salim
I have texlive 2016 on windows OS, I use context mkiv. with context -- version I have: current version: 2016-05-17 ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist :

Re: [NTG-context] Colors not showing inside metapost after \showcolor

2016-07-23 Thread Hans Hagen
On 7/23/2016 9:35 AM, Schmitz Thomas A. wrote: On 23 Jul 2016, at 09:24, Bou Salim <salimcol...@gmail.com> wrote: Hi I have this problem to show colors properly. I have defined color "myred", but after \showcolor command colors inside metapost can't be displayed. Yo

Re: [NTG-context] Colors not showing inside metapost after \showcolor

2016-07-23 Thread Schmitz Thomas A.
> On 23 Jul 2016, at 09:24, Bou Salim <salimcol...@gmail.com> wrote: > > Hi > I have this problem to show colors properly. I have defined color "myred", > but after \showcolor command colors inside metapost can't be displayed. Your example shows the cor

[NTG-context] Colors not showing inside metapost after \showcolor

2016-07-23 Thread Bou Salim
Hi I have this problem to show colors properly. I have defined color "myred", but after \showcolor command colors inside metapost can't be displayed. Thanks \starttext \definecolor[myred] [r=.8] \showcolor \startuseMPgraphic{test} fill fullcircle scaled 10mm withcolor \MPc

Re: [NTG-context] Buffered metapost function freezes random numbers

2016-05-27 Thread Hans Hagen
On 5/25/2016 7:09 PM, DesdeChaves wrote: For educational purposes I try to simulate a ammeter for reading practice. I would like create six or more ammeter with different readings, but i'm not able to do that because metapost create the same random number every time I call the buffer

Re: [NTG-context] Buffered metapost function freezes random numbers

2016-05-25 Thread DesdeChaves
ses I try to simulate a ammeter for reading practice. > I would like create six or more ammeter with different readings, but i'm > not able to do that because metapost create the same random number every > time I call the buffer that defines my ammeter. > > How can I fix that? > > Is

Re: [NTG-context] Buffered metapost function freezes random numbers

2016-05-25 Thread Wolfgang Schuster
DesdeChaves <mailto:desdecha...@gmail.com> 25. Mai 2016 um 19:09 For educational purposes I try to simulate a ammeter for reading practice. I would like create six or more ammeter with different readings, but i'm not able to do that because metapost create the same random number every

[NTG-context] Buffered metapost function freezes random numbers

2016-05-25 Thread DesdeChaves
For educational purposes I try to simulate a ammeter for reading practice. I would like create six or more ammeter with different readings, but i'm not able to do that because metapost create the same random number every time I call the buffer that defines my ammeter. How can I fix that? Thanks

Re: [NTG-context] Setting expansion depth limit for metapost

2016-02-18 Thread Hans Hagen
On 2/18/2016 11:03 PM, Michal Suszko wrote: * Taco Hoekwater [2010-03-17 13:10:19 +0100]: It could be a bug in mplib then, but I can't test that without an input example. Can you create me one? (it could consist of one massive \dorecurse call, I assume?). Trying to

Re: [NTG-context] Setting expansion depth limit for metapost

2016-02-18 Thread Michal Suszko
* Taco Hoekwater [2010-03-17 13:10:19 +0100]: > It could be a bug in mplib then, but I can't test that without > an input example. Can you create me one? (it could consist of one > massive \dorecurse call, I assume?). Trying to prepare minimal working example of this problem

Re: [NTG-context] Setting expansion depth limit for metapost

2016-02-18 Thread Michal Suszko
). > > Recently I'm hitting MetaPost capacity limit on expansion depth: > > > > !mplib : mp terminal: ! MetaPost capacity exceeded, sorry > > [expansion depth=1]. > > > > Increasing expand_depth in texmf.cnf and regenerating formats with > > co

[NTG-context] Setting expansion depth limit for metapost

2016-02-18 Thread Michal Suszko
I'm preparing quite long presentation -- nearly 3000 sides, 900 figures (500 distinct PNG files). I'm using ConTeXt MkIV installed using minimals (2010.03.12 19:49). Recently I'm hitting MetaPost capacity limit on expansion depth: !mplib : mp terminal: ! MetaPost capacity exceeded

Re: [NTG-context] new error in Context-Metapost

2016-02-17 Thread Meer, Hans van der
to the fact that have \{ and \} have a different meaning when we flush metapost text (makes me wonder if that is still needed) this helps \installmathfencepair \letteropenbrace \Lbrace \letterclosebrace \Rbrace ___

Re: [NTG-context] new error in Context-Metapost

2016-02-17 Thread Hans Hagen
\{ and \} have a different meaning when we flush metapost text (makes me wonder if that is still needed) this helps \installmathfencepair \letteropenbrace \Lbrace \letterclosebrace \Rbrace Here a minimal example, the output of the ConTeXt run and the error on the MPpage run. Has something

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