Re: [NTG-context] OOP in Metafun.

2012-12-10 Thread Nicola
In article , Andre Caldas wrote: > Hello, list! > > I am writing down a macro package for commutative diagrams using metafun. > This is my first try: > https://bitbucket.org/andrecaldas/math-video-classes/src/9a050eab20348c9a9c9e5 > 0740618173648979f45/src/environments/diagr

Re: [NTG-context] OOP in Metafun.

2012-12-09 Thread Andre Caldas
> But I would like to use some "object oriented" like approach. I have done some OOP like coding... https://bitbucket.org/andrecaldas/math-video-classes/src/77036fe1001ede35e301305700943ac952089d32/src/environments/diagrams.tex?at=default This is my first METAFUN experience. Comm

[NTG-context] OOP in Metafun.

2012-12-09 Thread Andre Caldas
Hello, list! I am writing down a macro package for commutative diagrams using metafun. This is my first try: https://bitbucket.org/andrecaldas/math-video-classes/src/9a050eab20348c9a9c9e50740618173648979f45/src/environments/diagrams.tex?at=default Used here: https://bitbucket.org/andrecaldas

Re: [NTG-context] using variable for subscript in math+lua (and math+MetaFun)

2012-10-25 Thread Jeong Dal
Dear Hans, The structure of your code is very interesting. MP code) inside ConTeXt) inside Lua) inside ConTeXt) again! It is really useful. Thank you. Best regards, Dalyoung > > play with code like this > > \starttext > > \startluacode >context.startMPcode() >for i=1,10 d

Re: [NTG-context] using variable for subscript in math+lua (and math+MetaFun)

2012-10-25 Thread Hans Hagen
On 25-10-2012 13:59, Jeong Dal wrote: > Dear Gesang and Hans, > > Your solution is working nicely. > I may use lua to simplify my other work. > > I'd like to ask you one more thing. > > I tried to write a matrix using MetaFun to add some graphics as following:

Re: [NTG-context] using variable for subscript in math+lua (and math+MetaFun)

2012-10-25 Thread Jeong Dal
Dear Gesang and Hans, Your solution is working nicely. I may use lua to simplify my other work. I'd like to ask you one more thing. I tried to write a matrix using MetaFun to add some graphics as following: label(btex $a_{11}$ etex, ( , )); label(btex $a_{12}$ etex, ( , )); label(btex $

Re: [NTG-context] Is it possible to generate eps files using metafun and context?

2012-06-18 Thread Hongwen Qiu
On 06/18/2012 04:19 PM, Hans Hagen wrote: and then use pstopdf to turn the pdf into an eps You must mean pdftops, since pstopdf cannot convert pdf files into eps but pdftops can. I tried pdftops, the result quality is high, but since my desire is to provide eps figures to others that have to

Re: [NTG-context] Is it possible to generate eps files using metafun and context?

2012-06-18 Thread Hans Hagen
On 14-6-2012 19:07, Hongwen Qiu wrote: Hi, Is it possible to typeset the label with context and generate eps output files using the metafun format? If yes, then how? \startMPpage ... \stopMPpage or \startTEXpage ... \stopTEXpage and then use pstopdf to turn the pdf into an eps Hans

[NTG-context] Is it possible to generate eps files using metafun and context?

2012-06-14 Thread Hongwen Qiu
Hi, Is it possible to typeset the label with context and generate eps output files using the metafun format? If yes, then how? TIA. ___ If your question is of interest to others as well, please add an entry to the

Re: [NTG-context] Metapost/Metafun Q: using variables and "building blocks"?

2012-05-07 Thread Mari Voipio
On Sun, May 6, 2012 at 4:52 PM, Hans Hagen wrote: > You have seen this one, haven't you? Posted by Don Knuth: > > http://www.youtube.com/watch?v=YVuggGxeBVk > > So that's your next challenge. Yes, I've seen it, had to watch the whole thing, it is so fascinating. If I ever decide to invest in suc

Re: [NTG-context] Metapost/Metafun Q: using variables and "building blocks"?

2012-05-06 Thread Mari Voipio
On Sun, May 6, 2012 at 3:47 PM, Hans Hagen wrote: >> http://www.lucet.fi/textiles/ > > > Best change that in: > > ConTeXt, developed by the Dutch company Pragma Advanced Document > Engineering, is open source software and avaliable as stand alone > distribution (www.contextgarden.net) and is also

Re: [NTG-context] Metapost/Metafun Q: using variables and "building blocks"?

2012-05-06 Thread Hans Hagen
On 6-5-2012 14:53, Martin Schröder wrote: 2012/5/6 Hans Hagen: (btw, I always wonder if the gpl restrictions also apply to the makers too ... i.e. if I extend context for a project should I then also make those extensions public ... quite a hassle if that would be true.) The copyright holders

Re: [NTG-context] Metapost/Metafun Q: using variables and "building blocks"?

2012-05-06 Thread Martin Schröder
2012/5/6 Hans Hagen : > (btw, I always wonder if the gpl restrictions also apply to the makers too > ... i.e. if I extend context for a project should I then also make those > extensions public ... quite a hassle if that would be true.) The copyright holders are free to use any license. So we have

