Re: [NTG-context] Metapost and underscore

2010-09-20 Thread Aditya Mahajan
On Mon, 20 Sep 2010, Taco Hoekwater wrote: On 09/20/2010 08:34 AM, Aditya Mahajan wrote: Hi, Really bad things happen if the variable name in metapost contains an underscore. It took me quite a while to isolate this problem. The metapost string comparisons were broken until luatex 0.63

[NTG-context] tex placeholder for use in metapost/metafun

2010-09-10 Thread Martin 'golodhrim' Scholz
Hi everybody, as I like to desing a CI for an publishing Cover for an Organisation, I have a question about usage: What I wanna do is, having placeholders in the metapost coverpage, it should work like \author{} \title{} \swlogo{} in the preamble and should be automatically placed

Re: [NTG-context] tex placeholder for use in metapost/metafun

2010-09-10 Thread Wolfgang Schuster
Am 10.09.2010 um 22:45 schrieb Martin 'golodhrim' Scholz: Hi everybody, as I like to desing a CI for an publishing Cover for an Organisation, I have a question about usage: What I wanna do is, having placeholders in the metapost coverpage, it should work like \author{} \title

Re: [NTG-context] Issues with MetaPost boxes

2010-08-22 Thread Andreas Schneider
Taco Hoekwater wrote: There were actually two metapost bugs from that single example. Next week's luatex beta will have a fix for both. Since I need this fix pretty soon, I thought a svn checkout and build might be a good idea. Getting luatex 0.62 beta compiled and running wasn't a problem

Re: [NTG-context] Issues with MetaPost boxes

2010-08-22 Thread taco
Andreas Schneider wrote: Taco Hoekwater wrote: There were actually two metapost bugs from that single example. Next week's luatex beta will have a fix for both. The fix is still in the metapost repository. I'll release a new luatex beta tomorrow morning (with the fix). Best wishes, Taco

Re: [NTG-context] Issues with MetaPost boxes

