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

2010-04-04 Thread Matija Šuklje
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 :] Cheers, Matija -- gsm: +386 41 849 552 www: http://matija.suklje.name xmpp: matija.suk...@gabbler.org

Re: [NTG-context] Metapost inclusion does not work

2010-04-02 Thread Mojca Miklavec
On Thu, Apr 1, 2010 at 21:43, Marco wrote: Do you mean because of the old luatex binary (Hans seems to have been a bit busy in the meantime) in linux or is there some other reason? No. The luatex binary is way too old for the »beta« tree. But it's not a real problem as it always can be

Re: [NTG-context] Metapost inclusion does not work

2010-04-01 Thread Mojca Miklavec
On Wed, Mar 31, 2010 at 14:32, Marco wrote: Hi, Do you have all the formats generated? (mptopdf etc.) No. Thanks for the hint (the logfile also told me, I know now). It works now. The problem was that I use a system-wide setup and the $TEXMFCACHE tree was not writable by the users. I now

Re: [NTG-context] Metapost inclusion does not work

2010-04-01 Thread Marco
Hi Mojca You can most probably do export TEXMFCACHE=~/.context/texmf-cache as well (but then every user would have to generate his own database). OK. That's true. But then I will end up in redundant data. Maybe export TEXMFCACHE=/var/tmp/context/texmf-cache works. Then I have no world

Re: [NTG-context] Metapost inclusion does not work

2010-03-31 Thread Mojca Miklavec
On Wed, Mar 31, 2010 at 02:33, Marco net...@lavabit.com wrote: Hi, the following example just prints »Hello World!«, without the square. What's wrong? Do you have all the formats generated? (mptopdf etc.) Mojca

Re: [NTG-context] Metapost inclusion does not work

2010-03-31 Thread Marco
Hi, Do you have all the formats generated? (mptopdf etc.) No. Thanks for the hint (the logfile also told me, I know now). It works now. The problem was that I use a system-wide setup and the $TEXMFCACHE tree was not writable by the users. I now introduced the »chmod« line, see below. I'm not

[NTG-context] Metapost inclusion does not work

2010-03-30 Thread Marco
Hi, the following example just prints »Hello World!«, without the square. What's wrong? \startuseMPgraphic{test} fill fullsquare scaled 5cm; \stopuseMPgraphic \starttext Hello World! \useMPgraphic{test} \stoptext ConTeXt ver: 2010.03.20 22:59 MKIV this is luatex, version

Re: [NTG-context] Metapost inclusion does not work

2010-03-30 Thread luigi scarso
On Wed, Mar 31, 2010 at 2:33 AM, Marco net...@lavabit.com wrote: Hi, the following example just prints »Hello World!«, without the square. What's wrong? \startuseMPgraphic{test} fill fullsquare scaled 5cm; \stopuseMPgraphic \starttext Hello World! \useMPgraphic{test} \stoptext

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

2010-03-19 Thread Michal Suszko
* Taco Hoekwater t...@elvenkind.com [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 I

[NTG-context] Setting expansion depth limit for metapost

2010-03-17 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] Setting expansion depth limit for metapost

2010-03-17 Thread Taco Hoekwater
Michal Suszko wrote: 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

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

2010-03-17 Thread Michal Suszko
* Taco Hoekwater t...@elvenkind.com [2010-03-17 10:27:41 +0100]: Michal Suszko wrote: 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

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

2010-03-17 Thread Taco Hoekwater
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 context --make doesn't help. expansion depth is still at 1 in error message

Re: [NTG-context] Lua-loop inside MetaPost

2010-03-09 Thread Hans Hagen
On 9-3-2010 15:24, Wolfgang Schuster wrote: Am 09.03.10 15:17, schrieb Andreas Harder: Hi all, I can't find a solution for the following example: \starttext \startMPpage draw origin for i=0 step 10 until 100 : ..{down}(i,0) endfor ; \stopMPpage \startluacode context.startMPpage()

Re: [NTG-context] Lua-loop inside MetaPost

2010-03-09 Thread Andreas Harder
Am 09.03.2010 um 15:59 schrieb Hans Hagen: On 9-3-2010 15:24, Wolfgang Schuster wrote: Am 09.03.10 15:17, schrieb Andreas Harder: Hi all, I can't find a solution for the following example: \starttext \startMPpage draw origin for i=0 step 10 until 100 : ..{down}(i,0) endfor ;

Re: [NTG-context] Lua-loop inside MetaPost