Re: [NTG-context] Metapost/Metafun Q: using variables and "building blocks"?

2012-05-06 Thread Hans Hagen
On 6-5-2012 10:53, Mari Voipio wrote: On Mon, Apr 23, 2012 at 9:04 PM, Hans Hagen wrote: beware, metapost is addictive once you get better in it, It is. :-) This one is to both you and Peter, because your snippets together helped me adjust from WYSIWYG vector graphics to MetaPost - not that

Re: [NTG-context] Metapost/Metafun Q: using variables and "building blocks"?

2012-05-06 Thread Hans Hagen
On 6-5-2012 13:33, Pontus Lurcock wrote: On Sun 06 May 2012, Wolfgang Schuster wrote: Am 06.05.2012 um 11:16 schrieb luigi scarso: On Sun, May 6, 2012 at 10:53 AM, Mari Voipio wrote: http://www.lucet.fi/textiles/ """ ConTeXt, developed by the Dutch company Pragma Advanced Document Enginee

Re: [NTG-context] Metapost/Metafun Q: using variables and "building blocks"?

2012-05-06 Thread Pontus Lurcock
On Sun 06 May 2012, Wolfgang Schuster wrote: > > Am 06.05.2012 um 11:16 schrieb luigi scarso: > > > On Sun, May 6, 2012 at 10:53 AM, Mari Voipio wrote: > >> http://www.lucet.fi/textiles/ > > """ > > ConTeXt, developed by the Dutch company Pragma Advanced Document > > Engineering, is not open so

Re: [NTG-context] Metapost/Metafun Q: using variables and "building blocks"?

2012-05-06 Thread luigi scarso
On Sun, May 6, 2012 at 11:56 AM, Wolfgang Schuster wrote: > > Am 06.05.2012 um 11:16 schrieb luigi scarso: > >> On Sun, May 6, 2012 at 10:53 AM, Mari Voipio wrote: >>> http://www.lucet.fi/textiles/ >> """ >> ConTeXt, developed by the Dutch company Pragma Advanced Document >> Engineering, is not o

Re: [NTG-context] Metapost/Metafun Q: using variables and "building blocks"?

2012-05-06 Thread Wolfgang Schuster
Am 06.05.2012 um 11:16 schrieb luigi scarso: > On Sun, May 6, 2012 at 10:53 AM, Mari Voipio wrote: >> http://www.lucet.fi/textiles/ > """ > ConTeXt, developed by the Dutch company Pragma Advanced Document > Engineering, is not open source software, > """ > Hm, I'm not sure that it's correct. Co

Re: [NTG-context] Metapost/Metafun Q: using variables and "building blocks"?

2012-05-06 Thread luigi scarso
On Sun, May 6, 2012 at 10:53 AM, Mari Voipio wrote: > http://www.lucet.fi/textiles/ """ ConTeXt, developed by the Dutch company Pragma Advanced Document Engineering, is not open source software, """ Hm, I'm not sure that it's correct. -- luigi _

Re: [NTG-context] Metapost/Metafun Q: using variables and "building blocks"?

2012-05-06 Thread Mari Voipio
PS. I got this link from a friend who'd struggled with an event registration system, but it SO applies to my MetaPost project: http://www.howtogeek.com/102420/geeks-versus-non-geeks-when-doing-repetitive-tasks-funny-chart/ (Scary, I seem to count as "geek"now...)

Re: [NTG-context] Metapost/Metafun Q: using variables and "building blocks"?

2012-05-06 Thread Mari Voipio
On Mon, Apr 23, 2012 at 9:04 PM, Hans Hagen wrote: > beware, metapost is addictive once you get better in it, It is. :-) This one is to both you and Peter, because your snippets together helped me adjust from WYSIWYG vector graphics to MetaPost - not that I'm that far yet, but I understand a lot

Re: [NTG-context] Metapost/Metafun Q: using variables and "building blocks"?

2012-05-01 Thread Peter Rolf
> > \stopMPpage > > >> Keeping in mind that I >> will have to be able to draw a path/arrow on top, so I need to know >> where they are. > > My little brain got an overflow from all this abstract thinking, but > then it dawned on me that I could use the millim

Re: [NTG-context] Metapost/Metafun Q: using variables and "building blocks"?

2012-04-30 Thread Mari Voipio
ld use the millimeter grid recipe in the MetaFun manual (p. 214) to draw a grid behind my pattern drawing. Now placing the arrows should be a walk in the park... > b) The circles p and q can be filled with the same colour or two > different colours, and each of the blocks in a pattern can have &

Re: [NTG-context] Metapost/Metafun Q: using variables and "building blocks"?

2012-04-23 Thread Hans Hagen
shapes and sometimes complicated but well-regulated paths/arrows to go between them; I'm just being a clueless newbie, too much in the WYSIWYG vector graphics mode to really know what to do. Mostly with the examples in the Metafun manual I've managed to get as far as to my basic building block, t

[NTG-context] Metapost/Metafun Q: using variables and "building blocks"?