2010-08-15 Thread Taco Hoekwater
On 08/14/2010 05:40 PM, taco wrote: Andreas Schneider wrote: Since some weeks I have strange problems with MetaPost in MKIV (beta). The attached example should (and did in the past) output a central box (Fakt) surrounded by five boxes named Dimension. However some of them (in that particular

Re: [NTG-context] Issues with MetaPost boxes

2010-08-15 Thread Andreas Schneider
On Sun, 15 Aug 2010 17:34:25 +0200, Taco Hoekwater t...@elvenkind.com wrote: There were actually two metapost bugs from that single example. Next week's luatex beta will have a fix for both. Thanks for investigating and fixing it so fast! (well, I hope; we will see ;-)) Best Regards, Andreas

[NTG-context] Issues with MetaPost boxes

2010-08-14 Thread Andreas Schneider
Since some weeks I have strange problems with MetaPost in MKIV (beta). The attached example should (and did in the past) output a central box (Fakt) surrounded by five boxes named Dimension. However some of them (in that particular example one) is drawn wrong: the box is on the right spot

Re: [NTG-context] Issues with MetaPost boxes

2010-08-14 Thread taco
Andreas Schneider wrote: Since some weeks I have strange problems with MetaPost in MKIV (beta). The attached example should (and did in the past) output a central box (Fakt) surrounded by five boxes named Dimension. However some of them (in that particular example one) is drawn wrong: the box

Re: [NTG-context] metapost and lua

2010-08-06 Thread Hans Hagen
On 6-8-2010 12:32, Philipp Gesang wrote: Hi all! [1] Is there a Lua interface for metapost? I'm thinking of something like cld is for TeX here. All I figured out so far is how to generate mp code (as strings) in Lua and then having it processed by mplib

Re: [NTG-context] metapost and lua

2010-08-06 Thread Hans Hagen
Hi, I've added \MPdrawing and \MPcode so that less calls are needed for i=1,100,5 do context.MPdrawing(draw fullsquare scaled ..i .. mm withcolor white;) end Hans - Hans Hagen |

Re: [NTG-context] metapost and lua

2010-08-06 Thread Philipp Gesang
On 2010-08-06 13:34:20, Hans Hagen wrote: how about: \starttext \startluacode context.startMPcode() context(draw fullcircle scaled 10cm;) context.stopMPcode() context.resetMPdrawing() context.startMPdrawing() context(fill fullcircle scaled 10cm;) context.stopMPdrawing() for

Re: [NTG-context] metapost and lua

2010-08-06 Thread Philipp Gesang
On 2010-08-06 13:44:14, Hans Hagen wrote: Hi, I've added \MPdrawing and \MPcode so that less calls are needed Great! Many thanks for this. Philipp pgp7YJZdtu02k.pgp Description: PGP signature ___ If your

[NTG-context] metapost and lua

2010-08-05 Thread Philipp Gesang
Hi all! [1] Is there a Lua interface for metapost? I'm thinking of something like cld is for TeX here. All I figured out so far is how to generate mp code (as strings) in Lua and then having it processed by mplib, but as the metafun manual is from 2002

Re: [NTG-context] metapost and lua

2010-08-05 Thread Hans Hagen
On 6-8-2010 12:32, Philipp Gesang wrote: [1a]If not [1], then: will there ever be something like this? it's on my agenda to look into this [2] There's an example for “metapost.process()” in mlib-ctx.mkiv but I can't get it to work. I simply copypasted it as follows: i

Re: [NTG-context] Passing info from MetaPost to TeX

2010-08-01 Thread Taco Hoekwater
On 08/01/2010 12:16 PM, Oliver Buerschaper wrote: Hi Taco, Well, you could create a temporary file from withing the metapost graphic, then read that file back on the TeX side, and then shift the image vertically based on the info from that. Could you give me a hint on how to parse

Re: [NTG-context] Passing info from MetaPost to TeX

2010-07-30 Thread Oliver Buerschaper
No answer :-( Does that mean it's impossible with current technology? Oliver is it possible to pass data from MetaPost back to TeX? This would be similar in spirit to, say, the MetaPost variable BodyFontSize that contains data from the TeX surrounding. Just the other way round. maybe

Re: [NTG-context] Passing info from MetaPost to TeX

2010-07-30 Thread Taco Hoekwater
On 07/30/2010 08:20 AM, Oliver Buerschaper wrote: No answer :-( Does that mean it's impossible with current technology? Well, you could create a temporary file from withing the metapost graphic, then read that file back on the TeX side, and then shift the image vertically based on the info

[NTG-context] Multi-line labels in MetaPost MKIV

2010-07-28 Thread Richard Stephens
Hello all, What is the recommended method for creating multi-line labels in MetaPost in MKIV, please? I have the following code: \definetextext[mplabel]{\framed[frame=off,align=middle]} \starttext \startMPpage input mp-tool; draw fullcircle scaled 5cm; label(\sometxt[mplabel]{One\\Two}, (0,0

Re: [NTG-context] Multi-line labels in MetaPost MKIV

2010-07-28 Thread Wolfgang Schuster
Am 28.07.10 10:03, schrieb Richard Stephens: Hello all, What is the recommended method for creating multi-line labels in MetaPost in MKIV, please? I have the following code: \definetextext[mplabel]{\framed[frame=off,align=middle]} \starttext \startMPpage input mp-tool; draw fullcircle

Re: [NTG-context] Multi-line labels in MetaPost MKIV

2010-07-28 Thread Richard Stephens
Am 28.07.10 10:03, schrieb Richard Stephens: Hello all, What is the recommended method for creating multi-line labels in MetaPost in MKIV, please? I have the following code: \definetextext[mplabel]{\framed[frame=off,align=middle]} \starttext \startMPpage input mp-tool; draw

Re: [NTG-context] Multi-line labels in MetaPost MKIV

2010-07-28 Thread Hans Hagen
On 28-7-2010 12:22, Richard Stephens wrote: Am 28.07.10 10:03, schrieb Richard Stephens: Hello all, What is the recommended method for creating multi-line labels in MetaPost in MKIV, please? I have the following code: \definetextext[mplabel]{\framed[frame=off,align=middle]} \starttext

Re: [NTG-context] Multi-line labels in MetaPost MKIV

2010-07-28 Thread Richard Stephens
What is the recommended method for creating multi-line labels in MetaPost in MKIV, please? I have the following code: \definetextext[mplabel]{\framed[frame=off,align=middle]} \starttext \startMPpage input mp-tool; draw fullcircle scaled 5cm; label(\sometxt[mplabel]{One\\Two}, (0,0

Re: [NTG-context] Multi-line labels in MetaPost MKIV

2010-07-28 Thread Hans Hagen
On 28-7-2010 4:08, Richard Stephens wrote: Thanks Hans, that works. Will this change be added to the next release, or do I have to re-apply it manually? will be in next release Is \sometxt not recommended now? Should I be using textext throughout? \sometxt will stay

Re: [NTG-context] Passing info from MetaPost to TeX

2010-07-24 Thread Oliver Buerschaper
is it possible to pass data from MetaPost back to TeX? This would be similar in spirit to, say, the MetaPost variable BodyFontSize that contains data from the TeX surrounding. Just the other way round. maybe future mlib versions will provide something like that (writing something from mp

Re: [NTG-context] Passing info from MetaPost to TeX

2010-07-22 Thread Hans Hagen
On 20-7-2010 2:00, Oliver Buerschaper wrote: Dear all, is it possible to pass data from MetaPost back to TeX? This would be similar in spirit to, say, the MetaPost variable BodyFontSize that contains data from the TeX surrounding. Just the other way round. maybe future mlib versions

[NTG-context] Passing info from MetaPost to TeX

2010-07-20 Thread Oliver Buerschaper
Dear all, is it possible to pass data from MetaPost back to TeX? This would be similar in spirit to, say, the MetaPost variable BodyFontSize that contains data from the TeX surrounding. Just the other way round. Best, Oliver Buerschaper

Re: [NTG-context] Metapost: union test of two paths

2010-07-04 Thread Taco Hoekwater
paths P and Q touch at time A, you could test whether the two points that are time(A+epsilon) and time(A-epsilon) are both inside() both paths. But the hardest thing with doing all this in metapost is that you cannot trust metaposts results in the mathematical sense: rounding errors creep in easily

Re: [NTG-context] Metapost: union test of two paths

2010-07-04 Thread Marco
Thanks for the hints. But the hardest thing with doing all this in metapost is that you cannot trust metaposts results in the mathematical sense: rounding errors creep in easily in the internal routines, which is one the problems I hope to solve with metapost 2. When is MP2 expected

Re: [NTG-context] Metapost: union test of two paths

2010-07-04 Thread Taco Hoekwater
On 07/04/2010 10:09 AM, Marco wrote: Thanks for the hints. But the hardest thing with doing all this in metapost is that you cannot trust metaposts results in the mathematical sense: rounding errors creep in easily in the internal routines, which is one the problems I hope to solve

Re: [NTG-context] Metapost: union test of two paths

2010-07-03 Thread Taco Hoekwater
On 07/02/2010 07:01 PM, Marco wrote: Hi, two arbitrary paths are given. A small path and a larger path, both cycled. How to find out if the smaller path lies completely »inside« the larger path? That is hard. The main problem is the word 'arbitrary'. An arbitrary path does not even have to

Re: [NTG-context] Metapost: union test of two paths

2010-07-03 Thread Taco Hoekwater
On 07/03/2010 10:03 AM, Taco Hoekwater wrote: If this is too complicated, it might help if I can find out if a given point lies inside a given cycled path. Even this is fairly tricky. Some important questions are: I thought this was a neat thing to try to write a macro for. Attached is a

Re: [NTG-context] Metapost: union test of two paths

2010-07-03 Thread Alan BRASLAU
chosen will be the easiest or the shortest one;'' So, in a Cartesian space, if the energy cost of a kink is low, than path p; p := origin--(100,100)--cycle; should be a straight line running back on itself. Indeed, this is what metapost produces. Now try p := origin..(100,100)..cycle; Alan

Re: [NTG-context] Metapost: union test of two paths

2010-07-03 Thread Taco Hoekwater
On 07/03/2010 12:19 PM, Taco Hoekwater wrote: On 07/03/2010 10:03 AM, Taco Hoekwater wrote: If this is too complicated, it might help if I can find out if a given point lies inside a given cycled path. Even this is fairly tricky. Some important questions are: I thought this was a neat

Re: [NTG-context] Metapost: union test of two paths

2010-07-03 Thread Taco Hoekwater
On 07/03/2010 12:33 PM, Alan BRASLAU wrote: So, in a Cartesian space, if the energy cost of a kink is low, than path p; p := origin--(100,100)--cycle; should be a straight line running back on itself. Indeed, this is what metapost produces. Now try p := origin..(100,100)..cycle

Re: [NTG-context] Metapost: union test of two paths

2010-07-03 Thread Marco
Hi Taco, many thanks for your effort! I'm just having a look at your code. Kind regards Marco ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl

Re: [NTG-context] Metapost: union test of two paths

2010-07-03 Thread Marco
Hi Taco! That is hard. The main problem is the word 'arbitrary'. Sorry, I was too general. The paths are a outline of a relatively simple shape (so border cases should rarely occur) with area 0k, not selfintersecting. * is a point *on* the path in or out? It doesn't matter in my case. This

[NTG-context] Metapost: union test of two paths

2010-07-02 Thread Marco
Hi, two arbitrary paths are given. A small path and a larger path, both cycled. How to find out if the smaller path lies completely »inside« the larger path? If this is too complicated, it might help if I can find out if a given point lies inside a given cycled path. I hope it's understandable

[NTG-context] [metapost] mptopdf from the command line in ConTeXt minimals?...

2010-06-30 Thread Stuart Hungerford
Hi, I'm a ConTeXt and Metapost newbie, so apologies in advance if this is a stupid question. I've successfully installed ConTeXt minimals on an OS/X 10.6.x system and it seems to be running okay. I'd like to run some metapost examples from the command line and mpost also seems to be running

Re: [NTG-context] [metapost] mptopdf from the command line in ConTeXt minimals?...

2010-06-30 Thread Mojca Miklavec
On Wed, Jun 30, 2010 at 02:45, Stuart Hungerford wrote: I've seen references to a mptopdf script and there is a Perl script of that name but it looks like it needs to be installed somewhere.  Is there some post-setup procedure I need to follow to access mptopdf or another one I've seen

Re: [NTG-context] [metapost] mptopdf from the command line in ConTeXt minimals?...

2010-06-30 Thread luigi scarso
On Wed, Jun 30, 2010 at 2:45 AM, Stuart Hungerford stuart.hungerf...@anu.edu.au wrote: Hi, I'm a ConTeXt and Metapost newbie, so apologies in advance if this is a stupid question. I've successfully installed ConTeXt minimals on an OS/X 10.6.x system and it seems to be running okay.  I'd

Re: [NTG-context] metapost: shading and transparency

2010-06-18 Thread Taco Hoekwater
Marco wrote: Hi, while using shading in metapost I cannot get transparency work. The transparency is simply ignored and the result is the same colour as with no transparency specified. Same here, but I am not sure whether this is a bug or an undocumented limitation. Best wishes, Taco

Re: [NTG-context] metapost: shading and transparency

2010-06-18 Thread Mojca Miklavec
On Fri, Jun 18, 2010 at 09:19, Taco Hoekwater wrote: Marco wrote: while using shading in metapost I cannot get transparency work. The transparency is simply ignored and the result is the same colour as with no transparency specified. Same here, but I am not sure whether this is a bug

Re: [NTG-context] metapost: shading and transparency

2010-06-18 Thread Hans Hagen
On 18-6-2010 9:39, Mojca Miklavec wrote: On Fri, Jun 18, 2010 at 09:19, Taco Hoekwater wrote: Marco wrote: while using shading in metapost I cannot get transparency work. The transparency is simply ignored and the result is the same colour as with no transparency specified. Same here, but I

Re: [NTG-context] metapost: shading and transparency

2010-06-18 Thread Mojca Miklavec
On Fri, Jun 18, 2010 at 09:39, Mojca Miklavec wrote: From what I understand/remember, combining transparency and shading needs special treatment that hasn't been implemented. At least not yet. ... but it may work in TikZ (I would not bet that though) ... Mojca

Re: [NTG-context] metapost: shading and transparency

2010-06-18 Thread Marco
From what I understand/remember, combining transparency and shading needs special treatment that hasn't been implemented. At least not yet. ... but it may work in TikZ (I would not bet that though) ... Thanks for the tip. I haven't used it before. Marco

Re: [NTG-context] metapost: shading and transparency

2010-06-18 Thread Marco
On Fri, 18 Jun 2010 11:38:15 +0200, Hans Hagen pra...@wxs.nl wrote: On 18-6-2010 11:13, Mojca Miklavec wrote: On Fri, Jun 18, 2010 at 09:39, Mojca Miklavec wrote: From what I understand/remember, combining transparency and shading needs special treatment that hasn't been implemented. At

Re: [NTG-context] metapost: shading and transparency

2010-06-18 Thread Hans Hagen
On 18-6-2010 1:48, Marco wrote: On Fri, 18 Jun 2010 11:38:15 +0200, Hans Hagenpra...@wxs.nl wrote: On 18-6-2010 11:13, Mojca Miklavec wrote: On Fri, Jun 18, 2010 at 09:39, Mojca Miklavec wrote: From what I understand/remember, combining transparency and shading needs special treatment

Re: [NTG-context] metapost: shading and transparency

2010-06-18 Thread Marco
On Fri, 18 Jun 2010 21:56:53 +0200, Hans Hagen pra...@wxs.nl wrote: i just need to support combined mp tricks and so far i didn't need it I like the »just«! Does that mean it's easy/quickly to do? This feature would be very nice to have. It would make shading much more

[NTG-context] metapost: shading and transparency

2010-06-17 Thread Marco
Hi, while using shading in metapost I cannot get transparency work. The transparency is simply ignored and the result is the same colour as with no transparency specified. Here's an example that demonstrates the problem: \definecolor [a] [darkyellow] \definecolor [b] [r=1, g=1, b=1, a=1, t

[NTG-context] color in MKIV and Metapost

2010-06-14 Thread Erik Margraf
Dear All, the small example attached behaves in mkii (texexec) as expected. The string CONTEXT as well as a little square are colored. Using mkiv (context) only the little square is colored. The CONTEXT string is black. Tested on two different linux systems, both 64 Bit. -- CentOS 5, Context

Re: [NTG-context] color in MKIV and Metapost

2010-06-14 Thread Taco Hoekwater
. -- CentOS 5, Context 2010.05.24 13:05 -- Debian - Squeeze, Latest Beta from Yesterday (13.06) What am I missing? Please see this page: http://wiki.contextgarden.net/MkIV_Differences#Metapost Best wishes, Taco

Re: [NTG-context] color in MKIV and Metapost

2010-06-14 Thread Hans Hagen
On 14-6-2010 10:35, Erik Margraf wrote: Dear All, the small example attached behaves in mkii (texexec) as expected. The string CONTEXT as well as a little square are colored. Using mkiv (context) only the little square is colored. The CONTEXT string is black. Tested on two different linux

[NTG-context] Lua and metapost

2010-05-20 Thread Shiv Shankar Dayal
Hi all, Since ConTeXt has LuaTeX and it contains Lua interpreter so I wonder if it is possible to write Lua code which can generate Metapost code for graphics. MetaLua can also help here. However, I do not know how to develop a Lua library which can be integrated with ConTeXt but then again I

Re: [NTG-context] Lua and metapost

2010-05-20 Thread Shiv Shankar Dayal
Metapost code for graphics. MetaLua can also help here. However, I do not know how to develop a Lua library which can be integrated with ConTeXt but then again I have not looked in this matter. As you people may be knowing Prof. John Hobby has written a Haskell frontend for Metapost which generates

Re: [NTG-context] Ampersand in Metapost

2010-05-14 Thread Marco
it with backslash, so that metapost finally knows what to do. So, should all the \letter... commands (basically anything generated from char-def.lua) be unexpandable? What are the disadvantages of unexpandable commands? I'm not an expert. Why is this not done by default if it works better? You can also

Re: [NTG-context] Ampersand in Metapost

2010-05-14 Thread Hans Hagen
On 14-5-2010 12:06, Marco wrote: iii) Why should I better use \sometxt? sometxt was introduced in mkii to avoid text processing mp, i.e. it is done at the context end in the current run and mp only gets dimensions; so, it avoids the nested tex run in mkii there is some more trickery and

Re: [NTG-context] Ampersand in Metapost

2010-05-14 Thread Hans Hagen
On 14-5-2010 12:06, Marco wrote: for i=0 downto -3: ran; label(\sometxt{\bold{Test}}, (7cm,-4cm)) rotatedaround ((7cm,-4cm),i*20) withcolor transparent(normal, .2, (r,g,b)); endfor; because transparent overloads the mechanism that sometxt (textext) uses for passing info to tex

Re: [NTG-context] Ampersand in Metapost

2010-05-14 Thread Hans Hagen
On 14-5-2010 1:45, Marco wrote: On Fri, 14 May 2010 12:44:47 +0200, Hans Hagenpra...@wxs.nl wrote: On 14-5-2010 12:06, Marco wrote: for i=0 downto -3: ran; label(\sometxt{\bold{Test}}, (7cm,-4cm)) rotatedaround ((7cm,-4cm),i*20) withcolor transparent(normal, .2, (r,g,b));

Re: [NTG-context] Ampersand in Metapost

2010-05-14 Thread Hans Hagen
On 14-5-2010 3:07, Aditya Mahajan wrote: This is because the commands are interpreted with TeX before they are written to mpgraph.mp. The \letterampersand or \ generates the character alone: you need to preceed it with backslash, so that metapost finally knows what to do. So, should all

Re: [NTG-context] Ampersand in Metapost

2010-05-14 Thread Mojca Miklavec
On Fri, May 14, 2010 at 12:06, Marco wrote: On Fri, 14 May 2010 00:37:44 +0200, Mojca Miklavec wrote: PS: I would say: better use \sometxt which is far more reliable unless you have to use textext to do string manipulation. I don't know exactly which transformations are considered as »string

Re: [NTG-context] Ampersand in Metapost

2010-05-14 Thread Marco
, there is hardly a difference. I conclude by saying that \sometxt ist first choice if using MkII. In MkIV first choice is textext. Thanks for your reply (and your MyWay), it helped me get some insight into proper use of text in metapost. Marco

[NTG-context] Ampersand in Metapost

2010-05-13 Thread Marco
Hi, I have a problem producing an ampersand in metapost. In ConTeXt it works as expected. Have a look at the following example. \starttext \ % OK \startMPcode label(textext(\),origin); % produces error \stopMPcode \stoptext The compile time error message is as follows: ! Misplaced alignment

Re: [NTG-context] Ampersand in Metapost

2010-05-13 Thread Hans Hagen
On 13-5-2010 9:18, Marco wrote: Hi, I have a problem producing an ampersand in metapost. In ConTeXt it works as expected. Have a look at the following example. \starttext \ % OK \startMPcode label(textext(\),origin); % produces error \stopMPcode \stoptext The compile time error message

Re: [NTG-context] Ampersand in Metapost

2010-05-13 Thread Mojca Miklavec
On Thu, May 13, 2010 at 22:58, Hans Hagen wrote: On 13-5-2010 9:18, Marco wrote: I have a problem producing an ampersand in metapost. In ConTeXt it works as expected. Have a look at the following example. \starttext \  % OK \startMPcode label(textext(\),origin); % produces error

Re: [NTG-context] Ampersand in Metapost

2010-05-13 Thread Marco
On Thu, 13 May 2010 22:58:46 +0200, Hans Hagen pra...@wxs.nl wrote: On 13-5-2010 9:18, Marco wrote: Hi, I have a problem producing an ampersand in metapost. In ConTeXt it works as expected. Have a look at the following example. \starttext \ % OK \startMPcode label(textext

Re: [NTG-context] Ampersand in Metapost

2010-05-13 Thread Mojca Miklavec
On Thu, May 13, 2010 at 23:45, Marco net...@lavabit.com wrote: On Thu, 13 May 2010 22:58:46 +0200, Hans Hagen pra...@wxs.nl wrote: On 13-5-2010 9:18, Marco wrote: Hi, I have a problem producing an ampersand in metapost. In ConTeXt it works as expected. Have a look at the following

Re: [NTG-context] Ampersand in Metapost

2010-05-13 Thread Aditya Mahajan
On Fri, 14 May 2010, Mojca Miklavec wrote: On Thu, May 13, 2010 at 23:45, Marco net...@lavabit.com wrote: On Thu, 13 May 2010 22:58:46 +0200, Hans Hagen pra...@wxs.nl wrote: On 13-5-2010 9:18, Marco wrote: Hi, I have a problem producing an ampersand in metapost. In ConTeXt it works

[NTG-context] How to get randomly coloured text in metapost?

2010-05-11 Thread Marco
), (i*1cm,-2cm)); endfor; \stopuseMPgraphic \useMPgraphic {1} \stoptext Is it possible to get the metapost construct »withcolor« to work with text or do I have to take a different approach? Thanks for any help. Marco

Re: [NTG-context] How to get randomly coloured text in metapost?

2010-05-11 Thread Alan BRASLAU
the following construct for i=0 upto 5: label(textext(\color[static]Test), (i*1cm,-2cm)); endfor; \stopuseMPgraphic \useMPgraphic {1} \stoptext Is it possible to get the metapost construct »withcolor« to work with text or do I have to take a different approach? Thanks for any help. Marco

Re: [NTG-context] How to get randomly coloured text in metapost?

2010-05-11 Thread Marco
Is it possible to get the metapost construct »withcolor« to work with text or do I have to take a different approach? I understood from a much earlier discussion with Hans that withcolor will not be made to work with text, whose color therefore has to be set with ConTeXt constructs. Thanks

Re: [NTG-context] How to get randomly coloured text in metapost?

2010-05-11 Thread Hans Hagen
On 11-5-2010 7:38, Marco wrote: label(textext(\definecolor[my][r=\r,g=\r,b=\r]\color[my]{Test}), % (i*1cm,-3cm)); numeric r, g, b ; r := uniformdeviate 1 ; g := uniformdeviate 1 ; b := uniformdeviate 1 ; textext(\colored[r= r ,g= g ,b= b ]{Test}) etc

Re: [NTG-context] How to get randomly coloured text in metapost?

2010-05-11 Thread Marco
numeric r, g, b ; r := uniformdeviate 1 ; g := uniformdeviate 1 ; b := uniformdeviate 1 ; textext(\colored[r= r ,g= g ,b= b ]{Test}) Thanks for this snipped, Hans. It looks promising, but I get the following compile error: !mplib : mp terminal: \colored [r=

Re: [NTG-context] How to get randomly coloured text in metapost?

2010-05-11 Thread Mojca Miklavec
On Tue, May 11, 2010 at 21:03, Marco wrote: numeric r, g, b ; r := uniformdeviate 1 ; g := uniformdeviate 1 ; b := uniformdeviate 1 ; textext(\colored[r= r ,g= g ,b= b ]{Test}) Thanks for this snipped, Hans. It looks promising, but I get the following compile error:    !mplib      

Re: [NTG-context] How to get randomly coloured text in metapost?

2010-05-11 Thread luigi scarso
On Tue, May 11, 2010 at 9:27 PM, Mojca Miklavec mojca.miklavec.li...@gmail.com wrote: On Tue, May 11, 2010 at 21:03, Marco wrote: numeric r, g, b ; r := uniformdeviate 1 ; g := uniformdeviate 1 ; b := uniformdeviate 1 ; textext(\colored[r= r ,g= g ,b= b ]{Test}) Thanks for this

Re: [NTG-context] How to get randomly coloured text in metapost?

2010-05-11 Thread Marco
You need to convert number to string first. Use decimal(r) instead of r. (But I didn't test.) Mojca Thanks, Mojca. Works like a charm now. Marco ___ If your question is of interest to others as well, please add

[NTG-context] Running standalone metapost file omits spaces between btex and etex

2010-05-07 Thread Hongwen Qiu
to get the correct results when running standalong metapost file with btex-etex strings. Thanks. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl

[NTG-context] Problems with metapost in texlive 2009

2010-04-24 Thread Ram Potluri
I had a working installation of texlive 2007 on my opensuse 11.0 machine. I had metapost working nicely converting my *.mp files into *.pdf files. Yesterday, I upgraded to texlive 2009 that is available at http://software.opensuse.org/search/download?base=openSUSE%3A11.0fil...http://www.google.com

Re: [NTG-context] MetaPost Animation

2010-04-16 Thread Boštjan Vesnicer
,-0.5) scaled 75; \stopMPcode} \starttext \dostepwiserecurse{0}{20}{1}{% \startTEXpage \MyGraphics{\recurselevel} \stopTEXpage} \stoptext Regards, Bostjan On Thu, Apr 15, 2010 at 7:53 PM, Troy Henderson thend...@gmail.com wrote: I am trying to create an animation in ConTeXt + MetaPost

Re: [NTG-context] MetaPost Animation

2010-04-16 Thread Hans Hagen
On 16-4-2010 9:36, Boštjan Vesnicer wrote: Hi Troy Here is a simple solution: \def\MyGraphics#1{% \startMPcode path p,q; p:=fullcircle scaled 72; L:=length p; N:=20; q:=subpath (0,#1/N*L) of p; draw q withcolor red; fill fullcircle scaled 3 shifted point length q of q withcolor blue; setbounds

Re: [NTG-context] MetaPost Animation

2010-04-16 Thread Troy Henderson
available in the second block? In pure MetaPost, I can do numeric a:=4; beginfig(1); label(decimal(a),origin); endfig; beginfig(2); label(decimal(a),origin); endfig; end and both figures have the value of 'a' available to them because 'a' was defined before each figure. What is the ConTeXt

Re: [NTG-context] MetaPost Animation

2010-04-16 Thread Boštjan Vesnicer
If I have two different \startMPcode ... \stopMPcode sections, is there a way (perhaps it does this by default) to have the variables stored in the first block available in the second block? In pure MetaPost, I can do numeric a:=4; beginfig(1); label(decimal(a),origin); endfig

Re: [NTG-context] MetaPost Animation

2010-04-16 Thread Wolfgang Schuster
Am 16.04.10 14:51, schrieb Troy Henderson: If I have two different \startMPcode ... \stopMPcode sections, is there a way (perhaps it does this by default) to have the variables stored in the first block available in the second block? In pure MetaPost, I can do numeric a:=4; beginfig(1

[NTG-context] MetaPost Animation

2010-04-15 Thread Troy Henderson
I am trying to create an animation in ConTeXt + MetaPost. In particular, I would like to have ConTeXt + MetaPost generate each individual frame of the animation, and then I would like to place each of these graphics on the page in succession. I am looking for a ConTeXt way without placing

[NTG-context] MetaPost in TABLEs ?

2010-04-11 Thread Steffen Wolfrum
Hi all, In a book on construction engineering I found two kind of tables that presumably could be set very nicely in ConTeXt (see attachments). Set with MetaPost within natural tables? 1) Curly braces that span over cells: Their height should be depending to the cell's height (nr=2 oder nr=3

Re: [NTG-context] MetaPost in TABLEs ?

2010-04-11 Thread Hans Hagen
On 11-4-2010 3:25, Steffen Wolfrum wrote: Hi all, In a book on construction engineering I found two kind of tables that presumably could be set very nicely in ConTeXt (see attachments). Set with MetaPost within natural tables? 1) Curly braces that span over cells: Their height should

Re: [NTG-context] MetaPost in TABLEs ?

2010-04-11 Thread Steffen Wolfrum
Am 11.04.2010 um 17:51 schrieb Hans Hagen: On 11-4-2010 3:25, Steffen Wolfrum wrote: Hi all, In a book on construction engineering I found two kind of tables that presumably could be set very nicely in ConTeXt (see attachments). Set with MetaPost within natural tables? 1) Curly

Re: [NTG-context] MetaPost in TABLEs ?

2010-04-11 Thread Hans Hagen
On 11-4-2010 6:10, Steffen Wolfrum wrote: Thank you Hans! I can imagine that this fits on the first example. Do you also have an idea on the second case, the arrows from one table cell to another? (Does it has to be so complex as in metafun manual, page 140: 5.2 Anchors and layers??)

Re: [NTG-context] MetaPost in TABLEs ?

2010-04-11 Thread Vianney le Clément
use textbackgrounds ... instead of drawing lines you then do a textext that does a \left{ in math alongside a vbox that has the height of the lefgt boundary etc etc That would be really interesting for a project I'm working on (a songbook). I thought textbackgrounds could only put a color

Re: [NTG-context] MetaPost in TABLEs ?

2010-04-11 Thread Steffen Wolfrum
Am 11.04.2010 um 18:31 schrieb Hans Hagen: On 11-4-2010 6:10, Steffen Wolfrum wrote: Thank you Hans! I can imagine that this fits on the first example. Do you also have an idea on the second case, the arrows from one table cell to another? (Does it has to be so complex as in metafun

Re: [NTG-context] SVG 2 MetaPost/MetaFun

2010-04-05 Thread Taco Hoekwater
Matija Šuklje wrote: Dne nedelja 4. aprila 2010 ob 23:23:10 je Mojca Miklavec napisal(a): Start with http://www.tug.org/docs/metapost/mpman.pdf and maybe the metafun manual. Thanks yet again :] The metafun manual is easier to read than the 'real' mpman.pdf which assume some of knowledge

Re: [NTG-context] SVG 2 MetaPost/MetaFun

2010-04-05 Thread Hans Hagen
directly. So the only solutions would be a) if ConTeXt could use in-line SVG or b) I'll have to port the SVG logo into MetaPost. Is there a non-overhelming howto somewhere ...It's a relatively simple logo (see attachment) :\ svg - pdf (using inkscape) - mp (using pstoedit

[NTG-context] SVG 2 MetaPost/MetaFun

2010-04-04 Thread Matija Šuklje
Is there a SVG to MetaPost/MetaFun converter available? I want to get this quite simple logo to converted from SVG into a ConTeXt- native vector graphic. Cheers, Matija P.S. Too bad SVG is not ConTeXt-native (yet?) -- gsm: +386 41 849 552 www: http://matija.suklje.name xmpp: matija.suk

Re: [NTG-context] SVG 2 MetaPost/MetaFun

2010-04-04 Thread Peter Wüsten
-images you might want to use Inkscape: inkscape --export-pdf=PDF filename SVG filename Peter Wüsten Matija Suklje schrieb: Is there a SVG to MetaPost/MetaFun converter available? I want to get this quite simple logo to converted from SVG into a ConTeXt- native vector graphic. Cheers, Matija

Re: [NTG-context] SVG 2 MetaPost/MetaFun

2010-04-04 Thread Matija Šuklje
would be a) if ConTeXt could use in-line SVG or b) I'll have to port the SVG logo into MetaPost. Is there a non-overhelming howto somewhere ...It's a relatively simple logo (see attachment) :\ Cheers, Matija -- gsm: +386 41 849 552 www: http://matija.suklje.name xmpp: matija.suk...@gabbler.org

Re: [NTG-context] SVG 2 MetaPost/MetaFun

2010-04-04 Thread Mojca Miklavec
into my styling directly. So the only solutions would be a) if ConTeXt could use in-line SVG or b) I'll have to port the SVG logo into MetaPost. Is there a non-overhelming howto somewhere ...It's a relatively simple logo (see attachment) :\ I don't know of any waterproof way to convert from

Re: [NTG-context] SVG 2 MetaPost/MetaFun

2010-04-04 Thread Matija Šuklje
Dne nedelja 4. aprila 2010 ob 22:36:07 je Mojca Miklavec napisal(a): I don't know of any waterproof way to convert from SVG to metapost (all you can do is to convert it to PDF and use that PDF logo), but here's an approximation of your logo in metapost (the legs are wider - you'll need to fix

Re: [NTG-context] SVG 2 MetaPost/MetaFun

2010-04-04 Thread Wolfgang Schuster
Am 04.04.10 23:12, schrieb Matija Šuklje: BTW, is there a special command I'm missing to turn on the colours in ConTeXt? \setupcolors[state=start] Wolfgang ___ If your question is of interest to others as

Re: [NTG-context] SVG 2 MetaPost/MetaFun

2010-04-04 Thread Matija Šuklje
Dne nedelja 4. aprila 2010 ob 23:16:26 je Wolfgang Schuster napisal(a): Am 04.04.10 23:12, schrieb Matija Šuklje: BTW, is there a special command I'm missing to turn on the colours in ConTeXt? \setupcolors[state=start] /me is ashamed ...I found it the minute you sent the e-mail. Cheers,

Re: [NTG-context] SVG 2 MetaPost/MetaFun

2010-04-04 Thread Mojca Miklavec
On Sun, Apr 4, 2010 at 23:12, Matija Šuklje wrote: I'll dig through the manuals to figure out what that codeblock actually does and try to fix it. Start with http://www.tug.org/docs/metapost/mpman.pdf and maybe the metafun manual. Mojca

<    5   6   7   8   9   10   11   12   13   14   >