2010-03-09 Thread Hans Hagen
On 9-3-2010 16:11, Andreas Harder wrote: context(..{down}(..i..,0)) – without %d Or is this deprecated? no, it's just lua sttring concatination ... it all depends on taste - Hans

Re: [NTG-context] Lua-loop inside MetaPost

2010-03-09 Thread Andreas Harder
Am 09.03.2010 um 15:24 schrieb Wolfgang Schuster: Am 09.03.10 15:17, schrieb Andreas Harder: Hi all, I can't find a solution for the following example: \starttext \startMPpage draw origin for i=0 step 10 until 100 : ..{down}(i,0) endfor ; \stopMPpage \startluacode

Re: [NTG-context] Lua-loop inside MetaPost

2010-03-09 Thread Wolfgang Schuster
Am 09.03.10 15:17, schrieb Andreas Harder: Hi all, I can't find a solution for the following example: \starttext \startMPpage draw origin for i=0 step 10 until 100 : ..{down}(i,0) endfor ; \stopMPpage \startluacode context.startMPpage() context(draw origin..for i=0,100,10

[NTG-context] Lua-loop inside MetaPost

2010-03-09 Thread Andreas Harder
Hi all, I can't find a solution for the following example: \starttext \startMPpage draw origin for i=0 step 10 until 100 : ..{down}(i,0) endfor ; \stopMPpage \startluacode context.startMPpage() context(draw origin..for i=0,100,10 do{down}(..i..,0)..end..;) context.stopMPpage()

Re: [NTG-context] MetaPost sarith (graph) package