2012-04-23 Thread Mari Voipio
ated paths/arrows to go between them; I'm just being a clueless newbie, too much in the WYSIWYG vector graphics mode to really know what to do. Mostly with the examples in the Metafun manual I've managed to get as far as to my basic building block, two circles joined by a curve: \star

Re: [NTG-context] simple graphics, Metafun vs. ConTeXt

2012-03-25 Thread Wolfgang Schuster
Am 25.03.2012 um 04:41 schrieb S Barmeier: > On 03/23/2012 03:11 AM, Hans Hagen wrote: >> On 22-3-2012 15:09, S Barmeier wrote: >>> I have leaved through the ConTeXt and MetaFun manuals on the search for >>> examples of graphics resembling the attached file

Re: [NTG-context] simple graphics, Metafun vs. ConTeXt

2012-03-24 Thread S Barmeier
On 03/23/2012 03:11 AM, Hans Hagen wrote: > On 22-3-2012 15:09, S Barmeier wrote: >> I have leaved through the ConTeXt and MetaFun manuals on the search for >> examples of graphics resembling the attached file which I created in >> TikZ. >> >> I was wanting to s

Re: [NTG-context] simple graphics, Metafun vs. ConTeXt

2012-03-22 Thread Hans Hagen
On 22-3-2012 15:09, S Barmeier wrote: I have leaved through the ConTeXt and MetaFun manuals on the search for examples of graphics resembling the attached file which I created in TikZ. I was wanting to switch to something more native to ConTeXt, but haven't quite found a way of realising

Re: [NTG-context] simple graphics, Metafun vs. ConTeXt

2012-03-22 Thread Wolfgang Schuster
Am 22.03.2012 um 15:09 schrieb S Barmeier: > I have leaved through the ConTeXt and MetaFun manuals on the search for > examples of graphics resembling the attached file which I created in TikZ. > > I was wanting to switch to something more native to ConTeXt, but haven't >

[NTG-context] simple graphics, Metafun vs. ConTeXt

2012-03-22 Thread S Barmeier
I have leaved through the ConTeXt and MetaFun manuals on the search for examples of graphics resembling the attached file which I created in TikZ. I was wanting to switch to something more native to ConTeXt, but haven't quite found a way of realising it in ConTeXt or MetaFun. Maybe someone

Re: [NTG-context] random background picture in metafun

2012-03-15 Thread Thomas A. Schmitz
On 03/15/2012 07:06 PM, Hans Hagen wrote: Ah, but keep in mind that the random number is stored in the tuc file! So, as long as that file is not wiped, you get the same random number initialization. Imagine what would happen if we would not do that. So, just erase the tuc if you want another se

Re: [NTG-context] random background picture in metafun

2012-03-15 Thread Hans Hagen
w days of testing: the "randomness" is a bit disappointing. All my presentations start more or less with the same set of background pictures, and since most have < 22 slides, some slides never come up in the rotation. Is there a way to provide metafun with a random seed, say the decimal

Re: [NTG-context] random background picture in metafun

2012-03-15 Thread Thomas A. Schmitz
quot; is a bit disappointing. All my presentations start more or less with the same set of background pictures, and since most have < 22 slides, some slides never come up in the rotation. Is there a way to provide metafun with a random seed, say the decimal digit of pi corresponding to the round

Re: [NTG-context] random background picture in metafun

2012-03-13 Thread Peter Rolf
m a directory "backgroundpics." The pictures are >>> numbered consecutively as 1.jpg through 22.jpg. For some complex >>> reasons, it would be easier for me to include these pictures via metafun >>> (I want to add other graphical elements on top). So my question i

Re: [NTG-context] random background picture in metafun

2012-03-13 Thread Aditya Mahajan
me complex reasons, it would be easier for me to include these pictures via metafun (I want to add other graphical elements on top). So my question is, how can I pick a random picture? Given the code StartPage ; draw externalfigure "backgoundpics/1" xscaled PaperWidth yscaled PaperHeig

Re: [NTG-context] random background picture in metafun

2012-03-13 Thread Thomas A. Schmitz
On 03/13/2012 05:56 PM, Thomas A. Schmitz wrote: thank you both for your quick replies! Peter's works wonderfully; Aditya's untested code throws an error "! Not implemented: (string)&(known numeric)." I guess this is too arcane for the wiki? To clarify: I wasn't talking about the error, which i

Re: [NTG-context] random background picture in metafun

2012-03-13 Thread Thomas A. Schmitz
On 03/13/2012 05:33 PM, Peter Rolf wrote: string mypath, rndfile; mypath:= "backgroundpics/"; nofpics:= 22; n:= round(uniformdeviate(nofpics-1)+1); rndfile:= mypath& decimal n; HTH, Peter Aditya, Peter, thank you both for your quick replies! Peter's works wonderfully; Aditya's untested

Re: [NTG-context] random background picture in metafun

2012-03-13 Thread Peter Rolf
reasons, it would be easier for me to include these pictures via metafun > (I want to add other graphical elements on top). So my question is, how > can I pick a random picture? Given the code > > StartPage ; > draw externalfigure "backgoundpics/1" xscaled PaperWidth yscal