2010-03-08 Thread Wolfgang Schuster
Am 08.03.10 08:58, schrieb Taco Hoekwater: Troy Henderson wrote: Is the sarith package usable in MKIV? For example, I would like to get the numerical (not string) values of auto.x and auto.y from the graph package. I expect the following example to work, but it does not (even if I input

Re: [NTG-context] MetaPost bug? in MKIV

2010-03-08 Thread Hans Hagen
On 3-3-2010 21:26, Wolfgang Schuster wrote: Am 03.03.10 21:21, schrieb Troy Henderson: I hate to beat a dead horse, but I want to understand this for certain. Is the consensus that graph.mp is incompatible with MKIV? If so, are there any plans to make it compatible? After all, graph.mp is part

Re: [NTG-context] MPinclusions/MetaPost sarith (graph) package

2010-03-08 Thread Alan BRASLAU
On Monday 08 March 2010 09:18:38 Wolfgang Schuster wrote: \startMPinclusions[+] input sarith; \stopMPinclusions This probably explains other problems that I had experienced concerning \startMPinclusions\stopMPinclusions... Indeed, as metapost is processed in one run under mkIV, I had

Re: [NTG-context] MPinclusions/MetaPost sarith (graph) package

2010-03-08 Thread luigi scarso
On Mon, Mar 8, 2010 at 3:28 PM, Alan BRASLAU alan.bras...@cea.fr wrote: (Currently I externally use awk via \immediate\write18 to manipulate data.) In mkiv you should be able to manipulate your data with lua lpeg. You gain in portability -- no need of an external awk -- luigi

Re: [NTG-context] MetaPost filesize

2010-03-07 Thread Mojca Miklavec
On Sat, Mar 6, 2010 at 20:33, Peter Rolf wrote: Am 06.03.2010 19:42, schrieb Troy Henderson: Ok then.  Now for a newbie question.  What is the best way to update LuaTeX?  I assumed the first-setup.sh script in my ConTeX-minimals installation would do it for me. i always update by hand, so

Re: [NTG-context] MetaPost filesize

2010-03-07 Thread luigi scarso
On Sun, Mar 7, 2010 at 10:45 AM, Mojca Miklavec mojca.miklavec.li...@gmail.com wrote: On Sat, Mar 6, 2010 at 20:33, Peter Rolf wrote: Am 06.03.2010 19:42, schrieb Troy Henderson: Ok then.  Now for a newbie question.  What is the best way to update LuaTeX?  I assumed the first-setup.sh script

[NTG-context] MetaPost + format(%g,n)

2010-03-07 Thread Troy Henderson
This code compiles fine with plain MetaPost. input graph; beginfig(0); draw begingraph(1in,1in); setrange((0,0),(1,1)); for n=auto.x: show format(%g,n); endfor; endgraph; endfig; end However, this ConTeXt translated version errors in MKIV \usemodule[graph

Re: [NTG-context] MetaPost + format(%g,n)

2010-03-07 Thread Troy Henderson
For the record, I'm not actually trying to show the picture that is returned by the format() function, but instead I want to assign the value of this picture to a variable, and it is erroring with that as well. Troy

Re: [NTG-context] MetaPost + format(%g,n)

2010-03-07 Thread Troy Henderson
Sorry for the flood. After some digging around it seems like the % should now be replaced by @. That is, I should use format(@g,n) Troy ___ If your question is of interest to others as well, please add an entry to

Re: [NTG-context] MetaPost + format(%g,n)

2010-03-07 Thread Troy Henderson
Is the sarith package usable in MKIV? For example, I would like to get the numerical (not string) values of auto.x and auto.y from the graph package. I expect the following example to work, but it does not (even if I input sarith) with MPinclusions. \usemodule[graph]

Re: [NTG-context] MetaPost sarith (graph) package

2010-03-07 Thread Taco Hoekwater
Troy Henderson wrote: Is the sarith package usable in MKIV? For example, I would like to get the numerical (not string) values of auto.x and auto.y from the graph package. I expect the following example to work, but it does not (even if I input sarith) with MPinclusions. This works:

[NTG-context] MetaPost filesize

2010-03-06 Thread Troy Henderson
I am writing because there appears to be a very large (i.e., approximately a factor of 10) difference in filesizes of the same MetaPost graphic generated in the following 2 ways (1) Including a common MetaPost source common.mp into a minimal MKIV document and compiling with `context surface.tex

Re: [NTG-context] MetaPost filesize

2010-03-06 Thread luigi scarso
On Sat, Mar 6, 2010 at 2:54 PM, Troy Henderson thend...@gmail.com wrote: I am writing because there appears to be a very large (i.e., approximately a factor of 10) difference in filesizes of the same MetaPost graphic generated in the following 2 ways (1) Including a common MetaPost source

Re: [NTG-context] MetaPost filesize

2010-03-06 Thread Troy Henderson
For the record, with color enabled, MKII has an output size of about 61kB. With color disabled, MKII has an output size of about 53kB. Both cases are significantly less than MKIV. Troy ___ If your question is of

Re: [NTG-context] MetaPost filesize

2010-03-06 Thread luigi scarso
On Sat, Mar 6, 2010 at 3:19 PM, Troy Henderson thend...@gmail.com wrote: For the record, with color enabled, MKII has an output size of about 61kB.  With color disabled, MKII has an output size of about 53kB. Both cases are significantly less than MKIV. mkii uses mptopdf by \write18 -- luigi

Re: [NTG-context] MetaPost filesize

2010-03-06 Thread Troy Henderson
Is there a way to get MKIV to compress it for me then automagically? Troy ___ 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 filesize

2010-03-06 Thread Peter Rolf
Am 06.03.2010 14:54, schrieb Troy Henderson: I am writing because there appears to be a very large (i.e., approximately a factor of 10) difference in filesizes of the same MetaPost graphic generated in the following 2 ways (1) Including a common MetaPost source common.mp into a minimal MKIV

Re: [NTG-context] MetaPost filesize

2010-03-06 Thread Troy Henderson
Peter, Is there anything special that you're doing? I've attached my LOG file from my MKIV run. Troy surface.log Description: Binary data ___ If your question is of interest to others as well, please add an entry

Re: [NTG-context] MetaPost filesize

2010-03-06 Thread Aditya Mahajan
On Sat, 6 Mar 2010, Troy Henderson wrote: Peter, Is there anything special that you're doing? I've attached my LOG file from my MKIV run. Using a newer version of MkIV. You are using 2010.02.20 (2nd line of the log) while Peter is using 2010.03.02. I use 2010.02.23 and get the same file

Re: [NTG-context] MetaPost filesize

2010-03-06 Thread Troy Henderson
Thanks Aditya. I'll update my ConTeXt distro then. Troy ___ 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 filesize

2010-03-06 Thread Troy Henderson
I updated my ConTeXt distro, and I'm still getting a similar filesize. I've attached the new LOG file. Troy surface.log Description: Binary data ___ If your question is of interest to others as well, please add an

Re: [NTG-context] MetaPost filesize

2010-03-06 Thread Wolfgang Schuster
Am 06.03.10 18:19, schrieb Troy Henderson: I updated my ConTeXt distro, and I'm still getting a similar filesize. Peter uses a newer LuaTeX. Wolfgang ___ If your question is of interest to others as well,

Re: [NTG-context] MetaPost filesize

2010-03-06 Thread Peter Rolf
time - 0.227 seconds mkiv lua stats : metapost processing time - 0.583 seconds, loading: 0.018 seconds, execution: 0.447 seconds, n: 1 mkiv lua stats : luatex banner - this is luatex, version beta-0.51.0-2010030215 (rev 3445) mkiv lua stats : control sequences

Re: [NTG-context] MetaPost filesize

2010-03-06 Thread Troy Henderson
What version of LuaTeX do you have? I have the following: This is LuaTeX, Version beta-0.50.0-2009122519 Troy ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist :

Re: [NTG-context] MetaPost filesize

2010-03-06 Thread Peter Rolf
Am 06.03.2010 18:49, schrieb Troy Henderson: What version of LuaTeX do you have? I have the following: This is LuaTeX, Version beta-0.50.0-2009122519 This is LuaTeX, Version beta-0.51.0-2010030215 (rev 3445) ___

Re: [NTG-context] MetaPost filesize

2010-03-06 Thread Troy Henderson
Ok then. Now for a newbie question. What is the best way to update LuaTeX? I assumed the first-setup.sh script in my ConTeX-minimals installation would do it for me. Troy ___ If your question is of interest to

Re: [NTG-context] MetaPost filesize

2010-03-06 Thread Peter Rolf
Am 06.03.2010 19:42, schrieb Troy Henderson: Ok then. Now for a newbie question. What is the best way to update LuaTeX? I assumed the first-setup.sh script in my ConTeX-minimals installation would do it for me. i always update by hand, so better ask Mojca about it. but as the context and

Re: [NTG-context] MetaPost filesize

2010-03-06 Thread Troy Henderson
Updating my LuaTeX did the trick folks. Thanks for the tip. Next question coming (in another thread). Troy ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist :

Re: [NTG-context] MetaPost filesize

2010-03-06 Thread Taco Hoekwater
Wolfgang Schuster wrote: Am 06.03.10 18:19, schrieb Troy Henderson: I updated my ConTeXt distro, and I'm still getting a similar filesize. Peter uses a newer LuaTeX. There was a bug in luatex that is now fixed in TRUNK. There will be a new official luatex beta (0.51) next week. Best

Re: [NTG-context] MetaPost bug? in MKIV

2010-03-03 Thread Troy Henderson
I hate to beat a dead horse, but I want to understand this for certain. Is the consensus that graph.mp is incompatible with MKIV? If so, are there any plans to make it compatible? After all, graph.mp is part of the base MP distribution. Troy

Re: [NTG-context] MetaPost bug? in MKIV

2010-03-03 Thread Wolfgang Schuster
Am 03.03.10 21:21, schrieb Troy Henderson: I hate to beat a dead horse, but I want to understand this for certain. Is the consensus that graph.mp is incompatible with MKIV? If so, are there any plans to make it compatible? After all, graph.mp is part of the base MP distribution.

[NTG-context] MetaPost bug? in MKIV

2010-03-02 Thread Troy Henderson
\starttext \useMPgraphic{foo} \stoptext The data stored in data.d is as follows: 0 0 1 1 2 4 When compiling with MKIV, the following error occurs: !mplib : mp terminal: (/opt/context-minimals/tex/texmf/metapost/base/graph.mp ! Redundant equation. to be read again ; l

Re: [NTG-context] MetaPost bug? in MKIV

2010-03-02 Thread Peter Rolf
/context-minimals/tex/texmf/metapost/base/graph.mp ! Redundant equation. to be read again ; l.143 Gmargin.low=-.07; % bbox fraction for default ra... ! Redundant equation. to be read again ; l.144

Re: [NTG-context] MetaPost bug? in MKIV

2010-03-02 Thread Taco Hoekwater
that this is only an incompatibility and not a bug. http://wiki.contextgarden.net/MkIV_Differences#Metapost Best wishes, Taco ... but it would be cool if there was a way to start a new mplib instance for each MPfigure

Re: [NTG-context] MetaPost bug? in MKIV

2010-03-02 Thread Peter Rolf
} \stoptext The data stored in data.d is as follows: 0 0 1 1 2 4 When compiling with MKIV, the following error occurs: !mplib : mp terminal: (/opt/context-minimals/tex/texmf/metapost/base/graph.mp ! Redundant equation. to be read again ; l.143 Gmargin.low

Re: [NTG-context] MetaPost bug? in MKIV

2010-03-02 Thread Troy Henderson
When using \startMPinclusions input graph; \stopMPinclusions or not even including the MPinclusions at all (and thus not doing `input graph;') seems to give the same result. The log of what happens during the compile process is attached. Troy log Description: Binary data

Re: [NTG-context] MetaPost bug? in MKIV

2010-03-02 Thread Peter Rolf
difference is the way text is handled in mkiv. In particular, color (withcolor) is not applied to metapost text. #redundant equations use ':=' for constants, etc. # unknown transform components (0,0,_tt_w_1,0,0,1) ! Transform components aren't all known. is this a problem with textext()? looks

Re: [NTG-context] METAPOST -- specifying an unknown point coordinate by giving the angle from another known point

2010-02-27 Thread James Fisher
, Nicola nvitacolo...@gmail.com wrote: In article 771da05a1002251718l55669a0co770b5a78bed84...@mail.gmail.com,  James Fisher jameshfis...@gmail.com wrote: This isn't specifically a ConTeXt question, but via it I've run into a seemingly simple problem in METAPOST that I just can't solve.  I'm trying

Re: [NTG-context] METAPOST -- specifying an unknown point coordinate by giving the angle from another known point

2010-02-26 Thread Nicola
In article 771da05a1002251718l55669a0co770b5a78bed84...@mail.gmail.com, James Fisher jameshfis...@gmail.com wrote: This isn't specifically a ConTeXt question, but via it I've run into a seemingly simple problem in METAPOST that I just can't solve. I'm trying to draw a parallelogram

[NTG-context] METAPOST -- specifying an unknown point coordinate by giving the angle from another known point

2010-02-25 Thread James Fisher
This isn't specifically a ConTeXt question, but via it I've run into a seemingly simple problem in METAPOST that I just can't solve. I'm trying to draw a parallelogram by specifying: (1) the length of sides parallel to the x-axis; (2) the total height of the figure; (3) one of the interior angles

Re: [NTG-context] METAPOST -- specifying an unknown point coordinate by giving the angle from another known point

2010-02-25 Thread Troy Henderson
James, Try this: z0 = origin; z1 = (5,0); z3 = 10*dir(87); z2 = z3-z0+z1; Troy Henderson ___ 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 -- specifying an unknown point coordinate by giving the angle from another known point

2010-02-25 Thread Troy Henderson
James, I apologize, but the previous information that I gave you was wrong. Try this instead: z0 = origin; z1 = (5,0); BL:=87; r:=10/sind(BL); z3 = r*dir(BL); z2 = z3-z0+z1; Troy ___ If your question is of interest

Re: [NTG-context] METAPOST -- specifying an unknown point coordinate by giving the angle from another known point

2010-02-25 Thread James Fisher
Aha! That certainly works. I suspected I would have to fall back on low-level trig :). Many thanks! On Fri, Feb 26, 2010 at 1:44 AM, Troy Henderson thend...@gmail.com wrote: James, I apologize, but the previous information that I gave you was wrong. Try this instead: z0 = origin; z1 =

Re: [NTG-context] METAPOST -- specifying an unknown point coordinate by giving the angle from another known point

2010-02-25 Thread Troy Henderson
James, How about this. BL:=87; z0=origin; z1=(5,0); z4=dir(BL); % Intermediate point z3=10/y4*z4; z2=z3+z1; or alternatively without having to define z4 BL:=87; z0=origin; z1=(5,0); z3=10/(ypart dir(BL))*dir(BL); z2=z3+z1;

[NTG-context] metapost

2010-02-17 Thread Martin 'golodhrim' Scholz
Hi list, does anybody know how I could start metapost itself standalone from the context-minimals? mpost is telling me there is no mpost.mem and no plain.mem file so it can not start... Thanks for any hint

Re: [NTG-context] metapost

2010-02-17 Thread Hans Hagen
On 17-2-2010 22:18, Martin 'golodhrim' Scholz wrote: Hi list, does anybody know how I could start metapost itself standalone from the context-minimals? mpost is telling me there is no mpost.mem and no plain.mem file so it can not start... Thanks for any hint... i nowadays never call mpost, i

Re: [NTG-context] metapost

2010-02-17 Thread Mojca Miklavec
On Wed, Feb 17, 2010 at 22:18, Martin 'golodhrim' Scholz wrote: Hi list, does anybody know how I could start metapost itself standalone from the context-minimals? mpost is telling me there is no mpost.mem and no plain.mem file so it can not start... Thanks for any hint... You can try

Re: [NTG-context] metapost

2010-02-17 Thread Mojca Miklavec
On Wed, Feb 17, 2010 at 22:34, Mojca Miklavec wrote: On Wed, Feb 17, 2010 at 22:18, Martin 'golodhrim' Scholz wrote: Hi list, does anybody know how I could start metapost itself standalone from the context-minimals? mpost is telling me there is no mpost.mem and no plain.mem file so it can

Re: [NTG-context] last chapter number in Metapost

2010-01-18 Thread Andreas Harder
] \dorecurse {3} { \section{Test #1} first: \somestructureheadnumber[section][first]\par current: \somestructureheadnumber[section][current]\par last: \somestructureheadnumber[section][last] } } \stoptext One more question appeared: How to access them in a Metapost

Re: [NTG-context] last chapter number in Metapost

2010-01-18 Thread Hans Hagen
On 18-1-2010 16:47, Andreas Harder wrote: \startuseMPgraphic{test} current := \somestructureheadnumber[chapter][current] ; last:= \somestructureheadnumber[chapter][last]; % current := 2 ; % last:= 6 ; skip:= TextHeight * (current-1)/last ; StartPage ;

Re: [NTG-context] Using frames with metapost background in metapost

2010-01-11 Thread Hans Hagen
=MP:background] % A frame defined with \defineframe does not work % inside Metapost, so I prevent expansion. \unexpanded\def\boxed#1{\boxframed{#1}} ok, i'll make 'm unexpandable in the core \starttext \boxed{Boxed in text} \startMPcode draw textext(\boxed{boxed in metapost}) ; %draw textext

Re: [NTG-context] Using frames with metapost background in metapost

2010-01-11 Thread Aditya Mahajan
On Mon, 11 Jan 2010, Hans Hagen wrote: \starttext \boxed{Boxed in text} \startMPcode draw textext(\boxed{boxed in metapost}) ; %draw textext(\boxframed{boxed in metapost}) ; \stopMPcode \stoptext \starttext \startMPcode picture p ; p := textext(boxed in metapost) ; draw p

[NTG-context] Using frames with metapost background in metapost

2010-01-10 Thread Aditya Mahajan
Hi, I want to use a frame with metapost background to highlight some text inside metapost. But, the best that I can do is get metapost to typeset the code for the background, rather than execute it! Any ideas on a work around (in MkIV). \startmode[error] \defineoverlay[MP:background

Re: [NTG-context] Metapost Font Question

2010-01-01 Thread Taco Hoekwater
David Arnold wrote: All, The attached Metapost file uses the statsmac package by Anthony Phan. http://www-math.univ-poitiers.fr/~phan/statsmac.html And the package: mps.tar.gz http://www-math.univ-poitiers.fr/~phan/downloads/metapost/mps.tar.gz To compile the attached file I use: mpost

Re: [NTG-context] Metapost Font Question

2010-01-01 Thread David Arnold
Taco, Thanks. D. On Jan 1, 2010, at 12:26 AM, Taco Hoekwater wrote: David Arnold wrote: All, The attached Metapost file uses the statsmac package by Anthony Phan. http://www-math.univ-poitiers.fr/~phan/statsmac.html And the package: mps.tar.gz http://www-math.univ-poitiers.fr/~phan

Re: [NTG-context] Random numbers in metapost

2009-12-31 Thread Taco Hoekwater
David Arnold wrote: Hi, Does anyone have any strategies for drawing random numbers from various statistics distributions in Metapost? For example, say, drawing 100 random numbers from a beta distribution? Assuming you are using mkiv: create a lua function and use its calculated results

Re: [NTG-context] Random numbers in metapost

2009-12-31 Thread David Arnold
Taco et al, I think I've found a way. Anthony Phan has written a brilliant stats package for Metapost. http://www-math.univ-poitiers.fr/~phan/statsmac.html I think (haven't tried yet) I can select a number at random from the uniform distribution on [0,1], then use one of Anthony's functions

[NTG-context] Metapost Font Question

2009-12-31 Thread David Arnold
All,The attached Metapost file uses the statsmac package by Anthony Phan.http://www-math.univ-poitiers.fr/~phan/statsmac.htmlAnd the package:mps.tar.gzTo compile the attached file I use:mpost Untitled.mpmptopdf Untitled.1I've attached the resulting file. I am wondering why the "cm" la

[NTG-context] Random numbers in metapost

2009-12-30 Thread David Arnold
Hi, Does anyone have any strategies for drawing random numbers from various statistics distributions in Metapost? For example, say, drawing 100 random numbers from a beta distribution? David ___ If your question

Re: [NTG-context] Metapost label - Truncating digits after decimal point

2009-12-15 Thread Aditya Mahajan
On Sat, 28 Nov 2009, Curiouslearn wrote: Hi, Is it possible to truncate the digits after decimal point in Metapost when using textext()? Please see the minimal example below which produces 1.84375. Can I just keep the first digit and have it produce 1.8 ? Thanks. If you are using mkiv, you

Re: [NTG-context] Metapost label - Truncating digits after decimal point

2009-12-15 Thread Curiouslearn
Thanks for this solution. Sounds small and clean. I need to learn Lua I guess. On Tue, Dec 15, 2009 at 5:34 AM, Aditya Mahajan adit...@umich.edu wrote: On Sat, 28 Nov 2009, Curiouslearn wrote: Hi, Is it possible to truncate the digits after decimal point in Metapost when using textext

[NTG-context] Metapost code does not work - Can you find the problem?

2009-12-01 Thread Curiouslearn
Can someone please tell me why the code below does not work? Thanks a ton. \starttext \startuseMPgraphic[CS] u:=1cm; pickup pencircle scaled 2pt; %Paths path demandCS; demandCS := (0,5u) -- (10u,0);

Re: [NTG-context] Metapost code does not work - Can you find the problem?

2009-12-01 Thread Curiouslearn
Sorry for the question. I figured it out. I have square brackets instead of braces in the \startuseMPgraphic line. On Tue, Dec 1, 2009 at 3:52 PM, Curiouslearn curiousle...@gmail.com wrote: Can someone please tell me why the code below does not work? Thanks a ton. \starttext

Re: [NTG-context] Metapost and mkiv

2009-11-29 Thread Taco Hoekwater
Alan BRASLAU wrote: On Friday 27 November 2009 14:54:53 Willi Egger wrote: Hi Alan, I run in this myself. A possible solution is: \startuniqueMPgraphic{test} for i = 0 upto 10 : draw thelabel(textext(\color[red] decimal i ), (i, -1) scaled 1cm); endfor ;

Re: [NTG-context] Metapost label - Truncating digits after decimal point

2009-11-29 Thread Taco Hoekwater
Curiouslearn wrote: Hi, Is it possible to truncate the digits after decimal point in Metapost when using textext()? Please see the minimal example below which produces 1.84375. Can I just keep the first digit and have it produce 1.8 ? Here is a helper macro for you: def trunc_digits(expr n

Re: [NTG-context] Metapost label - Truncating digits after decimal point

2009-11-29 Thread Curiouslearn
Thanks so much, Taco. I will try out the code below. Good to know that Metapost has functions such as substring. On Sun, Nov 29, 2009 at 3:32 AM, Taco Hoekwater t...@elvenkind.com wrote: Curiouslearn wrote: Hi, Is it possible to truncate the digits after decimal point in Metapost when

[NTG-context] Metapost label - Truncating digits after decimal point

2009-11-28 Thread Curiouslearn
Hi, Is it possible to truncate the digits after decimal point in Metapost when using textext()? Please see the minimal example below which produces 1.84375. Can I just keep the first digit and have it produce 1.8 ? Thanks. \setuppapersize[letter][letter] \setupcolors[state=start] \starttext

Re: [NTG-context] Metapost and mkiv

2009-11-28 Thread Alan BRASLAU
On Friday 27 November 2009 14:54:53 Willi Egger wrote: Hi Alan, I run in this myself. A possible solution is: \startuniqueMPgraphic{test} for i = 0 upto 10 : draw thelabel(textext(\color[red] decimal i ), (i, -1) scaled 1cm); endfor ; \stopuniqueMPgraphic

[NTG-context] Metapost and mkiv

2009-11-27 Thread Alan BRASLAU
Is this a bug in mkiv metapost? Alan minimal example: \setupcolors [state=start] \starttext \startuniqueMPgraphic{test} for i = 0 upto 10 : draw thelabel(decimal i, (i, 0) scaled 1cm) withcolor red ; % red in mkii, black in mkiv? endfor

Re: [NTG-context] Metapost and mkiv

2009-11-27 Thread Hans Hagen
Alan BRASLAU wrote: Is this a bug in mkiv metapost? Alan minimal example: \setupcolors [state=start] \starttext \startuniqueMPgraphic{test} for i = 0 upto 10 : draw thelabel(decimal i, (i, 0) scaled 1cm) withcolor red ; % red in mkii, black

Re: [NTG-context] Metapost and mkiv

2009-11-27 Thread Willi Egger
} \stoptext KR Willi On Nov 27, 2009, at 10:31 AM, Alan BRASLAU wrote: Is this a bug in mkiv metapost? Alan minimal example: \setupcolors [state=start] \starttext \startuniqueMPgraphic{test} for i = 0 upto 10 : draw thelabel(decimal i, (i, 0) scaled 1cm

Re: [NTG-context] Metapost - Seems like weird behavior. Is it a bug?

2009-11-25 Thread Curiouslearn
Taco, thanks for the suggestions. I will try using intersectiontimes. It would be great if, as you said, this is solved with Metapost 2.0. Any idea when that version is coming out? Thanks. On Wed, Nov 25, 2009 at 2:47 AM, Taco Hoekwater t...@elvenkind.com wrote: Taco Hoekwater wrote

Re: [NTG-context] Metapost - Seems like weird behavior. Is it a bug?

2009-11-25 Thread Taco Hoekwater
Curiouslearn wrote: Taco, thanks for the suggestions. I will try using intersectiontimes. It would be great if, as you said, this is solved with Metapost 2.0. Any idea when that version is coming out? Next summer

[NTG-context] MetaPost broken mkiv latest minimals

2009-11-24 Thread Alan BRASLAU
MetaPost is broken in mkiv (works in mkii). minimal example: \starttext \startuniqueMPgraphic{circle} pickup pencircle scaled 1pt ; draw fullcircle scaled 2cm ; \stopuniqueMPgraphic \uniqueMPgraphic{circle} \stoptext

Re: [NTG-context] MetaPost broken mkiv latest minimals

2009-11-24 Thread luigi scarso
On Tue, Nov 24, 2009 at 9:05 PM, Alan BRASLAU alan.bras...@cea.fr wrote: MetaPost is broken in mkiv (works in mkii). minimal example: \starttext \startuniqueMPgraphic{circle}        pickup pencircle scaled 1pt ;        draw fullcircle scaled 2cm ; \stopuniqueMPgraphic \uniqueMPgraphic

Re: [NTG-context] MetaPost broken mkiv latest minimals

2009-11-24 Thread Hans Hagen
Alan BRASLAU wrote: MetaPost is broken in mkiv (works in mkii). minimal example: \starttext \startuniqueMPgraphic{circle} pickup pencircle scaled 1pt ; draw fullcircle scaled 2cm ; \stopuniqueMPgraphic \uniqueMPgraphic{circle} \stoptext the problem was in the backend

Re: [NTG-context] MetaPost broken mkiv latest minimals

2009-11-24 Thread Mojca Miklavec
On Tue, Nov 24, 2009 at 21:21, Hans Hagen wrote: Alan BRASLAU wrote: MetaPost is broken in mkiv (works in mkii). minimal example: \starttext \startuniqueMPgraphic{circle}        pickup pencircle scaled 1pt ;        draw fullcircle scaled 2cm ; \stopuniqueMPgraphic \uniqueMPgraphic

Re: [NTG-context] MetaPost broken mkiv latest minimals

2009-11-24 Thread Alan BRASLAU
On Tuesday 24 November 2009 21:20:05 luigi scarso wrote: On Tue, Nov 24, 2009 at 9:05 PM, Alan BRASLAU alan.bras...@cea.fr wrote: MetaPost is broken in mkiv (works in mkii). minimal example: \starttext \startuniqueMPgraphic{circle} pickup pencircle scaled 1pt

Re: [NTG-context] MetaPost broken mkiv latest minimals

2009-11-24 Thread Hans Hagen
Mojca Miklavec wrote: On Tue, Nov 24, 2009 at 21:21, Hans Hagen wrote: Alan BRASLAU wrote: MetaPost is broken in mkiv (works in mkii). minimal example: \starttext \startuniqueMPgraphic{circle} pickup pencircle scaled 1pt ; draw fullcircle scaled 2cm ; \stopuniqueMPgraphic

Re: [NTG-context] MetaPost broken mkiv latest minimals

2009-11-24 Thread Alan BRASLAU
On Tuesday 24 November 2009 21:49:06 Hans Hagen wrote: Mojca Miklavec wrote: On Tue, Nov 24, 2009 at 21:21, Hans Hagen wrote: Alan BRASLAU wrote: MetaPost is broken in mkiv (works in mkii). minimal example: \starttext \startuniqueMPgraphic{circle} pickup pencircle

Re: [NTG-context] MetaPost broken mkiv latest minimals

2009-11-24 Thread luigi scarso
On Tue, Nov 24, 2009 at 10:51 PM, Alan BRASLAU alan.bras...@cea.fr wrote: I rebuilt luatex from svn on Debian x86_64 and MP is fixed. hm. Can you also try with beta source http://foundry.supelec.fr/gf/download/frsrelease/359/1390/luatex-beta-0.45.0.tar.bz2 ? -- luigi

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