Re: [NTG-context] random background picture in metafun

2012-03-13 Thread Aditya Mahajan
Hi all, scenario: for a presentation, I want the background to be a random picture, taken from a directory "backgroundpics." The pictures are numbered consecutively as 1.jpg through 22.jpg. For some complex reasons, it would be easier for me to include these pictures via metafun

[NTG-context] random background picture in metafun

2012-03-13 Thread Thomas A. Schmitz
Hi all, scenario: for a presentation, I want the background to be a random picture, taken from a directory "backgroundpics." The pictures are numbered consecutively as 1.jpg through 22.jpg. For some complex reasons, it would be easier for me to include these pictures via metafun

Re: [NTG-context] [***SPAM***] MetaFun linear_shade with transparency?

2011-12-19 Thread Hans Hagen
On 19-12-2011 14:07, Martin Bruchanov wrote: On Sat, Dec 17, 2011 at 11:02:30PM +0100, Martin Bruchanov wrote: Hi guys, it is possible to use linear_shade with transparency in MetaFun? Thanks for info and piece of example code :) Hans direct me to http://minimals.contextgarden.net/current

Re: [NTG-context] [***SPAM***] MetaFun linear_shade with transparency?

2011-12-19 Thread Martin Bruchanov
On Sat, Dec 17, 2011 at 11:02:30PM +0100, Martin Bruchanov wrote: > Hi guys, > > it is possible to use linear_shade with transparency in MetaFun? > > Thanks for info and piece of example code :) > Hans direct me to http://minimals.contextgarden.net/current/context/test/doc/

Re: [NTG-context] [***SPAM***] MetaFun linear_shade with transparency?

2011-12-18 Thread Hans Hagen
On 17-12-2011 23:02, Martin Bruchanov wrote: Hi guys, it is possible to use linear_shade with transparency in MetaFun? Thanks for info and piece of example code :) metapost/plugins-004.tex in the test suite Hans

[NTG-context] [***SPAM***] MetaFun linear_shade with transparency?

2011-12-17 Thread Martin Bruchanov
Hi guys, it is possible to use linear_shade with transparency in MetaFun? Thanks for info and piece of example code :) -- Martin Bruchanov Skype : bruxytronics WWW : http://bruxy.regnet.cz/ GPG-Key : http://bruxy.regnet.cz/bruxy-gpg.key (0x8107ED53) AX.25 : OK2MNM @ OK0PBX

Re: [NTG-context] MetaFun: MetaPost example works with `mpost` but not embedded in ConTeXt: `! Redundant equation.`

2011-12-11 Thread Marco
On 2011-12-11 Paul Menzel wrote: > […] > > I then copied it into `\{start,stop}useMPgraphic`, > removed the `end ;` and `{begin,end}fig` and replaced > `{e,b}tex` by `textext()` but still get the following > error. I didn't check you code (try to make a minimal example next time)

[NTG-context] MetaFun: MetaPost example works with `mpost` but not embedded in ConTeXt: `! Redundant equation.`

2011-12-11 Thread Paul Menzel
Dear ConTeXt folks, looking for graphics example and therefore searching the list I found the answer from David Arnold in the ntg-context list thread »OT: looking for metapost/fun examples« [1]. It is for plain MetaPost and works fine with `mpost` after making sure to remove the line breaks inse

Re: [NTG-context] MetaFun: Is the maximum of `vloggrid` limited to 10?

2011-12-09 Thread Hans Hagen
On 8-12-2011 16:45, Paul Menzel wrote: Am Donnerstag, den 08.12.2011, 16:40 +0100 schrieb Hans Hagen: On 8-12-2011 14:54, Paul Menzel wrote: To create grid like the log-log grid in [2] I guess I need to compose the bigger grid from these “basic” grids then? at some point it runs off your pag

Re: [NTG-context] MetaFun: Is the maximum of `vloggrid` limited to 10?

2011-12-08 Thread Paul Menzel
Am Donnerstag, den 08.12.2011, 16:40 +0100 schrieb Hans Hagen: > On 8-12-2011 14:54, Paul Menzel wrote: > > > To create grid like the log-log grid in [2] I guess I need to compose > > the bigger grid from these “basic” grids then? > > at some point it runs off your page i guess But the width par

Re: [NTG-context] MetaFun: Is the maximum of `vloggrid` limited to 10?

2011-12-08 Thread Hans Hagen
On 8-12-2011 14:54, Paul Menzel wrote: To create grid like the log-log grid in [2] I guess I need to compose the bigger grid from these “basic” grids then? at some point it runs off your page i guess \starttext \startMPcode draw vloggrid(0, 10, 10, 10cm, 6cm) withcolor red ; draw vlo

[NTG-context] MetaFun: Is the maximum of `vloggrid` limited to 10?

2011-12-08 Thread Paul Menzel
Dear ConTeXt folks, the `vloggrid` command is described in section 9 of the MetaFun manual [1]. vloggrid (Min, Max, Step, Length, Height) Can somebody confirm that `Max` can be at most 10? \starttext \type{draw vloggrid(0, 11, 10, 15cm, 5cm

Re: [NTG-context] [solved] Metafun manual section titles

2011-11-14 Thread Romain Diss
Hi, On 14.11.2011, Andreas Harder wrote: > On 13.11.2011, at 23:24, Romain Diss wrote: > > I'm trying to make some section titles which look like the ones of the > > metafun manual: title and number underlined [...] > > you can try something like this: > [...]

Re: [NTG-context] Metafun manual section titles

2011-11-13 Thread Andreas Harder
On 13.11.2011, at 23:24, Romain Diss wrote: > Hello, > > I'm trying to make some section titles which look like the ones of the > metafun > manual: title and number underlined, with number in margin. I thougth it > would > not be too hard but I can't do it. &

[NTG-context] Metafun manual section titles

2011-11-13 Thread Romain Diss
Hello, I'm trying to make some section titles which look like the ones of the metafun manual: title and number underlined, with number in margin. I thougth it would not be too hard but I can't do it. Actually, I'm using a frame with an overlay with a \startuniqueMPgraphic to

[NTG-context] MetaFun manual: Incorrect label of ordinate axis on page 382, section 9.3 drawing functions (was: Confusion with `function()` and `xyscaled`)

2011-10-23 Thread Paul Menzel
Dear MetaFun folks, Am Freitag, den 21.10.2011, 01:14 +0200 schrieb Paul Menzel: > looking at the example for grid and functions in the MetaFun manual [1] > section 9.3 > > drawoptions(withpen pencircle scaled .25pt withcolor .5white) ; > draw hlingrid(0, 20,

Re: [NTG-context] MetaFun: Confusion with `function()` and `xyscaled`

2011-10-22 Thread Hans Hagen
On 21-10-2011 22:53, Aditya Mahajan wrote: Could someone please explain to me how `xyscaled` works in this case please. I though `xyscaled (αcm, ζcm)` would set the object/path to a width of α cm and a height of ζ cm. IIRC, xysized does that. (I am usually confused between ..sized and ..scaled,

Re: [NTG-context] MetaFun: Confusion with `function()` and `xyscaled`

2011-10-21 Thread Aditya Mahajan
Could someone please explain to me how `xyscaled` works in this case please. I though `xyscaled (αcm, ζcm)` would set the object/path to a width of α cm and a height of ζ cm. IIRC, xysized does that. (I am usually confused between ..sized and ..scaled, but one of them scales to the given dimens

Re: [NTG-context] MetaFun: Confusion with `function()` and `xyscaled`

2011-10-21 Thread Peter Rolf
I must admit that this wasn't clear to me before you came up with your question. So thanks for that. :-) Best wishes, Peter Am 21.10.2011 13:38, schrieb Paul Menzel: > Am Freitag, den 21.10.2011, 01:14 +0200 schrieb Paul Menzel: >> Dear ConTeXt/MetaFun folks, >> >> &g

Re: [NTG-context] MetaFun: Confusion with `function()` and `xyscaled`

2011-10-21 Thread Paul Menzel
Am Freitag, den 21.10.2011, 01:14 +0200 schrieb Paul Menzel: > Dear ConTeXt/MetaFun folks, > > > looking at the example for grid and functions in the MetaFun manual [1] > section 9.3 > > drawoptions(withpen pencircle scaled .25pt withcolor .5white) ; >

[NTG-context] MetaFun: Confusion with `function()` and `xyscaled`

2011-10-20 Thread Paul Menzel
Dear ConTeXt/MetaFun folks, looking at the example for grid and functions in the MetaFun manual [1] section 9.3 drawoptions(withpen pencircle scaled .25pt withcolor .5white) ; draw hlingrid(0, 20, .2, 20cm, 10cm) ; draw vloggrid(0, 10, .5, 10cm, 20cm

Re: [NTG-context] [solved] MetaFun: hlintext: `! Missing `)' has been inserted.`, `formatstr: ! Not implemented: (pair)-(unknown numeric).`

2011-10-16 Thread Hans Hagen
On 15-10-2011 21:41, Paul Menzel wrote: Dear Hans, Am Freitag, den 14.10.2011, 15:16 +0200 schrieb Hans Hagen: On 14-10-2011 08:02, Paul Menzel wrote: trying to draw a grid and label it, I get an error when using the (alsa attached) example from the MetaFun manual [1]. Fixed in next beta

Re: [NTG-context] [solved] MetaFun: hlintext: `! Missing `)' has been inserted.`, `formatstr: ! Not implemented: (pair)-(unknown numeric).`

2011-10-15 Thread Paul Menzel
Dear Hans, Am Freitag, den 14.10.2011, 15:16 +0200 schrieb Hans Hagen: > On 14-10-2011 08:02, Paul Menzel wrote: > > trying to draw a grid and label it, I get an error when using the (alsa > > attached) example from the MetaFun manual [1]. > > Fixed in next beta as alway

Re: [NTG-context] MetaFun: hlintext: `! Missing `)' has been inserted.`, `formatstr: ! Not implemented: (pair)-(unknown numeric).`

2011-10-14 Thread Hans Hagen
On 14-10-2011 08:02, Paul Menzel wrote: Dear ConTeXt folks, trying to draw a grid and label it, I get an error when using the (alsa attached) example from the MetaFun manual [1]. Fixed in next beta (however, instead of mp formatting lua formatting is used, a prelude to the graph rewrite

[NTG-context] MetaFun: hlintext: `! Missing `)' has been inserted.`, `formatstr: ! Not implemented: (pair)-(unknown numeric).`

2011-10-13 Thread Paul Menzel
Dear ConTeXt folks, trying to draw a grid and label it, I get an error when using the (alsa attached) example from the MetaFun manual [1]. \starttext \startMPcode drawoptions(withpen pencircle scaled .25pt withcolor .5white) ; draw hlingrid(0, 20, .2, 20cm, 10cm

[NTG-context] metafun manual: Typo on page 382, section 9.3 drawing functions

2011-10-12 Thread Paul Menzel
Dear ConTeXt folks, I am sorry to bother you with these kind of messages. On page 382 of the Metafun manual [1] (Fr 08 Okt 2010 13:44:26 CEST) it should be In this case the pairs (log(x), x) and … so (log(x), x) instead of (x, x). Thanks, Paul [1] http://www.pragma-ade.com/general

Re: [NTG-context] metafun shared code

2011-09-19 Thread Marcin Borkowski
Dnia 2011-09-19, o godz. 17:43:29 Aditya Mahajan napisał(a): > On Mon, 19 Sep 2011, Marcin Borkowski wrote: > > > Dnia 2011-09-19, pon o godzinie 11:19 -0400, Aditya Mahajan pisze: > >> On Mon, 19 Sep 2011, Marcin Borkowski wrote: > >> > >>> I'd like to have some MP code shared between unique gr

Re: [NTG-context] metafun shared code

2011-09-19 Thread Aditya Mahajan
On Mon, 19 Sep 2011, Marcin Borkowski wrote: Dnia 2011-09-19, pon o godzinie 11:19 -0400, Aditya Mahajan pisze: On Mon, 19 Sep 2011, Marcin Borkowski wrote: I'd like to have some MP code shared between unique graphics (in MkIV). One example: I'd like to have drawoptions for all graphics.

Re: [NTG-context] metafun shared code

2011-09-19 Thread Marcin Borkowski
Dnia 2011-09-19, pon o godzinie 11:19 -0400, Aditya Mahajan pisze: > On Mon, 19 Sep 2011, Marcin Borkowski wrote: > > > I'd like to have some MP code shared between unique graphics (in MkIV). > > > > One example: I'd like to have drawoptions for all graphics. > > \startMPinclusions >drawopti

Re: [NTG-context] metafun shared code

2011-09-19 Thread Peter Rolf
Am 19.09.2011 17:01, schrieb Marcin Borkowski: > Hi all, > > I'd like to have some MP code shared between unique graphics (in MkIV). > > One example: I'd like to have drawoptions for all graphics. > > Another one: I'd like to have two similar (but different) unique > graphics, and I'd like them

Re: [NTG-context] metafun shared code

2011-09-19 Thread Meer, H. van der
I am using code between \startMPinclusions .. \stopMPinclusions while later additions can be accumulated with \startMPinclusions[+] .. \stopMPinclusions Hans van der Meer On 19 sep. 2011, at 17:01, Marcin Borkowski wrote: > Hi all, > > I'd like to have some MP code shared between unique graphi

Re: [NTG-context] metafun shared code

2011-09-19 Thread Aditya Mahajan
On Mon, 19 Sep 2011, Marcin Borkowski wrote: I'd like to have some MP code shared between unique graphics (in MkIV). One example: I'd like to have drawoptions for all graphics. \startMPinclusions drawoptions(...) ; \stopMPinclusions Another one: I'd like to have two similar (but differen

[NTG-context] metafun shared code

2011-09-19 Thread Marcin Borkowski
Hi all, I'd like to have some MP code shared between unique graphics (in MkIV). One example: I'd like to have drawoptions for all graphics. Another one: I'd like to have two similar (but different) unique graphics, and I'd like them to share some code. How to do these two things? Best -- Ma

Re: [NTG-context] "externalfigure" vs. "draw externalfigure" in metafun

2011-09-17 Thread Nicola
In article , Mojca Miklavec wrote: > do you have any idea what > exactly would have to be fixed in ConTeXt core code? Edit mp-spec.mp and change the line draw p withcolor ... with image(draw p withcolor ...) The line is in the body of the doexternalfigure macro. Then, 'draw externalfi

Re: [NTG-context] "externalfigure" vs. "draw externalfigure" in metafun

2011-09-17 Thread Hans Hagen
On 17-9-2011 11:32, Mojca Miklavec wrote: Hans? is in "too busy mode" currently .. more later (but the metafun mkiv way is conceptually more ok so we might need to change metafun mk

Re: [NTG-context] "externalfigure" vs. "draw externalfigure" in metafun

2011-09-17 Thread Mojca Miklavec
On Sat, Sep 17, 2011 at 11:11, Nicola wrote: > > Does the following workaround work for you? If Hans is willing to fix metafun, I would prefer to avoid workarounds. (I don't care which syntax is used, but I would be grateful if the same syntax worked in both mkii and mkiv.) Since you

Re: [NTG-context] "externalfigure" vs. "draw externalfigure" in metafun

2011-09-17 Thread Nicola
In article , Nicola wrote: > Does the following workaround work for you? > > def mydraw text t = >def f = begingroup t endgroup enddef; >if picture f : draw f ; fi > enddef; > mydraw externalfigure "abc.png" xyscaled (5cm,8cm); This may be better: def mydraw text t = _mydraw begingr

Re: [NTG-context] "externalfigure" vs. "draw externalfigure" in metafun

2011-09-17 Thread Nicola
In article , Mojca Miklavec wrote: > Dear Hans, > > I have problems with externalfigure inside metapost. > > In MKII, only > externalfigure "something.png"; > works, while in MKIV only > draw externalfigure "something.png"; > is accepted. > > Is there any chance to accept one of the

Re: [NTG-context] "externalfigure" vs. "draw externalfigure" in metafun

2011-09-16 Thread Andreas Schneider
On 16.09.2011 16:00, Mojca Miklavec wrote: Dear Hans, I have problems with externalfigure inside metapost. In MKII, only externalfigure "something.png"; works, while in MKIV only draw externalfigure "something.png"; is accepted. Is there any chance to accept one of the syntaxes in bo

[NTG-context] "externalfigure" vs. "draw externalfigure" in metafun

2011-09-16 Thread Mojca Miklavec
Dear Hans, I have problems with externalfigure inside metapost. In MKII, only externalfigure "something.png"; works, while in MKIV only draw externalfigure "something.png"; is accepted. Is there any chance to accept one of the syntaxes in both flavours? Thank you, Mojca Minimal exam

Re: [NTG-context] Metafun shifting pictures - again

2011-06-24 Thread Hans Hagen
On 24-6-2011 8:32, dalyoung wrote: Dear Hans, Thank you for the suggestion to use "setbounds". And sorry to send you a untested sample file which is not working. However, I couldn't succeed because of my lack of knowledge on "setbounds, boundingbox". Instead, I try to use "addto" and get a w

Re: [NTG-context] Metafun shifting pictures - again

2011-06-23 Thread dalyoung
Dear Hans, Thank you for the suggestion to use "setbounds". And sorry to send you a untested sample file which is not working. However, I couldn't succeed because of my lack of knowledge on "setbounds, boundingbox". Instead, I try to use "addto" and get a wanted result. There is a better way t

Re: [NTG-context] Metafun shifting pictures - again

2011-06-23 Thread Hans Hagen
On 23-6-2011 6:32, Jeong Dalyoung wrote: Hi all, I got the reason why the pictures locate in different position. "rotation" causes the problem. I defined domino as follows. It is not the exact code but just show the form of the codes. def domino (a, b, c, d ) save pic; pi

Re: [NTG-context] Metafun shifting pictures - again

2011-06-22 Thread Jeong Dalyoung
Hi all, I got the reason why the pictures locate in different position. "rotation" causes the problem. I defined domino as follows. It is not the exact code but just show the form of the codes. ... def domino (a, b, c, d ) save pic; picture pic; draw something 1;

Re: [NTG-context] Metafun: shifting picture-solved with experiments.

2011-06-22 Thread dalyoung
Hi, Changing the code as following, it moves to the correct location. There may be a problem using pic := currentpicture; Instead of using draw pic scaled DieSize shifted (dx,dy); apply the shift directly to "draw pips". I just guess that some number are not cleared when I use p

[NTG-context] Metafun: shifting picture

2011-06-22 Thread dalyoung
Hi, I am trying to draw dominos using metapost and ConTeXt. I borrow part of the code in Threeddice.mp by Dan Lueking for drawing dots. To display blank dominos where I want and drawing one domino work well but drawing several dominos where I want is not working well. (compare domino0 and domin

Re: [NTG-context] [metafun] MPenvironment / font switching

2011-06-10 Thread Mojca Miklavec
On Thu, Jun 9, 2011 at 23:20, Philipp Gesang wrote: > Hi all, > > I’m struggling with the font used in metapost. The only way to > actually change it appears to be enclosing the mp graphic in two > statements of \setupbodyfont[…] -- which I need to avoid. In the > following example, the background

Re: [NTG-context] [metafun] MPenvironment / font switching

2011-06-09 Thread Philipp Gesang
On 2011-06-09 <23:31:49>, Wolfgang Schuster wrote: > > Am 09.06.2011 um 23:20 schrieb Philipp Gesang: > > · > > > > \startMPenvironment %[global] > > \switchtobodyfont[sans] > > %\setupbodyfont[sans] > > \stopMPenvironment > >

Re: [NTG-context] [metafun] MPenvironment / font switching

2011-06-09 Thread Wolfgang Schuster
Am 09.06.2011 um 23:20 schrieb Philipp Gesang: > Hi all, > > I’m struggling with the font used in metapost. The only way to > actually change it appears to be enclosing the mp graphic in two > statements of \setupbodyfont[…] -- which I need to avoid. In the > following example, the background te

[NTG-context] [metafun] MPenvironment / font switching

2011-06-09 Thread Philipp Gesang
Hi all, I’m struggling with the font used in metapost. The only way to actually change it appears to be enclosing the mp graphic in two statements of \setupbodyfont[…] -- which I need to avoid. In the following example, the background text should be typeset (drawn) as lm sans, whereas the main fon

[NTG-context] [metafun] graphictext in mkiv

2011-05-27 Thread Marco
The »graphictext« makro does not work in mkiv, is it a bug or intended? This example works in mkii: \starttext \startMPcode draw image(graphictext "FooBar" scaled 8); \stopMPcode \stoptext Marco ___ If your question

Re: [NTG-context] Using text as a clip path for Metafun & free shape paragraphs

2011-05-22 Thread Hans Hagen
On 22-5-2011 5:09, Otso Helenius wrote: With this feature one could define for example a 2-page spread for a magazine (with free shape graphics and columns) in between two ordinarily defined pages and would not have to manually disrupt the body text flow through the document. It can probably

[NTG-context] Using text as a clip path for Metafun & free shape paragraphs

2011-05-22 Thread Otso Helenius
t pictures with pictures (only with masks), nor have I found a way in any of the manuals (mmakempy.pdf, metafun-p.pdf, metapostmanual.pdf) to output text outline as paths which could be used for cutting a hole in the mask picture. Is this possible? 2) MP gives an easy way to format free flowing p

[NTG-context] Positional graphics (MetaFun)!

2011-05-03 Thread Verhaag, G.C.H.M.
Hi, Inspired by the examples given in the MetaFun manual (Oct. 2010) I tried a few, but I can't get them working! I'm specially interested in the 'Anchors and layers' (p.257, screen version!) feature. I typed in the MetaPost code as given on page 260, defined the anchors

Re: [NTG-context] OT: drawing graphs: Asymptote, Gnuplot, MetaFun, …

2011-04-20 Thread Aditya Mahajan
On Mon, 18 Apr 2011, Paul Menzel wrote: The only downside of Asymptote I found so far is, that there is no mailing list. Asymptote has fairly active forums on sourceforge http://sourceforge.net/projects/asymptote/forums/forum/409349 and at art of problem solving http://www.artofproblemsolvin

Re: [NTG-context] writing a label with a subscript in MetaFun.

2011-04-20 Thread Jeong Dalyoung
Dear Zhichu and Aditya, Thank you for the solution. label (textext("$z_{" & decimal (i) & "}$" ), z[i]) ; is working well. Best regards, Dalyoung ___ If your question is of interest to others as well, please add an

Re: [NTG-context] writing a label with a subscript in MetaFun.

2011-04-19 Thread Aditya Mahajan
On Wed, 20 Apr 2011, Jeong Dalyoung wrote: Dear all, I'd like to write a label with a subscript in MetaFun where the subscript is a variable. I tried in several way but not succeed. The best which I made is for i= 0 upto 8: label( "z" & decimal i, z[i]); endfor; Untes

Re: [NTG-context] writing a label with a subscript in MetaFun.

2011-04-19 Thread Zhichu Chen
try label (textext("$z_{" & decimal (i) & "}$" ), z[i]) ; On Wed, Apr 20, 2011 at 10:03 AM, Jeong Dalyoung wrote: > Dear all, > > I'd like to write a label with a subscript in MetaFun where the subscript > is a variable. > > I tried in se

[NTG-context] writing a label with a subscript in MetaFun.

2011-04-19 Thread Jeong Dalyoung
Dear all, I'd like to write a label with a subscript in MetaFun where the subscript is a variable. I tried in several way but not succeed. The best which I made is for i= 0 upto 8: label( "z" & decimal i, z[i]); endfor; So the output is z1, z2, z3, ... And, the followi

Re: [NTG-context] OT: drawing graphs: Asymptote, Gnuplot, MetaFun, …

2011-04-18 Thread Mojca Miklavec
mplish that goal with easily. I > guess it can be done with any of those as seen by the demos [2][3]. > > I only have little experience using Gnuplot and I have never used > Asymptote or MetaFun. These three seem to be well integrated with > ConTeXt and I guess in the end I could just

Re: [NTG-context] OT: drawing graphs: Asymptote, Gnuplot, MetaFun, …

2011-04-18 Thread Pontus Lurcock
On Mon 18 Apr 2011, Paul Menzel wrote: > I only have little experience using Gnuplot and I have never used > Asymptote or MetaFun. These three seem to be well integrated with > ConTeXt and I guess in the end I could just create the image files > and include these in to my ConTeXt sou

[NTG-context] OT: drawing graphs: Asymptote, Gnuplot, MetaFun, …

2011-04-18 Thread Paul Menzel
demos [2][3]. I only have little experience using Gnuplot and I have never used Asymptote or MetaFun. These three seem to be well integrated with ConTeXt and I guess in the end I could just create the image files and include these in to my ConTeXt source. The only downside of Asymptote I found so

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