Re: [NTG-context] Metafun Label and externalfigure Problem

2011-03-02 Thread Taco Hoekwater

Hi,

Not having blblogo.pdf, I used cow.pdf for the tests below.
I use luatex 0.66.0 (rev 4090) hand-built on linux32, and
Context 2011.02.25 22:03 MKIV (received privately from Hans)

With that configuration, all three tests function exactly
as they should, so it is almost certainly not luatex that
is causing trouble. It could be a bug in one of the previous
beta's, or a local/minimals misconfiguration.

Best wishes,
Taco
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Metafun Label and externalfigure Problem

2011-03-02 Thread Jeong Dalyoung
Dear Lutz,

 After  replacing "blblogo.pdf" with a figure file in my system and tested it. 
Otherwise, it shows a gray rectangle.
I got no error and the output is fine.( "Test" and the figure are well shown)

I don't know "rev 4090" but here is the version of ConTeXt  minimal in my 
system.

...
This is LuaTeX, Version beta-0.65.0-2010121316 
 \write18 enabled.
(testmp.tex

ConTeXt  ver: 2011.02.25 22:03 MKIV  fmt: 2011.3.1  int: english/english
...
Since I don't know deep inside ConTeXt, I can't tell you a solution. Sorry.
Setup in your system may be  different from mine.

Cheers.

Dalyoung
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Metafun Label and externalfigure Problem

2011-03-01 Thread Lutz Haseloff
I just tested luatex rev 4090:
--
\starttext
\startMPpage
externalfigure "blblogo.pdf" scaled .4 ;
%label(textext("Test"),origin);
\stopMPpage
\stoptext
--
gives no error message and an empty pdf 1mmx5mm
--
\starttext
\startMPpage
%externalfigure "blblogo.pdf" scaled .4 ;
label(textext("Test"),origin);
\stopMPpage
\stoptext
--
results in "mpout"
--
\starttext
\startMPpage
externalfigure "blblogo.pdf" scaled .4 ;
label(textext("Test"),origin);
\stopMPpage
\stoptext
--
gives:

metapost> initializing instance 'metafun' using format 'metafun'
metapost> loading 'metafun.mp' (experimental metapost version two)
! String contains an invalid utf-8 sequence.
l.6
   񞞋_number=2
 ...re.mp ; fi ; ]===], false)}

\processMPgraphic ...e ;\!!es , \MPaskedfigure )}}
 \egroup \placeMPgraphic \d...
\dostartMPpage ...??mg ][#1]\processMPgraphic {#2}
 \dostopfittingpage
l.5 \stopMPpage

?


All three files compile as expected with luatex rev 4086


Greetings Lutz


2011/3/1 Hans Hagen :
> On 1-3-2011 11:17, Lutz Haseloff wrote:
>>
>> Hi all,
>>
>> with latest ConTeXt MKIV
>> Metapost Labels doesn't work for me anymore.
>> My Code:
>>
>> \starttext
>> \startMPcode
>> label(textext("Test"),origin);
>> \stopMPcode
>> \stoptext
>>
>> The Output only shows the word "mpout" as the Label.
>
> works ok here
>
>> There seems to be a Problem with externalfigure too.
>>
>> With:
>>
>> \starttext
>> \startMPcode
>> externalfigure "blblogogr.pdf" xscaled 35mm yscaled 19mm shifted
>> (13mm,15mm);
>> \stopMPcode
>> \stoptext
>>
>> I get the error message:
>>
>> metapost>  loading 'metafun.mp' (experimental metapost version two)
>
> beware: 35cm is a scale factor so the natural size gets scaled by 35 * cm (a
> constant)
>
> use xsized and ysized instead (or just one to stay in proportion)
>
>
> -
>                                          Hans Hagen | PRAGMA ADE
>              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>    tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
>                                             | www.pragma-pod.nl
> -
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Metafun Label and externalfigure Problem

2011-03-01 Thread Hans Hagen

On 1-3-2011 11:17, Lutz Haseloff wrote:

Hi all,

with latest ConTeXt MKIV
Metapost Labels doesn't work for me anymore.
My Code:

\starttext
\startMPcode
label(textext("Test"),origin);
\stopMPcode
\stoptext

The Output only shows the word "mpout" as the Label.


works ok here


There seems to be a Problem with externalfigure too.

With:

\starttext
\startMPcode
externalfigure "blblogogr.pdf" xscaled 35mm yscaled 19mm shifted (13mm,15mm);
\stopMPcode
\stoptext

I get the error message:

metapost>  loading 'metafun.mp' (experimental metapost version two)


beware: 35cm is a scale factor so the natural size gets scaled by 35 * 
cm (a constant)


use xsized and ysized instead (or just one to stay in proportion)


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Metafun Label and externalfigure Problem

2011-03-01 Thread luigi scarso
On Tue, Mar 1, 2011 at 12:23 PM, Lutz Haseloff
 wrote:
>> not here with current version: 2011.02.25 22:03
>> %%test
>> \starttext
>> \startTEXpage
>> \startMPcode
>> draw origin-(20,0) .. origin+(0,20) .. origin+(20,0) .. origin+(0,-20) .. 
>> cycle;
>> label(textext("Test"),origin);
>> \stopMPcode
>> \stopTEXpage
>> \stoptext
>>
ah ok.
-- 
luigi
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Metafun Label and externalfigure Problem

2011-03-01 Thread Lutz Haseloff
> not here with current version: 2011.02.25 22:03
> %%test
> \starttext
> \startTEXpage
> \startMPcode
> draw origin-(20,0) .. origin+(0,20) .. origin+(20,0) .. origin+(0,-20) .. 
> cycle;
> label(textext("Test"),origin);
> \stopMPcode
> \stopTEXpage
> \stoptext
>

The problem occures with luatex rev 4088, no problem with 4050 or 4060


test.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Metafun Label and externalfigure Problem

2011-03-01 Thread luigi scarso
On Tue, Mar 1, 2011 at 11:17 AM, Lutz Haseloff
 wrote:
> Hi all,
>
> with latest ConTeXt MKIV
> Metapost Labels doesn't work for me anymore.
> My Code:
>
> \starttext
> \startMPcode
> label(textext("Test"),origin);
> \stopMPcode
> \stoptext
>
> The Output only shows the word "mpout" as the Label.
not here with current version: 2011.02.25 22:03
%%test
\starttext
\startTEXpage
\startMPcode
draw origin-(20,0) .. origin+(0,20) .. origin+(20,0) .. origin+(0,-20) .. cycle;
label(textext("Test"),origin);
\stopMPcode
\stopTEXpage
\stoptext


>
> There seems to be a Problem with externalfigure too.
>
> With:
>
> \starttext
> \startMPcode
> externalfigure "blblogogr.pdf" xscaled 35mm yscaled 19mm shifted (13mm,15mm);
> \stopMPcode
> \stoptext
>
> I get the error message:
>
> metapost        > loading 'metafun.mp' (experimental metapost version two)
> ! Emergency stop.
>  ...re.mp ; fi ; ]===], false)}
>
> \processMPgraphic ...e ;\!!es , \MPaskedfigure )}}
>                                                  \egroup \placeMPgraphic \d...
> l.5 \stopMPcode
>
> !  ==> Fatal error occurred, no output PDF file produced!
> mtx-context     | fatal error: return code: 1>Exit code: 1
>
> With:
>
> \starttext
> \startMPcode
> externalfigure "blblogogr.pdf";
> \stopMPcode
> \stoptext
>
> There is no errormessage and no picture in the output.
not here, but I must admit that xscaled and yscaled are a bit strange.

-- 
luigi
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Metafun Label and externalfigure Problem

2011-03-01 Thread Lutz Haseloff
Hi all,

with latest ConTeXt MKIV
Metapost Labels doesn't work for me anymore.
My Code:

\starttext
\startMPcode
label(textext("Test"),origin);
\stopMPcode
\stoptext

The Output only shows the word "mpout" as the Label.

There seems to be a Problem with externalfigure too.

With:

\starttext
\startMPcode
externalfigure "blblogogr.pdf" xscaled 35mm yscaled 19mm shifted (13mm,15mm);
\stopMPcode
\stoptext

I get the error message:

metapost> loading 'metafun.mp' (experimental metapost version two)
! Emergency stop.
 ...re.mp ; fi ; ]===], false)}

\processMPgraphic ...e ;\!!es , \MPaskedfigure )}}
  \egroup \placeMPgraphic \d...
l.5 \stopMPcode

!  ==> Fatal error occurred, no output PDF file produced!
mtx-context | fatal error: return code: 1>Exit code: 1

With:

\starttext
\startMPcode
externalfigure "blblogogr.pdf";
\stopMPcode
\stoptext

There is no errormessage and no picture in the output.


I hope, these are not all my ignorant faults, like always :-)


Greetings Lutz
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] how to remove unwanted coordinate numbers(metafun)

2011-02-11 Thread Hans Hagen

On 11-2-2011 3:26, Jeong Dalyoung wrote:

Dear all.

I try to draw a circle with points on it as following:

path p; p:= fullcircle scaled 5cm;
draw p;
pickup pencircle scaled 2mm;
k:=1;
for i = 2.2,3,3.5,4.5,5,7,0,.7,1.3:
drawpoint point i of p;
label.lft(decimal k, point i of p);
k:= k+1;
endfor;

It draws a circle, points, label, but unwanted coordinate numbers like 
(60.43535, 36.97691), too.
I didn't see such numbers in any example in metafun document.

If I use z[k] like

z[k] = point i of P;
draw z[k]

Then  such a long numbers disappeared.

Is it the only way to surpress those numbers not using z?


use drawdot then ... drawpoints is one of the tracing macros

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] how to remove unwanted coordinate numbers(metafun)

2011-02-11 Thread Jeong Dalyoung
Dear all.

I try to draw a circle with points on it as following:

path p; p:= fullcircle scaled 5cm;
draw p;
pickup pencircle scaled 2mm;
k:=1;
for i = 2.2,3,3.5,4.5,5,7,0,.7,1.3:
drawpoint point i of p;
label.lft(decimal k, point i of p);
k:= k+1;
endfor;

It draws a circle, points, label, but unwanted coordinate numbers like 
(60.43535, 36.97691), too.
I didn't see such numbers in any example in metafun document.

If I use z[k] like

z[k] = point i of P;
draw z[k]

Then  such a long numbers disappeared.

Is it the only way to surpress those numbers not using z?

Thank you for reading.

best regards,

Dalyoung


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] metafun- how to pass array as an argument

2011-01-24 Thread dalyoung
Dear Peter,

Thank you for your help. 
By changing (expr s) to (text s), it works!
I am using ConTeXt Minimal and the luatex version is "This is LuaTeX, Version 
beta-0.61.0-2010072816" 

Thank you again.

Dalyoung


 
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] metafun- how to pass array as an argument

2011-01-24 Thread Peter Rolf
Am 24.01.2011 13:50, schrieb Peter Rolf:
> Am 24.01.2011 13:18, schrieb dalyoung:
>> \startbuffer[a]
>> path p;
>> numeric bwidth, u, lastpoint; 
>> u :=1cm; 
>> p := fullcircle scaled .3u;
>> lastpoint := 0;
>>
>> def draw_balls = %(expr s)
> def draw_balls(text s) =
> 
>>   draw (0,0) -- (0, u);
>>   for i=3,5,0,2,1,7:
> for i=s:
> 
>>  for j = 1 upto i:
>>  draw p shifted (lastpoint+.32*j*u,.3u);
>>  endfor;
>>   bwidth := .32i*u+.5u;
>>   draw (lastpoint,0) -- (lastpoint +bwidth,0) -- (lastpoint +bwidth,u);
>>   lastpoint := lastpoint+bwidth;
>>   endfor;
>> enddef;
>>
>> draw_balls;
>>
draw_balls(3,5,0,2,1,7)

sorry, i forgot to change this line.
example code is attached for testing...

>> \stopbuffer
>>
>> \starttext
>> \processMPbuffer[a]
>> \stoptext
> 
> works in mkii, but fails in mkiv. i use an outdated version (31.12.2010)
> here.
> 
> 
> ! LuaTeX error :1: attempt to call field 'feedback'
> (a nil value)
> stack traceback:
>   :1: in main chunk.
>  feedback("\currentMPgraphicname ")}
> 
> \processMPgraphic ...ntMPgraphicformat ", \!!bs #1
>   ;\!!es , \!!bs
> \currentMPi...
>  ...feedback("\currentMPgraphicname ")}}
>   \endMPgraphicgroup
> \secondoftwoarguments #1#2->#2
> 
> l.25 \processMPbuffer[a]
> 
> ?
> 
> 
> best wishes,  Peter
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___
> 

\startbuffer[a]
path p;
numeric bwidth, u, lastpoint; 
u :=1cm; 
p := fullcircle scaled .3u;
lastpoint := 0;

def draw_balls(text s) = 
  draw (0,0) -- (0, u);
  for i=s:
for j = 1 upto i:
draw p shifted (lastpoint+.32*j*u,.3u);
endfor;
  bwidth := .32i*u+.5u;
  draw (lastpoint,0) -- (lastpoint +bwidth,0) -- (lastpoint +bwidth,u);
  lastpoint := lastpoint+bwidth;
  endfor;
enddef;

draw_balls(3,5,0,2,1,7);

\stopbuffer

\starttext
\processMPbuffer[a]
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] metafun- how to pass array as an argument

2011-01-24 Thread Peter Rolf
Am 24.01.2011 13:18, schrieb dalyoung:
> \startbuffer[a]
> path p;
> numeric bwidth, u, lastpoint; 
> u :=1cm; 
> p := fullcircle scaled .3u;
> lastpoint := 0;
> 
> def draw_balls = %(expr s)
def draw_balls(text s) =

>   draw (0,0) -- (0, u);
>   for i=3,5,0,2,1,7:
for i=s:

>   for j = 1 upto i:
>   draw p shifted (lastpoint+.32*j*u,.3u);
>   endfor;
>   bwidth := .32i*u+.5u;
>   draw (lastpoint,0) -- (lastpoint +bwidth,0) -- (lastpoint +bwidth,u);
>   lastpoint := lastpoint+bwidth;
>   endfor;
> enddef;
> 
> draw_balls;
> 
> \stopbuffer
> 
> \starttext
> \processMPbuffer[a]
> \stoptext

works in mkii, but fails in mkiv. i use an outdated version (31.12.2010)
here.


! LuaTeX error :1: attempt to call field 'feedback'
(a nil value)
stack traceback:
:1: in main chunk.
 feedback("\currentMPgraphicname ")}

\processMPgraphic ...ntMPgraphicformat ", \!!bs #1
  ;\!!es , \!!bs
\currentMPi...
 ...feedback("\currentMPgraphicname ")}}
  \endMPgraphicgroup
\secondoftwoarguments #1#2->#2

l.25 \processMPbuffer[a]

?


best wishes,  Peter
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] metafun- how to pass array as an argument

2011-01-24 Thread dalyoung
Dear all,

I draw a simple figure using the code as below.
In the code, I use "for i = 3,5,0,2,1,7:" in def draw_balls.
However, if I can pass the array "3,5,0,2,1,7" as an argument for def 
draw_balls (expr n) and call draw_balls (3,5,0,2,1,7), then it can be used for 
different number of balls and number of boxes.
Is there a way to do that or any suggestions?

Thank you for reading.

Regards,

Dalyoung


\startbuffer[a]
path p;
numeric bwidth, u, lastpoint; 
u :=1cm; 
p := fullcircle scaled .3u;
lastpoint := 0;

def draw_balls = %(expr s)
  draw (0,0) -- (0, u);
  for i=3,5,0,2,1,7:
for j = 1 upto i:
draw p shifted (lastpoint+.32*j*u,.3u);
endfor;
  bwidth := .32i*u+.5u;
  draw (lastpoint,0) -- (lastpoint +bwidth,0) -- (lastpoint +bwidth,u);
  lastpoint := lastpoint+bwidth;
  endfor;
enddef;

draw_balls;

\stopbuffer

\starttext
\processMPbuffer[a]
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] How to run Typesetting in MetaPost example (MetaFun)?

2011-01-20 Thread luigi scarso
You can also use mkii as command line drawing tool:
#> mtxrun texexec test.tex

\starttext
\startTEXpage
\resetMPdrawing
\startMPdrawing
picture pic[] ;
numeric wid[], len[], pos[], n ;
wid[0] := len[0] := pos[0] := n := 0 ;
\stopMPdrawing

\def\whatever#1%
{\appendtoks#1\to\MPtoks
 \setbox\MPbox=\hbox{\bfd\the\MPtoks}%
 \startMPdrawing
 n := n + 1 ; len[n] := \the\wd\MPbox ;
 \stopMPdrawing
 \startMPdrawing[-]
 pic[n] := textext("\bfd\setstrut\strut#1") ;
 pic[n] := pic[n] shifted - llcorner pic[n] ;
 \stopMPdrawing}

\handletokens MetaPost is Fun!\with\whatever

\startMPdrawing
 pair len ; len := origin ;
 for i=1 upto n :
   draw pic[i] shifted len ;
   draw boundingbox pic[i] shifted len
  withpen pencircle scaled .25pt withcolor red ;
   len := len+(xpart lrcorner pic[i]-xpart llcorner pic[i],0) ;
 endfor ;
\stopMPdrawing

\MPdrawingdonetrue\getMPdrawing

\stopTEXpage
\stoptext


-- 
luigi
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] How to run Typesetting in MetaPost example (MetaFun)?

2011-01-20 Thread Verhaag, G.C.H.M.

Aditya Mahajan wrote:


On Tue, 18 Jan 2011, Verhaag, G.C.H.M. wrote:


Hi,

I wanted to try (using ConTeXt minimals MkIV) the example on page 228 
of the MetaFun manual, dealing with typesetting in MetaPost.



I haven't look at the metapost manual ... but


The code is given as:

\resetMPdrawing
\startMPdrawing
picture pic[] ;
numeric wid[], len[], pos[], n ;
wid[0] := len[0] := pos[0] := n := 0 ;
\stopMPdrawing

\def\whatever#1%
{\appendtoks#1\to\MPtoks
\setbox\MPbox=\hbox{\bfd\the\MPtoks}%
\startMPdrawing
 n := n + 1 ; len[n] := \the\wd\MPbox ;
\stopMPdrawing
\startMPdrawing[-]
 pic[n] := textext("\bfd\setstrut\strut#1") ;
 pic[n] := pic[n] shifted - llcorner pic[n] ;
\stopMPdrawing}

\handletokens MetaPost is Fun!\with\whatever

But is won't run. The following message is generated:



The actual error message said

! Undefined control sequence.
\@@toks ->\MPtoks

So add

\newtoks\MPtoks

After which you get

! Undefined control sequence.
\whatever ...endtoks #1\to \MPtoks \setbox \MPbox

so add

\newbox\MPbox

After that the file compiles but you get an empty image. There are two 
things missing in the code. First you don't tell actually draw the 
metapost drawing. for that, add


\MPdrawingdonetrue \getMPdrawing \resetMPdrawing


Still an empty page. Again the pic[n] is calculated but never drawn. 
So add


  draw p[n] shifted (n*1cm,0) ;

(or perhaps along a more sophisticated path),

and now you have a working example:

\newtoks\MPtoks
\newbox\MPbox

\resetMPdrawing
\startMPdrawing
  picture p[] ;
  numeric wid[], len[], pos[], n ;
  wid[0] := len[0] := pos[0] := n := 0 ;
\stopMPdrawing

\def\whatever#1%
{\appendtoks#1\to\MPtoks
 \setbox\MPbox=\hbox{\bfd\the\MPtoks}%
 \startMPdrawing
  n := n + 1 ; len[n] := \the\wd\MPbox ;
  p[n] := textext("\bfd\setstrut\strut#1") ;
  p[n] := p[n] shifted - llcorner p[n] ;
  draw p[n] shifted (n*1cm,0) ;
 \stopMPdrawing}

\starttext
\handletokens MetaPost is Fun!\with\whatever

\MPdrawingdonetrue \getMPdrawing \resetMPdrawing

\stoptext

You could also have just used the macros from meta-txt:

\useMPlibrary[txt]

\startMPdefinitions
  newpath RotPath ;
  RotPath = fullcircle scaled 3cm ;
\stopMPdefinitions

\starttext
\followtokens{Metapost is fun \quad}
\stoptext

@Hans: Perhaps we can have a more ConTeXtist interface to this macro:

\definetextonepath
   [whatever]
   [color=...,
style=...,
mp=..., % path specification
   ]

\whatever{Metapost is fun}

Aditya


Hi,

Okay, that makes things more clear, but couldn't find this in the 
manual! Maybe it is very obvious to someone more familiar with METAPOST.


Well, I also tried the nice macro example on page 232 of the MetaFun 
manual by Hans, and got of course the same problems. But after I added the


\newtoks\MPtoks
\newbox\MPbox

definitions to the file, it worked!

Also the Inkscape alternative is very useful, thanks for helping me out!

Regards,
Gerard
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] How to run Typesetting in MetaPost example (MetaFun)?

2011-01-19 Thread Aditya Mahajan

On Tue, 18 Jan 2011, Verhaag, G.C.H.M. wrote:


Hi,

I wanted to try (using ConTeXt minimals MkIV) the example on page 228 of the 
MetaFun manual, dealing with typesetting in MetaPost.


I haven't look at the metapost manual ... but


The code is given as:

\resetMPdrawing
\startMPdrawing
picture pic[] ;
numeric wid[], len[], pos[], n ;
wid[0] := len[0] := pos[0] := n := 0 ;
\stopMPdrawing

\def\whatever#1%
{\appendtoks#1\to\MPtoks
\setbox\MPbox=\hbox{\bfd\the\MPtoks}%
\startMPdrawing
 n := n + 1 ; len[n] := \the\wd\MPbox ;
\stopMPdrawing
\startMPdrawing[-]
 pic[n] := textext("\bfd\setstrut\strut#1") ;
 pic[n] := pic[n] shifted - llcorner pic[n] ;
\stopMPdrawing}

\handletokens MetaPost is Fun!\with\whatever

But is won't run. The following message is generated:


The actual error message said

! Undefined control sequence.
\@@toks ->\MPtoks

So add

\newtoks\MPtoks

After which you get

! Undefined control sequence.
\whatever ...endtoks #1\to \MPtoks \setbox \MPbox

so add

\newbox\MPbox

After that the file compiles but you get an empty image. There are two 
things missing in the code. First you don't tell actually draw the 
metapost drawing. for that, add


\MPdrawingdonetrue \getMPdrawing \resetMPdrawing


Still an empty page. Again the pic[n] is calculated but never drawn. So 
add


  draw p[n] shifted (n*1cm,0) ;

(or perhaps along a more sophisticated path),

and now you have a working example:

\newtoks\MPtoks
\newbox\MPbox

\resetMPdrawing
\startMPdrawing
  picture p[] ;
  numeric wid[], len[], pos[], n ;
  wid[0] := len[0] := pos[0] := n := 0 ;
\stopMPdrawing

\def\whatever#1%
{\appendtoks#1\to\MPtoks
 \setbox\MPbox=\hbox{\bfd\the\MPtoks}%
 \startMPdrawing
  n := n + 1 ; len[n] := \the\wd\MPbox ;
  p[n] := textext("\bfd\setstrut\strut#1") ;
  p[n] := p[n] shifted - llcorner p[n] ;
  draw p[n] shifted (n*1cm,0) ;
 \stopMPdrawing}

\starttext
\handletokens MetaPost is Fun!\with\whatever

\MPdrawingdonetrue \getMPdrawing \resetMPdrawing

\stoptext

You could also have just used the macros from meta-txt:

\useMPlibrary[txt]

\startMPdefinitions
  newpath RotPath ;
  RotPath = fullcircle scaled 3cm ;
\stopMPdefinitions

\starttext
\followtokens{Metapost is fun \quad}
\stoptext

@Hans: Perhaps we can have a more ConTeXtist interface to this macro:

\definetextonepath
   [whatever]
   [color=...,
style=...,
mp=..., % path specification
   ]

\whatever{Metapost is fun}

Aditya
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] How to run Typesetting in MetaPost example (MetaFun)?

2011-01-19 Thread Peter Rolf
Am 19.01.2011 14:35, schrieb Verhaag, G.C.H.M.:
> Verhaag, G.C.H.M. wrote:
> 
>> Hi,
>>
>> I wanted to try (using ConTeXt minimals MkIV) the example on page 228
>> of the MetaFun manual, dealing with typesetting in MetaPost.
>>
>> The code is given as:
>>
>> \resetMPdrawing
>> \startMPdrawing
>> picture pic[] ;
>> numeric wid[], len[], pos[], n ;
>> wid[0] := len[0] := pos[0] := n := 0 ;
>> \stopMPdrawing
>>
>> \def\whatever#1%
>> {\appendtoks#1\to\MPtoks
>>  \setbox\MPbox=\hbox{\bfd\the\MPtoks}%
>>  \startMPdrawing
>>   n := n + 1 ; len[n] := \the\wd\MPbox ;
>>  \stopMPdrawing
>>  \startMPdrawing[-]
>>   pic[n] := textext("\bfd\setstrut\strut#1") ;
>>   pic[n] := pic[n] shifted - llcorner pic[n] ;
>>  \stopMPdrawing}
>>
>> \handletokens MetaPost is Fun!\with\whatever
>>
>> But is won't run. The following message is generated:
>>
>> \@@toks ->\MPtoks
>>
>> \dodoappendtoks ->\dodoglobal \@@toks
>>  \@EAEAEA {\@EA \the \@EA \@@toks
>> \the ...
>> \whatever #1->\appendtoks #1\to \MPtoks
>>\setbox \MPbox =\hbox {\bfd
>> \the \MP...
>> \dodohandletokenstwo *#1->\dododohandletokens {#1}
>>  \dohandletokens
>>  M
>>etaPost is Fun!
>> \handletokens ...ndletokens {#2}\dohandletokens #1
>>  \end
>> l.96 \handletokens MetaPost is Fun!\with\whatever
>>
>> Anybody any idea?
>>
>> Regards,
>> Gerard Verhaag
>> ___
>>
>> If your question is of interest to others as well, please add an entry
>> to the Wiki!
>>
>> maillist : ntg-context@ntg.nl /
>> http://www.ntg.nl/mailman/listinfo/ntg-context
>> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
>> archive  : http://foundry.supelec.fr/projects/contextrev/
>> wiki : http://contextgarden.net
>> ___
>>
>>
> Hi,
> 
> I'm in need of help to get the example as described in the MetaFun
> manual running, because I want to use text around a path!
> 
> So, I started reading the chapter about 'Typesetting in METAPOST' and
> wanted to try the examples as given in that chapter, but without succes!
> 
> The problem seem to be the MPtoks macro. According to the text in this
> chapter this low level macro (and MPbox and appendtoks) are already
> defined, but are they really?
> 
> The version of context minimals I use at the moment is:
> 
> MTXrun | current version: 2011.01.18 19:34
> 
> Any suggestions are very much welcomed! Thanks in advance!
> 

Hi Gerard,

how about an alternative way to deal with this?

1. draw the text with Inkscape (put text on a path);
   I think there is even a tutorial for this.
2. select the graphic and save it as *.eps
3. use pstoedit to convert it into *.mp

   pstoedit -v -ssp -f "mpost:" foo.eps foo.mp

4. edit/scale the metapost graphic as you like


Best wishes,  Peter
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] How to run Typesetting in MetaPost example (MetaFun)?

2011-01-19 Thread Verhaag, G.C.H.M.

Verhaag, G.C.H.M. wrote:


Hi,

I wanted to try (using ConTeXt minimals MkIV) the example on page 228 
of the MetaFun manual, dealing with typesetting in MetaPost.


The code is given as:

\resetMPdrawing
\startMPdrawing
picture pic[] ;
numeric wid[], len[], pos[], n ;
wid[0] := len[0] := pos[0] := n := 0 ;
\stopMPdrawing

\def\whatever#1%
{\appendtoks#1\to\MPtoks
 \setbox\MPbox=\hbox{\bfd\the\MPtoks}%
 \startMPdrawing
  n := n + 1 ; len[n] := \the\wd\MPbox ;
 \stopMPdrawing
 \startMPdrawing[-]
  pic[n] := textext("\bfd\setstrut\strut#1") ;
  pic[n] := pic[n] shifted - llcorner pic[n] ;
 \stopMPdrawing}

\handletokens MetaPost is Fun!\with\whatever

But is won't run. The following message is generated:

\@@toks ->\MPtoks

\dodoappendtoks ->\dodoglobal \@@toks
 \@EAEAEA {\@EA \the \@EA \@@toks 
\the ...

\whatever #1->\appendtoks #1\to \MPtoks
   \setbox \MPbox =\hbox {\bfd 
\the \MP...

\dodohandletokenstwo *#1->\dododohandletokens {#1}
 \dohandletokens
 M
   etaPost is Fun!
\handletokens ...ndletokens {#2}\dohandletokens #1
 \end
l.96 \handletokens MetaPost is Fun!\with\whatever

Anybody any idea?

Regards,
Gerard Verhaag
___ 

If your question is of interest to others as well, please add an entry 
to the Wiki!


maillist : ntg-context@ntg.nl / 
http://www.ntg.nl/mailman/listinfo/ntg-context

webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___ 




Hi,

I'm in need of help to get the example as described in the MetaFun 
manual running, because I want to use text around a path!


So, I started reading the chapter about 'Typesetting in METAPOST' and 
wanted to try the examples as given in that chapter, but without succes!


The problem seem to be the MPtoks macro. According to the text in this 
chapter this low level macro (and MPbox and appendtoks) are already 
defined, but are they really?


The version of context minimals I use at the moment is:

MTXrun | current version: 2011.01.18 19:34

Any suggestions are very much welcomed! Thanks in advance!

Regards,
Gerard
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] How to run Typesetting in MetaPost example (MetaFun)?

2011-01-18 Thread Verhaag, G.C.H.M.

Hi,

I wanted to try (using ConTeXt minimals MkIV) the example on page 228 of 
the MetaFun manual, dealing with typesetting in MetaPost.


The code is given as:

\resetMPdrawing
\startMPdrawing
picture pic[] ;
numeric wid[], len[], pos[], n ;
wid[0] := len[0] := pos[0] := n := 0 ;
\stopMPdrawing

\def\whatever#1%
{\appendtoks#1\to\MPtoks
 \setbox\MPbox=\hbox{\bfd\the\MPtoks}%
 \startMPdrawing
  n := n + 1 ; len[n] := \the\wd\MPbox ;
 \stopMPdrawing
 \startMPdrawing[-]
  pic[n] := textext("\bfd\setstrut\strut#1") ;
  pic[n] := pic[n] shifted - llcorner pic[n] ;
 \stopMPdrawing}

\handletokens MetaPost is Fun!\with\whatever

But is won't run. The following message is generated:

\@@toks ->\MPtoks

\dodoappendtoks ->\dodoglobal \@@toks
 \@EAEAEA {\@EA \the \@EA \@@toks 
\the ...

\whatever #1->\appendtoks #1\to \MPtoks
   \setbox \MPbox =\hbox {\bfd \the 
\MP...

\dodohandletokenstwo *#1->\dododohandletokens {#1}
 \dohandletokens
 M
   etaPost is Fun!
\handletokens ...ndletokens {#2}\dohandletokens #1
 \end
l.96 \handletokens MetaPost is Fun!\with\whatever

Anybody any idea?

Regards,
Gerard Verhaag
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] metafun: formatting numbers

2010-12-12 Thread Hans Hagen

On 12-12-2010 12:49, Peter Münster wrote:

Hello,

Formatting numbers seems to be buggy:

\starttext
\startMPcode
drawoptions(withpen pencircle scaled .25pt withcolor .5white) ;
draw hlingrid (0, 20, 1, 20cm, 10cm) ;
fmt_pictures := false ; % use TeX as formatting engine
draw hlintext.lft(0, 20, 1, 20cm, "@3e") ;
\stopMPcode
\stoptext

See also page 381 of latest metafun-s.pdf.


in mp-grid you can change:


def do_initialize_numbers =
  if not numbers_initialized :
init_numbers ( textext.raw("$-$")  ,
   textext.raw("$1$")  ,
   textext.raw("${\times}10$") ,
   textext.raw("${}^-$")   ,
   textext.raw("${}^2$")   ) ;
if unknown _trial_run_ :
  numbers_initialized := true ;
else :
  % no reset, otherwise textexts get out of sync
  % slows down graphics a bit but not much
fi ;
  fi ;
enddef ;

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] metafun: formatting numbers

2010-12-11 Thread Peter Münster
Hello,

Formatting numbers seems to be buggy:

\starttext
\startMPcode
drawoptions(withpen pencircle scaled .25pt withcolor .5white) ;
draw hlingrid (0, 20, 1, 20cm, 10cm) ;
fmt_pictures := false ; % use TeX as formatting engine
draw hlintext.lft(0, 20, 1, 20cm, "@3e") ;
\stopMPcode
\stoptext

See also page 381 of latest metafun-s.pdf.

Peter

-- 
Contact information: http://pmrb.free.fr/contact/
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Metafun and MetaObj in MKIV

2010-11-29 Thread Hans Hagen

On 27-11-2010 9:12, Martin Scholz wrote:


Dear Mr. Hagen,
is there a problem in MKIV, I try to use the included MetaObj in
ConTeXt-Minimals, what I get is that a sample script under MKII builds
but not under MKIV, there it is not produced and the MetaFun objects
after it are also not produced.
Thanks for your help so far.


change this:

  mat.c: = origin ;

It looks like nb is not defined and maybe more

\starttext

\startMPinclusions
input metaobj;
\stopMPinclusions

\startuseMPgraphic{commutativediagram}
  newCircle.m(btex M etex)   "framed(false)" ;
  newCircle.n(btex M' etex)  "framed(false)" ;
  newCircle.o(btex M'' etex) "framed(false)" ;
  newMatrix.mat(2,2)(m,n,nb,o) "hsep(1cm)", "vsep(2cm)" ;
  mcline.mat(1,1,1,2) "nodesepA(3pt)" ;
  mcline.mat(1,2,2,2) "nodesepA(3pt)" ;
  mcline.mat(1,1,2,2) "nodesepA(3pt)" ;
  mat.c: = origin ;
  drawObj(mat) ;
\stopuseMPgraphic
\useMPgraphic{commutativediagram}
\stoptext



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] metafun

2010-10-23 Thread Aditya Mahajan

On Sat, 23 Oct 2010, Herbert Voss wrote:


It is a hard job to understand how all works ...


I agree. That chapter is confusing if you do not know already how the mechanism
works.


I tried to create the first example of the
documentation "Page 257 Anchors and layers",
but failed with mkii and iv. The page is created,
but without the graphical elements. Not using
\startbuffer--\stopbuffer makes no difference.


You are simply setting the positions. You also need to tell ConTeXt to do 
something with the positions.


1. First define a position graphic that does something with the anchors 
that it is passed.


\startMPpositiongraphic{mypos:arrow}
  pair c[] ;
  initialize_box(\MPpos{\MPvar{self}});
  c[1] := cxy ;
  initialize_box(\MPpos{\MPvar{to}});
  c[2] := cxy ;
  drawarrow c[1] -- c[2] withpen pencircle scaled 2bp ;
\stopMPpositiongraphic

cxy is the center of the box. See the defn of initialize_box in mp-core.mp 
for other values. I wish these were better documented.


2. Then define a position overlay that specifies the relation between the 
anchors.


\startpositionoverlay{arrow}
\setMPpositiongraphic{X-1}{mypos:arrow}{to=X-2}
\setMPpositiongraphic{X-2}{mypos:arrow}{to=X-3}
\stoppositionoverlay


3. Define an overlay that is mapped to MP position overlay.

\defineoverlay[arrow][\positionoverlay{arrow}]

4. Hook the overlay as a page background

\setupbackgrounds[page][background=arrow]

5. Then everything will work.

\starttext

\section {Anchors and layers}

In a previous section we saw that some \hpos{X-1} {words} were
\hpos{X-2}{circled} and connected by an \hpos{X-3} {arrow}.
As with most things in \CONTEXT, marking these words is separated
from declaring what to do with those words. This paragraph is keyed
in as:

\stoptext

Aditya
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] metafun

2010-10-23 Thread Herbert Voss
It is a hard job to understand how all works ...
I tried to create the first example of the
documentation "Page 257 Anchors and layers",
but failed with mkii and iv. The page is created,
but without the graphical elements. Not using
\startbuffer--\stopbuffer makes no difference.

MTXrun | current version: 2010.07.30 11:35

Herbert

\starttext

\section {Anchors and layers}

\startbuffer[a]
\setMPpositiongraphic{X-1}{mypos:arrow}{to=X-2}
\setMPpositiongraphic{X-2}{mypos:arrow}{to=X-3}
\stopbuffer

\startbuffer[b]
In a previous section we saw that some \hpos {X-1} {words} were
\hpos {X-2} {circled} and connected by an \hpos {X-3} {arrow}.
As with most things in \CONTEXT, marking these words is separated
from declaring what to do with those words. This paragraph is keyed
in as:
\stopbuffer

\getbuffer[a,b]

\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] metafun

2010-10-23 Thread Alan BRASLAU
On Friday 22 October 2010 16:06:06 Taco Hoekwater wrote:
> On 10/21/2010 12:42 AM, Kevin D. Robbins wrote:
> > Hi Hans,
> > 
> > Is the new MetaFun manual available for download? The only PDFs I could
> > find of the MetaFun manual were dated to 2002.
> 
> The new version is on the web site now.
> 

Hello everyone.

Today, I received the printed version of the new MetaFun manual. It is very 
nice to have on hand.

Of course, I am also glad to now have the electronic version on my computer to 
use as a working reference. But this does not replace reading the printed 
version in order to discover the richness of possibilities that I do not yet 
use.

Alan

For those who are not aware of the availability of the printed version, see: 
http://www.boekplan.com/
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Generating new setup manual on local distribution --- formerly Re: metafun

2010-10-22 Thread Wolfgang Schuster

Am 22.10.2010 um 21:06 schrieb Giulio Bertellini:

> HI:
> a naive question. Went to the link  http://www.pragma-ade.nl/show-man-10.htm  
>  and took a look at the new setup manual (in pdf format).  
> I could not understand the meaning of this remark " The manual can be 
> generated on the user's system, since the style and the database that is 
> needed is part of the distribution".  How can I generate the manual on my 
> minimals installation?  Thank you very, much,

For the english interface: context --result=setup-en x-set-12
For the dutch interface: context --result=setup-nl --interface=nl  x-set-12
...

Wolfgang___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Generating new setup manual on local distribution --- formerly Re: metafun

2010-10-22 Thread Giulio Bertellini
HI:
a naive question. Went to the link  http://www.pragma-ade.nl/show-man-10.htm
  and took a look at the *new setup manual* (in pdf format).
I could not understand the meaning of this remark " The manual can be
generated on the user's system, since the style and the database that is
needed is part of the distribution".  How can I generate the manual on my
minimals installation?  Thank you very, much,

giulio bertellini
e style and database that is needed is part of the distribution. manual can
be generated on the user's system, since the style and database that is
needed is part of the distribution.

On Fri, Oct 22, 2010 at 5:29 PM, Otared Kavian  wrote:

>
> On 22 oct. 2010, at 16:22, Taco Hoekwater wrote:
>
> > On 10/22/2010 04:20 PM, Hans Hagen wrote:
> >> On 22-10-2010 4:06, Taco Hoekwater wrote:
> >>> On 10/21/2010 12:42 AM, Kevin D. Robbins wrote:
> >>>> Hi Hans,
> >>>>
> >>>> Is the new MetaFun manual available for download? The only PDFs I
> could
> >>>> find of the MetaFun manual were dated to 2002.
> >>>
> >>> The new version is on the web site now.
> >>
> >> I wondered who would notice first -)
> >
> > I usually win such races because I have an hourly rsync running :)
> >
> > Best wishes,
> > Taco
>
> …so one has to visit the website very often :-)
> By the way, I found that there is a new setup commands manual, in several
> languages (French, Italian among others):
>http://www.pragma-ade.nl/show-man-10.htm
> Best regards: OK
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] metafun

2010-10-22 Thread Kevin D. Robbins
Thanks! I'll grab it right now.

Kevin

On Fri, Oct 22, 2010 at 8:22 AM, Taco Hoekwater  wrote:

> On 10/22/2010 04:20 PM, Hans Hagen wrote:
>
>> On 22-10-2010 4:06, Taco Hoekwater wrote:
>>
>>> On 10/21/2010 12:42 AM, Kevin D. Robbins wrote:
>>>
>>>> Hi Hans,
>>>>
>>>> Is the new MetaFun manual available for download? The only PDFs I could
>>>> find of the MetaFun manual were dated to 2002.
>>>>
>>>
>>> The new version is on the web site now.
>>>
>>
>> I wondered who would notice first -)
>>
>
> I usually win such races because I have an hourly rsync running :)
>
> Best wishes,
> Taco
>
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] metafun

2010-10-22 Thread Otared Kavian

On 22 oct. 2010, at 16:22, Taco Hoekwater wrote:

> On 10/22/2010 04:20 PM, Hans Hagen wrote:
>> On 22-10-2010 4:06, Taco Hoekwater wrote:
>>> On 10/21/2010 12:42 AM, Kevin D. Robbins wrote:
>>>> Hi Hans,
>>>> 
>>>> Is the new MetaFun manual available for download? The only PDFs I could
>>>> find of the MetaFun manual were dated to 2002.
>>> 
>>> The new version is on the web site now.
>> 
>> I wondered who would notice first -)
> 
> I usually win such races because I have an hourly rsync running :)
> 
> Best wishes,
> Taco

…so one has to visit the website very often :-)
By the way, I found that there is a new setup commands manual, in several 
languages (French, Italian among others):
http://www.pragma-ade.nl/show-man-10.htm
Best regards: OK
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] metafun

2010-10-22 Thread Hans Hagen

On 22-10-2010 5:12, Wolfgang Schuster wrote:


Am 22.10.2010 um 16:20 schrieb Hans Hagen:


The screen version (no change in the interface) looks nice on an ipad.


Indeed, S6 is the perfect page size on the ipad but what happened with the 
randomized „MetaFun“ in the text?


you want it back?


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] metafun

2010-10-22 Thread Wolfgang Schuster

Am 22.10.2010 um 16:20 schrieb Hans Hagen:

> The screen version (no change in the interface) looks nice on an ipad.

Indeed, S6 is the perfect page size on the ipad but what happened with the 
randomized „MetaFun“ in the text?

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] metafun

2010-10-22 Thread Taco Hoekwater

On 10/22/2010 04:20 PM, Hans Hagen wrote:

On 22-10-2010 4:06, Taco Hoekwater wrote:

On 10/21/2010 12:42 AM, Kevin D. Robbins wrote:

Hi Hans,

Is the new MetaFun manual available for download? The only PDFs I could
find of the MetaFun manual were dated to 2002.


The new version is on the web site now.


I wondered who would notice first -)


I usually win such races because I have an hourly rsync running :)

Best wishes,
Taco
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] metafun

2010-10-22 Thread Hans Hagen

On 22-10-2010 4:06, Taco Hoekwater wrote:

On 10/21/2010 12:42 AM, Kevin D. Robbins wrote:

Hi Hans,

Is the new MetaFun manual available for download? The only PDFs I could
find of the MetaFun manual were dated to 2002.


The new version is on the web site now.


I wondered who would notice first -)

The screen version (no change in the interface) looks nice on an ipad.

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] metafun

2010-10-22 Thread Taco Hoekwater

On 10/21/2010 12:42 AM, Kevin D. Robbins wrote:

Hi Hans,

Is the new MetaFun manual available for download? The only PDFs I could
find of the MetaFun manual were dated to 2002.


The new version is on the web site now.

Best wishes,
Taco
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] metafun

2010-10-21 Thread Hans Hagen

On 21-10-2010 12:42, Kevin D. Robbins wrote:

Hi Hans,

Is the new MetaFun manual available for download? The only PDFs I could find
of the MetaFun manual were dated to 2002.

Kevin

On Wed, Oct 20, 2010 at 6:03 AM, Hans Hagen  wrote:


they will be online soon (also new screen version)

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] metafun

2010-10-20 Thread Kevin D. Robbins
Hi Hans,

Is the new MetaFun manual available for download? The only PDFs I could find
of the MetaFun manual were dated to 2002.

Kevin

On Wed, Oct 20, 2010 at 6:03 AM, Hans Hagen  wrote:

> Hi,
>
> At the context conference Taco presented a new initiative with respect to
> manuals. For those who cannot (or don't want to) print and bind at home we
> offer a printing on demand service. This week we send out the first copies
> of the (new) metafun manual:
>
> http://www.boekplan.nl/node/9
>
> More will follow. We hope that this will (partially) answer the need for
> manuals. We still have to find out which manuals (also new ones) should
> become available as it takes a bit of effort to keep this flow running and
> to turn manuals in some book-like form, so best keep an eye on the site if
> you're interested.
>
> Hans & Taco
>
> -
>  Hans Hagen | PRAGMA ADE
>  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
> | www.pragma-pod.nl
> -
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] metafun manual

2010-10-20 Thread Alan BRASLAU
On Wednesday 20 October 2010 14:03:03 Hans Hagen wrote:
> 
> This week we send out the first copies of the (new) metafun manual:

Wow! Just in time for Christmas :)

Alan
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] metafun

2010-10-20 Thread Vedran Miletić
2010/10/20 Mojca Miklavec :
> On Wed, Oct 20, 2010 at 14:03, Hans Hagen wrote:
>>
>> We still have to find out which manuals (also new ones) should
>> become available
>
> Offtopic: I would vote for TikZ manual (if author is still reachable).
>
> Mojca

He is, and he sometimes commits patches (even though most of the works
is done by Christian Feuersaenger). See this:
http://www.texample.net/tikz/

Off-topic: next release of TikZ/PGF is due very soon[1], so this
wouldn't be the right time to print manual for 2.0.

Regards,

-- 
Vedran Miletić

[1] 
http://bitbucket.org/rivanvx/beamer/issue/67/vertical-offset-of-slide-content-for-pages-1-with-current#comment-266195
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] metafun

2010-10-20 Thread Martin Schröder
2010/10/20 Mojca Miklavec :
> On Wed, Oct 20, 2010 at 14:03, Hans Hagen wrote:
> Offtopic: I would vote for TikZ manual (if author is still reachable).

You mean pgfmanual.pdf? That's free, so it shouldn't be a legal problem.
But it's a thick brick...

Best
   Martin
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] metafun

2010-10-20 Thread Taco Hoekwater

On 10/20/2010 02:03 PM, Hans Hagen wrote:


http://www.boekplan.nl/node/9


There is also an English website interface:

  http://www.boekplan.com/node/9

Best wishes,
Taco
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] metafun

2010-10-20 Thread Mojca Miklavec
On Wed, Oct 20, 2010 at 14:03, Hans Hagen wrote:
>
> We still have to find out which manuals (also new ones) should
> become available

Offtopic: I would vote for TikZ manual (if author is still reachable).

Mojca
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] metafun

2010-10-20 Thread Hans Hagen

Hi,

At the context conference Taco presented a new initiative with respect 
to manuals. For those who cannot (or don't want to) print and bind at 
home we offer a printing on demand service. This week we send out the 
first copies of the (new) metafun manual:


http://www.boekplan.nl/node/9

More will follow. We hope that this will (partially) answer the need for 
manuals. We still have to find out which manuals (also new ones) should 
become available as it takes a bit of effort to keep this flow running 
and to turn manuals in some book-like form, so best keep an eye on the 
site if you're interested.


Hans & Taco

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] pagenumbers in metafun

2010-09-27 Thread Thomas A. Schmitz

On Sep 20, 2010, at 10:31 AM, Thomas A. Schmitz wrote:
> 
> Here's a question that has been on my mind for a while now and that I would 
> have loved to ask Taco and Hans at Brejlov: we now have shiny new 
> \userpagenumber and \realpagenumber etc. Is any of these available and 
> accessible from within Metafun? Right now, in a StartPage -- StopPage 
> environment, I use 
> NOfPages and PageNumber, but it would be convenient if we had access to 
> userpagenumber as well (so the number can be reset etc.)
> 
Here's what you get when you ask a question without testing first! I'm very 
embarrassed to say that this question is bovine excrements. The metafun macro 
PageNumber does indeed refer to \userpagenumber, so this part is answered. 
However, there's still something I would like to know. Consider the following 
example: 

\startuseMPgraphic{back}
  StartPage ;
  z[1] = center Page ;
  label.bot(textext("\switchtobodyfont[30pt]\startcolor[orange]" &
  decimal PageNumber & "\stopcolor\ -- \startcolor[darkblue]" & decimal
  NOfPages & "\stopcolor"), z[1]) ; 
StopPage ;
\stopuseMPgraphic

\defineoverlay
  [pageback]
  [\useMPgraphic{back}]

\setupbackgrounds[page][background=pageback]

\setupuserpagenumber[state=start] 

\starttext

\dorecurse{8}{\userpagenumber \input knuth\page}

\resetuserpagenumber

\dorecurse{8}{\userpagenumber \input knuth\page}

\stoptext

The PageNumber does the right thing: goes from 1 to 8, then is reset to 1 
again. But NOfPages results in "16," the total number. Is there any way I can 
have a metafun macro "the highest page number before \userpagenumber was reset"?

Thanks, and best

Thomas

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] pagenumbers in metafun

2010-09-20 Thread Thomas A. Schmitz
Hi all,

first, for thosw of you who went to the meeting: welcome back home from the 
ConTeXt meeting - looking at the slides and at the pictures made me really sad 
I couldn't come; I really hope I will be able to make it next year to 
Porquerolles!

Here's a question that has been on my mind for a while now and that I would 
have loved to ask Taco and Hans at Brejlov: we now have shiny new 
\userpagenumber and \realpagenumber etc. Is any of these available and 
accessible from within Metafun? Right now, in a StartPage -- StopPage 
environment, I use 
NOfPages and PageNumber, but it would be convenient if we had access to 
userpagenumber as well (so the number can be reset etc.)

All best

Thomas
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


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{}
> \swlogo{}
> 
> in the preamble
> 
> and should be automatically placed in the metapost graphic at runtime
> 
> what would be the best way to do that?
> 
> I thought about
> 
> \def\author{content}
> 
> 
> and then in metapost \btex\author\etex
> 
> but not sure if it will work, or is there a more ConTeXtian way to do 
> so...

You can set the values with

\setvariables
  [document]
  [author=...,
   title=...,
   logo=...]

and access them with

\getvariable{document}{author}

You can also test for a content of the variable:

\doifvariable{document}{logo}{\externalfigure[\getvariable{document}{logo}]}

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[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 in the metapost graphic at runtime

what would be the best way to do that?

I thought about

\def\author{content}


and then in metapost \btex\author\etex

but not sure if it will work, or is there a more ConTeXtian way to do 
so...

Thanks for your help

-- 
Martin 'golodhrim' Scholz
Auf dem Sattler 4
34516 Ederbringhausen
Germany
Phone: +49 6454 799623
mobile: +49 176 63301749
Fax: +49 6454 7990138
e-Mail: scholz@googlemail.com

To downgrade the human mind is bad theology.
- C. K. Chesterton

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Fwd: Re: problem with mpost/metafun/MKII/MKIV???

2010-08-29 Thread Hans Hagen



I don't like that "insecure world writable", but oke for the moment being.


this is some harmless but annoying ruby message that I've learned to ignore

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Fwd: Re: problem with mpost/metafun/MKII/MKIV???

2010-08-29 Thread Taco Hoekwater



 Original Message 
Subject: Re: [NTG-context] problem with mpost/metafun/MKII/MKIV???
Date: Sun, 29 Aug 2010 11:04:28 +
From: Rene van Hassel 
To: Taco Hoekwater 

Hello Taco,


sorry, but I will tell you my resulst so far.
After installing Texlive 2009, and I put the directory of texlive
open for writing as usr, so chmod 777 /usr/local/texlive,
I followed all kind of suggestions on the page of ConTeXt-garden,
such as the generation of luatools and go so on.
I also put your suggestion in the texmf.conf file of version 2009,
and I put the paths to the new texlive version into the
.profile file.
It took very long time before the file was "compiled" completely,
much longer as before, with texlive version 2007.
But I got my "decorations" back.
I have only the idea that is worked with MKII and not with
MKIV, I have no idea if this is in the line of the development
of ConTeXt? Has MKIV to be used or MKII?
If I do as user which pdflatex and so on I get answers back
with /usr/local/texlive/2009.. , so I have the idea that texlive
2009 is used.
The following command:
texexec --version
gives:
/usr/local/texlive/2009/texmf-dist/scripts/context/ruby/base/system.rb:16: 
warning: Insecure world writable dir 
/usr/local/texlive/2009/bin/i386-linux in PATH, mode 040777

TeXExec | version 6.2.1 - 1997-2009 - PRAGMA ADE/POD

I don't like that  "insecure world writable", but oke for the moment being.
There is also used, much space of the hard-disk
in the home directory. I think that I will not try to do this at my ASUS 
eee PC,

with the 16Gb SDD!  The operating system is almost (4/3)times what is was.
(Two texlive systems.) I not really trust it, but oke for this moment,


greetings,


Rene'

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] problem with mpost/metafun/MKII/MKIV???

2010-08-29 Thread Taco Hoekwater

On 08/29/2010 09:09 AM, Rene van Hassel wrote:

Hello Members,


I have a problem with texlive 2009.
In the version 2007, I made some file with "decorations", made by metapost.Then
you got a list of numbered -mpgraph files. In the version 2009, I don't getns
these files and my .pdf files are without the "decorations".  With "decorations"
I mean blocks around pieces of text, witin a lecture note. Also the first
page is white, till it was first green with some figures on it.

While texexec works, I see mpgraph files but only numbered
by .1, in the 2007 version it started by 4000 and it went to almost 3650.
I see also that there is made use of MKIV  instead of MKII in the 2007
version.

What to do such that the 2009 version, gives the same result as the
2007 version.


Your symptoms indicate that you probably need to add

  shell_escape = t

to the texmf.cnf file.

Best wishes,
Taco
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] problem with mpost/metafun/MKII/MKIV???

2010-08-29 Thread Rene van Hassel
Hello Members,


I have a problem with texlive 2009.
In the version 2007, I made some file with "decorations", made by metapost.Then 
 
you got a list of numbered -mpgraph files. In the version 2009, I don't getns
these files and my .pdf files are without the "decorations".  With 
"decorations" 
I mean blocks around pieces of text, witin a lecture note. Also the first 
page is white, till it was first green with some figures on it. 

While texexec works, I see mpgraph files but only numbered 
by .1, in the 2007 version it started by 4000 and it went to almost 3650.
I see also that there is made use of MKIV  instead of MKII in the 2007
version. 

What to do such that the 2009 version, gives the same result as the 
2007 version. I installed the 2009 version of the TUG side with 
tlmgr and almost everything of texlive is installed. Only most of the languages 
are not installed, further everything,


greetings,


Rene'
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] change numeral to string in Metafun

2010-07-14 Thread Jeong Dalyoung
Dear Wolfgang,

It is nicely working.
Thank you for your help.

best regards,

Dalyoung
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] change numeral to string in Metafun

2010-07-13 Thread Wolfgang Schuster

Am 14.07.10 02:19, schrieb dalyoung:

Dear all,

I'd like to draw boxes with a label in a certain rule.
[...]

So, I'd like to know how to put received numeral(the height of the box) as a 
label.
Or, how to change the value of a variable to a string.

[...]

label("1",(3s*u+u, t*u + h*u/2));
   

label(decimal h,(3s*u+u, t*u + h*u/2));

or

label(textext(decimal h),(3s*u+u, t*u + h*u/2));

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] change numeral to string in Metafun

2010-07-13 Thread dalyoung
Dear all,

I'd like to draw boxes with a label in a certain rule.
I define drawbox macro for it.
It receives 3 numbers, (the height of box, x position, y position).
I'd like to label the height of the box in the middle of the box.

I tired 
 label( h ,(3s*u+u, t*u + h*u/2)); %h is a received numeral.
But it is not working. If I change h to "letter" in label command, it is 
working.

So, I'd like to know how to put received numeral(the height of the box) as a 
label.
Or, how to change the value of a variable to a string.

Here is a working sample code.

\startuseMPgraphic{sample}
numeric u;
u := 0.5cm;

def drawbox (expr h, s, t) =
%numeric h,s,t;
draw unitsquare xyscaled (1cm, h*u) shifted (3*s*u, t*u);
label("1",(3s*u+u, t*u + h*u/2));
enddef;

drawbox (3, 0, 0); 
drawbox (6, 0, 3); 
drawbox (2, 1, 0); 
drawbox (1, 1, 2); 
drawbox (3, 2, 0) 
drawbox (4, 2, 3)

\stopuseMPgraphic

\starttext
\placefigure[here][]{sample}
{\useMPgraphic{sample}}

\stoptext


Thank you.
Dalyoung
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] metafun problem

2010-07-13 Thread Albrecht Kauffmann
Dear ConTeXtuals,

the following MP-inclusion produces fatal error (! TeX capacity
exceeded, sorry [parameter stack size=6000].):

starttext
\startMPcode
label(btex $\underbrace{a}_{b}$ etex,(0,0));
\stopMPcode
\stoptext

I use mkii, but the code should work.
Has anyone an explanation?

With many thanks for any hint
Albrecht
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Metafun in MacTeX 209 distribution

2010-04-06 Thread jindrich Ruzicka

On Apr 4, 2010, at 4:58 PM, jindrich Ruzicka wrote:

> Hello people,
> 
> I installed  Mac TeX -2009 Distribution on a new iMAC.
> 
> when I try to run texexec on a Context file that  includes a metapost program,
> I receive no picture that is defined in metapost part. 
> (btw in my linux installation it works)
> 
> What I can find in log file is:
> ...
> runsystem(texmfstart texexec --batch --output=dvips --mpformat=metafun 
> --mptex --nomp --once obrazek-mpgraph)...disabled.
> ...
> 
> Running this sequence manually and reruning the 1st texexec I receive what I 
> expect.
> 
> Is it a feature of Mac distribution or there is a mismatch in some 
> file/directory permissions? (mptopfd, ...)
> Are there another installation steps needed after fresh MacTeX installation?
> 
> 
> the test file is:
> 
> \startuseMPgraphic{def}
> ...
> 
> \stopuseMPgraphic
> 
> \startuseMPgraphic{obr30}
> \includeMPgraphic{def}
> ...
> \stopuseMPgraphic
> 
> \starttext
> 
>   test
>   \placefigure[here][fig1]{yyy} {\useMPgraphic{obr30}}
>   end of test
> 
> \stoptext
> 
> Nice day,
> 
> Jindro
> 

See http://archive.contextgarden.net/message/20100322.074003.4e366fdd.en.html

Perhaps this ought to be added to the texlive page

Aditya

Thank you, Yes it works.
Jindro


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


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

2010-04-05 Thread Hans Hagen

On 4-4-2010 7:29, Matija Šuklje wrote:

Dne nedelja 4. aprila 2010 ob 19:23:18 je Peter Wüsten napisal(a):

I just tried using an SVG image directly in MkIV, and it worked like a
breeze. Apparently ConTeXt converts the image to PDF on the fly as I
found a PDF-file with a similar name (m_k_v_i_.pdf)
in the same directory as the SVG-file.

If you would still love to convert your SVG-images you might want to use
Inkscape:
inkscape --export-pdf=  


Thanks for the tips :)

But actually I'm thinking more in the line of including that logo 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) :\


svg -> pdf (using inkscape) -> mp (using pstoedit)


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


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

2010-04-04 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 metafont.

But there is also a beginner's tutorial on  metapost:

http://www.tug.org/texlive//devsrc/Master/texmf-dist/doc/metapost/base/mpintro.pdf

Best wishes,
Taco
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


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
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


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
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


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,
Matija
-- 
gsm: +386 41 849 552
www: http://matija.suklje.name
xmpp: matija.suk...@gabbler.org
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


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 well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


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 the details by yourself):

Wow, thanks! :D

I'll dig through the manuals to figure out what that codeblock actually does 
and try to fix it.

BTW, is there a special command I'm missing to turn on the colours in 
ConTeXt?


Cheers,
Matija
-- 
gsm: +386 41 849 552
www: http://matija.suklje.name
xmpp: matija.suk...@gabbler.org
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


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

2010-04-04 Thread Mojca Miklavec
On Sun, Apr 4, 2010 at 19:29, Matija Šuklje wrote:
> Dne nedelja 4. aprila 2010 ob 19:23:18 je Peter Wüsten napisal(a):
>> I just tried using an SVG image directly in MkIV, and it worked like a
>> breeze. Apparently ConTeXt converts the image to PDF on the fly as I
>> found a PDF-file with a similar name (m_k_v_i_.pdf)
>> in the same directory as the SVG-file.
>>
>> If you would still love to convert your SVG-images you might want to use
>> Inkscape:
>> inkscape --export-pdf= 
>
> Thanks for the tips :)
>
> But actually I'm thinking more in the line of including that logo 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 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 the details by yourself):

\starttext
\startMPcode
unit := 5cm;
dx := 1.2;
color maincolor; maincolor = (0,0.9,0); % fixme
path p;

p := unitsquare scaled unit;
fill p  withcolor maincolor;
fill p shifted ( dx*unit,0) withcolor maincolor;
fill p shifted (-dx*unit,0) withcolor maincolor;
fill p shifted (0, dx*unit) withcolor maincolor;
p := p xscaled ((3-dx)/4) shifted (0,-dx*unit);
fill p withcolor maincolor;
fill p xyscaled (-1,1) shifted (unit,0) withcolor maincolor;
\stopMPcode
\stoptext

Mojca
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


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

2010-04-04 Thread Matija Šuklje
Dne nedelja 4. aprila 2010 ob 19:23:18 je Peter Wüsten napisal(a):
> I just tried using an SVG image directly in MkIV, and it worked like a
> breeze. Apparently ConTeXt converts the image to PDF on the fly as I
> found a PDF-file with a similar name (m_k_v_i_.pdf)
> in the same directory as the SVG-file.
> 
> If you would still love to convert your SVG-images you might want to use
> Inkscape:
> inkscape --export-pdf= 

Thanks for the tips :)

But actually I'm thinking more in the line of including that logo 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) :\


Cheers,
Matija
-- 
gsm: +386 41 849 552
www: http://matija.suklje.name
xmpp: matija.suk...@gabbler.org
<>___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


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

2010-04-04 Thread Peter Wüsten
I just tried using an SVG image directly in MkIV, and it worked like a 
breeze. Apparently ConTeXt converts the image to PDF on the fly as I 
found a PDF-file with a similar name (m_k_v_i_.pdf) 
in the same directory as the SVG-file.


If you would still love to convert your SVG-images you might want to use 
Inkscape:

inkscape --export-pdf= 

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
P.S. Too bad SVG is not ConTeXt-native (yet?)
  


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[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...@gabbler.org
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Metafun in MacTeX 209 distribution

2010-04-04 Thread Aditya Mahajan

On Sun, 4 Apr 2010 10:58:13 -0400, ntg-context-boun...@ntg.nl wrote:
> Hello people,
> 
> I installed  Mac TeX -2009 Distribution on a new iMAC.
> 
> when I try to run texexec on a Context file that  includes a metapost program,
> I receive no picture that is defined in metapost part. 
> (btw in my linux installation it works)
> 
> What I can find in log file is:
> ...
> runsystem(texmfstart texexec --batch --output=dvips --mpformat=metafun 
> --mptex --nomp --once obrazek-mpgraph)...disabled.
> ...

See http://archive.contextgarden.net/message/20100322.074003.4e366fdd.en.html

Perhaps this ought to be added to the texlive page

Aditya

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Metafun in MacTeX 209 distribution

2010-04-04 Thread jindrich Ruzicka
Hello people,

I installed  Mac TeX -2009 Distribution on a new iMAC.

when I try to run texexec on a Context file that  includes a metapost program,
I receive no picture that is defined in metapost part. 
(btw in my linux installation it works)

What I can find in log file is:
...
runsystem(texmfstart texexec --batch --output=dvips --mpformat=metafun --mptex 
--nomp --once obrazek-mpgraph)...disabled.
...

Running this sequence manually and reruning the 1st texexec I receive what I 
expect.

Is it a feature of Mac distribution or there is a mismatch in some 
file/directory permissions? (mptopfd, ...)
Are there another installation steps needed after fresh MacTeX installation?


the test file is:

\startuseMPgraphic{def}
...

\stopuseMPgraphic

\startuseMPgraphic{obr30}
\includeMPgraphic{def}
...
\stopuseMPgraphic

\starttext

test
\placefigure[here][fig1]{yyy} {\useMPgraphic{obr30}}
end of test

\stoptext

Nice day,

Jindro

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Metafun does not change color

2010-02-19 Thread Xan

En/na Hans Hagen ha escrit:

On 18-2-2010 22:03, Xan wrote:


I have the following code (see at final). I define SquareText to be
darkblue in framecolor, but metafun use darkred. Why? Any ideas?



p := textext.rt(\MPstring{FunnyFrame}) ;



And so, why does the setuoframedtext option mean?

\setupframedtexts
 [SquareText]
 [backgroundcolor=screen,
  framecolor=darkblue,
  rulethickness=2pt,
  offset=\bodyfontsize,
  before={\blank[big,medium]},
  after={\blank[big]},
  width=\textwidth]

I extract the example from manual.

Regards,
Xan.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Metafun does not change color

2010-02-19 Thread Hans Hagen

On 18-2-2010 22:03, Xan wrote:


I have the following code (see at final). I define SquareText to be
darkblue in framecolor, but metafun use darkred. Why? Any ideas?



p := textext.rt(\MPstring{FunnyFrame}) ;


you need to change the color in textext (or in the MPstring)


draw p withcolor black ;


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Metafun does not change color

2010-02-18 Thread Xan

Hi,

I have the following code (see at final). I define SquareText to be 
darkblue in framecolor, but metafun use darkred. Why? Any ideas?


Xan.

\page
\section{Tectònica de plaques}

\subsection{Com es formen els relleus?}

\setupFLOWcharts[width=.4\textwidth]

\startFLOWchart[fixistes]
\startFLOWcell
 \name {Fonts}
 \location {1,1}
 \text {Algunes teories es basaven en relats bíblics.  Atribuïen al 
diluvi universal la causa d'alguns relleus i la presència de fòssils 
marins a les muntanyes.}

 \connection [rl] {fixistes}
 \shape{procedure}
\stopFLOWcell
\startFLOWcell
 \name {fixistes}
 \location{2,1}
 \text {Altres suposaven que la Terra s'ha anat arrugat progressivament 
en refredar-se i que els relleus són arrugues provocades per l'escorça 
en contracció.}

 \shape{decision}
\stopFLOWcell
\stopFLOWchart



\defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}]
\defineframedtext[FunnyText][frame=off,background=FunnyFrame]
\def\StartFrame{\startFunnyText}
\def\StopFrame {\stopFunnyText }
\def\FrameTitle#1%
 {\setMPtext{FunnyFrame}{\hbox spread 1em{\hss\strut#1\hss}}}
\setMPtext{FunnyFrame}{} % initialize the text variable

\startuseMPgraphic{FunnyFrame}
 picture p ; numeric o ; path a, b ; pair c ;
 p := textext.rt(\MPstring{FunnyFrame}) ;
 o := BodyFontSize ;
 a := unitsquare xyscaled(OverlayWidth,OverlayHeight) ;
 p := p shifted (2o,OverlayHeight-ypart center p) ;
 pickup pencircle scaled OverlayLineWidth ;
 b := a superellipsed .95 ;
 fill b withcolor OverlayColor ;
 draw b withcolor OverlayLineColor ;
 b := (boundingbox p) superellipsed .95 ;
 fill b withcolor OverlayColor ;
 draw b withcolor OverlayLineColor ;
 draw p withcolor black ;
 setbounds currentpicture to a ;
\stopuseMPgraphic

\setupframedtexts
 [FunnyText]
 [backgroundcolor=lightgray,
  framecolor=darkred,
  rulethickness=2pt,
  offset=\bodyfontsize,
  before={\blank[big,medium]},
  after={\blank[big]},
  width=\textwidth]



\FrameTitle{Teories fixistes}
\StartFrame
Al llarg del segle XIX i el començament del XX, es crearen diverses 
teories que intentaven explicar l'origen de les serrelades i el 
plegament dels estrats, que no podem explicar fàcilment.


Totes aquestes teories tenen com a {\bf principi} que els continents i 
els oceans han ocupat les {\em mateixes posicions} des de l'origen de la 
Terra fins ara.

\StopFrame

\FLOWchart[fixistes]

\defineoverlay[SquareFrame][\useMPgraphic{SquareFrame}]
\defineframedtext[SquareText][frame=off,background=SquareFrame]
\def\StartSquareFrame{\startSquareText}
\def\StopSquareFrame {\stopSquareText }
\def\SquareTitle#1%
 {\setMPtext{SquareFrame}{\hbox spread 1em{\hss\strut#1\hss}}}
\setMPtext{SquareFrame}{} % initialize the text variable

\startuseMPgraphic{SquareFrame}
 picture p ; numeric o ; path a, b ; pair c ;
 p := textext.rt(\MPstring{SquareFrame}) ;
 a := unitsquare xyscaled(OverlayWidth,OverlayHeight) ;
 o := BodyFontSize ;
 p := p shifted (2o,OverlayHeight-ypart center p) ;
 drawoptions (withpen pencircle scaled 1pt withcolor .625red) ;
 b := a randomized (o/2) ;
 fill b withcolor .85white ; draw b ;
 c := center p ;
 c := b intersectionpoint (c shifted (0,-o)--c shifted(0,o)) ;
 p := p shifted (c-center p) ;
 b := (boundingbox p) randomized (o/8) ;
 fill b withcolor .85white ; draw b ;
 draw p withcolor black;
 setbounds currentpicture to a ;
\stopuseMPgraphic


\setupframedtexts
 [SquareText]
 [backgroundcolor=screen,
  framecolor=darkblue,
  rulethickness=2pt,
  offset=\bodyfontsize,
  before={\blank[big,medium]},
  after={\blank[big]},
  width=\textwidth]


\SquareTitle{Mobilisme}
\StartSquareFrame
El 1912, Alfred Wegener proposa una teoria revolucionària
\StopSquareFrame

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] context mkiv metafun

2010-02-05 Thread Martin 'golodhrim' Scholz
On Sat, 06 Feb 2010 01:11:49 +0100, Hans Hagen wrote:

> On 6-2-2010 1:04, Martin 'golodhrim' Scholz wrote:
>> On Sat, 06 Feb 2010 00:50:43 +0100, Hans Hagen wrote:
>>
>>> On 5-2-2010 21:40, Martin 'golodhrim' Scholz wrote:
>>>
 Ok problem solved... missing rights to write to
 /opt/context-minimals/tex/ texmf-cache/, just chmoded it 777 so it
 will be usable for graphic generation. Would be nice to include the
 possibilty to add in a standard way a personal texmf-cache, or is
 there a way to do so and I don't know about it?
>>>
>>> grep for texmfcnf.lua
>>>
>>> this is a prelude to a replacement for texmf.cnf in mkiv
>>>
>> Ok got this file Hans, and what would be a good replacement in there?
>>
>> would it be ok to something like
>>
>> return {
>>  TEXMFCACHE = '~/.context-minimals/texmf-cache',
>> }
>> ok or is it possible to use multiple paths in that syntax like:
> 
> sure. you probably need to run "luatools --generate" after a change
> 
>> return {
>>  TEXMFCACHE = 'Path1', 'Path2'
>> }
>> unfortunately on this point there is no documention I can find. Thanks
>> for your fast help Hans
> 
> no, for the moment just one cache path (maybe in the future more but it
> is sort of tricky as quite some version testing has to be done then so
> it's not a good idea to implement that while mkiv is in flux
> 
Million Thanks Hans
fixed it with the userspecific pathset and works like expected. WOW cool 
to get so fast and late so qualified help...

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] context mkiv metafun

2010-02-05 Thread Hans Hagen

On 6-2-2010 1:04, Martin 'golodhrim' Scholz wrote:

On Sat, 06 Feb 2010 00:50:43 +0100, Hans Hagen wrote:


On 5-2-2010 21:40, Martin 'golodhrim' Scholz wrote:


Ok problem solved... missing rights to write to
/opt/context-minimals/tex/ texmf-cache/, just chmoded it 777 so it will
be usable for graphic generation. Would be nice to include the
possibilty to add in a standard way a personal texmf-cache, or is there
a way to do so and I don't know about it?


grep for texmfcnf.lua

this is a prelude to a replacement for texmf.cnf in mkiv


Ok got this file Hans, and what would be a good replacement in there?

would it be ok to something like

return {
TEXMFCACHE = '~/.context-minimals/texmf-cache',
}
ok or is it possible to use multiple paths in that syntax like:


sure. you probably need to run "luatools --generate" after a change


return {
TEXMFCACHE = 'Path1', 'Path2'
}
unfortunately on this point there is no documention I can find.
Thanks for your fast help Hans


no, for the moment just one cache path (maybe in the future more but it 
is sort of tricky as quite some version testing has to be done then so 
it's not a good idea to implement that while mkiv is in flux


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] context mkiv metafun

2010-02-05 Thread Martin 'golodhrim' Scholz
On Sat, 06 Feb 2010 00:50:43 +0100, Hans Hagen wrote:

> On 5-2-2010 21:40, Martin 'golodhrim' Scholz wrote:
> 
>> Ok problem solved... missing rights to write to
>> /opt/context-minimals/tex/ texmf-cache/, just chmoded it 777 so it will
>> be usable for graphic generation. Would be nice to include the
>> possibilty to add in a standard way a personal texmf-cache, or is there
>> a way to do so and I don't know about it?
> 
> grep for texmfcnf.lua
> 
> this is a prelude to a replacement for texmf.cnf in mkiv
> 
Ok got this file Hans, and what would be a good replacement in there?

would it be ok to something like

return {
TEXMFCACHE = '~/.context-minimals/texmf-cache',
}
ok or is it possible to use multiple paths in that syntax like:

return {
TEXMFCACHE = 'Path1', 'Path2'
}
unfortunately on this point there is no documention I can find.
Thanks for your fast help Hans

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] context mkiv metafun

2010-02-05 Thread Hans Hagen

On 5-2-2010 21:40, Martin 'golodhrim' Scholz wrote:


Ok problem solved... missing rights to write to /opt/context-minimals/tex/
texmf-cache/, just chmoded it 777 so it will be usable for graphic
generation. Would be nice to include the possibilty to add in a standard
way a personal texmf-cache, or is there a way to do so and I don't know
about it?


grep for texmfcnf.lua

this is a prelude to a replacement for texmf.cnf in mkiv

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] context mkiv metafun

2010-02-05 Thread Hans Hagen

On 5-2-2010 21:23, Martin 'golodhrim' Scholz wrote:


mplib   : problems with 'metafun.mp' from '/opt/context-minimals/
tex/texmf-cache/luatex-cache/context/ccfefc91ec3ed68af1aeed1f470fef4d/
formats/cont-en-metafun.mem'
!pages  : flushing realpage 8, userpage 8

so what needs to be changed to get context mkiv running and creating the
metapost output?


i'm clueless ... can others confirm such a problem?

Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] context mkiv metafun

2010-02-05 Thread Martin 'golodhrim' Scholz
On Fri, 05 Feb 2010 20:23:24 +, Martin 'golodhrim' Scholz wrote:

> On Fri, 05 Feb 2010 18:43:35 +0100, Hans Hagen wrote:
> 
>> On 5-2-2010 10:33, Martin 'golodhrim' Scholz wrote:
>>> Hi list,
>>>
>>> another problem I encountered while installing and testing context-
>>> minimals is that the context command is not willing in my case to
>>> autobuild the metafun graphics I included in the document. Would be
>>> nice if someone has an advice to me on to fix that, got it working
>>> under texexec by creating a cont-sys.tex and linking it to the
>>> directory where cont-sys.ori is located.
>> 
>> mkii or mkiv?
>> 
>> in mkii one can set the mp related directives in the cont-sys file, but
>> depending on the distribution one might also need to enable write 18 in
>> the config file (the used one can be found with)
>> 
>> texmfstart --edit kpse:texmf.cnf
>> mtxrun --edit kpse:texmf.cnf
>> 
>> in mkiv things are done automatically as no external mp is used
> 
> The problematic output is:
> mplib   : initializing instance 'metafun' using format 'metafun'
> mplib   : making 'metafun.mp' into '/opt/context-minimals/tex/
> texmf-cache/luatex-cache/context/ccfefc91ec3ed68af1aeed1f470fef4d/
formats/
> cont-en-metafun.mem'
> mplib   : problems with 'metafun.mp' from
> '/opt/context-minimals/
> tex/texmf-cache/luatex-cache/context/ccfefc91ec3ed68af1aeed1f470fef4d/
> formats/cont-en-metafun.mem'
> !pages  : flushing realpage 8, userpage 8
> 
> so what needs to be changed to get context mkiv running and creating the
> metapost output?

Ok problem solved... missing rights to write to /opt/context-minimals/tex/
texmf-cache/, just chmoded it 777 so it will be usable for graphic 
generation. Would be nice to include the possibilty to add in a standard 
way a personal texmf-cache, or is there a way to do so and I don't know 
about it?

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] context mkiv metafun

2010-02-05 Thread Martin 'golodhrim' Scholz
On Fri, 05 Feb 2010 18:43:35 +0100, Hans Hagen wrote:

> On 5-2-2010 10:33, Martin 'golodhrim' Scholz wrote:
>> Hi list,
>>
>> another problem I encountered while installing and testing context-
>> minimals is that the context command is not willing in my case to
>> autobuild the metafun graphics I included in the document. Would be
>> nice if someone has an advice to me on to fix that, got it working
>> under texexec by creating a cont-sys.tex and linking it to the
>> directory where cont-sys.ori is located.
> 
> mkii or mkiv?
> 
> in mkii one can set the mp related directives in the cont-sys file, but
> depending on the distribution one might also need to enable write 18 in
> the config file (the used one can be found with)
> 
> texmfstart --edit kpse:texmf.cnf
> mtxrun --edit kpse:texmf.cnf
> 
> in mkiv things are done automatically as no external mp is used

The problematic output is:
mplib   : initializing instance 'metafun' using format 'metafun'
mplib   : making 'metafun.mp' into '/opt/context-minimals/tex/
texmf-cache/luatex-cache/context/ccfefc91ec3ed68af1aeed1f470fef4d/formats/
cont-en-metafun.mem'
mplib   : problems with 'metafun.mp' from '/opt/context-minimals/
tex/texmf-cache/luatex-cache/context/ccfefc91ec3ed68af1aeed1f470fef4d/
formats/cont-en-metafun.mem'
!pages  : flushing realpage 8, userpage 8

so what needs to be changed to get context mkiv running and creating the 
metapost output?

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] context mkiv metafun

2010-02-05 Thread Martin 'golodhrim' Scholz
On Fri, 05 Feb 2010 18:43:35 +0100, Hans Hagen wrote:

> On 5-2-2010 10:33, Martin 'golodhrim' Scholz wrote:
>> Hi list,
>>
>> another problem I encountered while installing and testing context-
>> minimals is that the context command is not willing in my case to
>> autobuild the metafun graphics I included in the document. Would be
>> nice if someone has an advice to me on to fix that, got it working
>> under texexec by creating a cont-sys.tex and linking it to the
>> directory where cont-sys.ori is located.
> 
> mkii or mkiv?
> 
> in mkii one can set the mp related directives in the cont-sys file, but
> depending on the distribution one might also need to enable write 18 in
> the config file (the used one can be found with)
> 
> texmfstart --edit kpse:texmf.cnf
> mtxrun --edit kpse:texmf.cnf
> 
> in mkiv things are done automatically as no external mp is used

the problem is that mkiv is not build the included metapost graphics, or 
has mkiv problems concering overlays or the project structure?

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] context mkiv metafun

2010-02-05 Thread Hans Hagen

On 5-2-2010 10:33, Martin 'golodhrim' Scholz wrote:

Hi list,

another problem I encountered while installing and testing context-
minimals is that the context command is not willing in my case to
autobuild the metafun graphics I included in the document. Would be nice
if someone has an advice to me on to fix that, got it working under
texexec by creating a cont-sys.tex and linking it to the directory where
cont-sys.ori is located.


mkii or mkiv?

in mkii one can set the mp related directives in the cont-sys file, but 
depending on the distribution one might also need to enable write 18 in 
the config file (the used one can be found with)


texmfstart --edit kpse:texmf.cnf
mtxrun --edit kpse:texmf.cnf

in mkiv things are done automatically as no external mp is used


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] context mkiv metafun

2010-02-05 Thread Martin 'golodhrim' Scholz
Hi list,

another problem I encountered while installing and testing context-
minimals is that the context command is not willing in my case to 
autobuild the metafun graphics I included in the document. Would be nice 
if someone has an advice to me on to fix that, got it working under 
texexec by creating a cont-sys.tex and linking it to the directory where 
cont-sys.ori is located.

Greetings

Martin 'golodhrim' Scholz

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] metafun in LaTeX?

2009-12-20 Thread Jean Magnan de Bornier
Le 20 décembre à 11:20:47 Taco Hoekwater  écrit notamment:

| Jean Magnan de Bornier wrote:
| > Hi all,
| >
| > This question has been asked on the french tex group: is (would) it
| > possible to use the metafun macros with LaTeX - and how?
>
| Metafun is a mpost format, and therefore it generally does not care how
| it is embedded in a surrounding document. The only exception is when
| you use metapost macros that run TeX for typesetting, these will
| assume ConTeXt's texexec is running as makempx, and it therefore
| generates ConTeXt-specific macros for labels and such.
>
| Best wishes,
| Taco

Thanks, I'll forward that.
-- 
Jean
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] metafun in LaTeX?

2009-12-20 Thread Taco Hoekwater

Jean Magnan de Bornier wrote:

Hi all,

This question has been asked on the french tex group: is (would) it
possible to use the metafun macros with LaTeX - and how?


Metafun is a mpost format, and therefore it generally does not care how
it is embedded in a surrounding document. The only exception is when
you use metapost macros that run TeX for typesetting, these will
assume ConTeXt's texexec is running as makempx, and it therefore
generates ConTeXt-specific macros for labels and such.

Best wishes,
Taco




___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] metafun in LaTeX?

2009-12-19 Thread Jean Magnan de Bornier
Hi all,

This question has been asked on the french tex group: is (would) it
possible to use the metafun macros with LaTeX - and how?

I said I'd ask here...
TIA
-- 
Jean
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] metafun/graph \times error (mkiv)

2009-12-18 Thread Hans Hagen

Alan BRASLAU wrote:
Metapost/graph currently does not handle scientific notation correctly in 
mkiv:


-> 1.5imes106

(and does not work at all in mkii)

Alan

%% minimal example:

\usemodule[graph]

\starttext

\startMPcode
draw begingraph(12cm,12cm) ;
setcoords(linear,linear) ;
setrange(0,0,365,"200") ;
endgraph ;
\stopMPcode

\stoptext


patch this in m-graph.mkiv: \ -> \\

return "\\times10^{"..(s:gsub("%+*0*","")).."}"

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] metafun/graph \times error (mkiv)

2009-12-18 Thread Alan BRASLAU
Metapost/graph currently does not handle scientific notation correctly in 
mkiv:

-> 1.5imes106

(and does not work at all in mkii)

Alan

%% minimal example:

\usemodule[graph]

\starttext

\startMPcode
draw begingraph(12cm,12cm) ;
setcoords(linear,linear) ;
setrange(0,0,365,"200") ;
endgraph ;
\stopMPcode

\stoptext

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Metafun problem

2009-09-26 Thread Peter Rolf

David Arnold schrieb:

All,

I've got the context minimals installed and I'm compiling the 
following (from the new Metafun manual) using MKIV:


\startuniqueMPgraphic{name}
path p;
p:=unitsquare xscaled OverlayWidth yscaled OverlayHeight;
fill p withcolor .625yellow;
draw p withcolor .625red;
\stopuniqueMPgraphic

\starttext
Hello, World!

\defineoverlay[my graphic][\uniqueMPgraphic{name}]
\button[background=my graphic,frame=off]{Go Home}[firstpage]

\stoptext

No button shows up. Am I missing something?


A \button is an interactive element, so you need to add

\setupinteraction[state=start]


David
___ 

If your question is of interest to others as well, please add an entry 
to the Wiki!


maillist : ntg-context@ntg.nl / 
http://www.ntg.nl/mailman/listinfo/ntg-context

webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___ 





___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Metafun problem

2009-09-26 Thread luigi scarso
On Sat, Sep 26, 2009 at 7:16 AM, David Arnold wrote:

> All,
>
> I've got the context minimals installed and I'm compiling the following
> (from the new Metafun manual) using MKIV:
>
> \startuniqueMPgraphic{name}
>path p;
>p:=unitsquare xscaled OverlayWidth yscaled OverlayHeight;
>fill p withcolor .625yellow;
>draw p withcolor .625red;
> \stopuniqueMPgraphic
>
> \starttext
> Hello, World!
>
> \defineoverlay[my graphic][\uniqueMPgraphic{name}]
> \button[background=my graphic,frame=off]{Go Home}[firstpage]
>
> \stoptext
>
> No button shows up. Am I missing something?
>
>
\startuniqueMPgraphic{name}
   path p;
   p:=unitsquare xscaled OverlayWidth yscaled OverlayHeight;
   fill p withcolor .625yellow;
   draw p withcolor .625red;
\stopuniqueMPgraphic
I don't know.
\framed works

\starttext
Hello, World!

\defineoverlay[my graphic][\uniqueMPgraphic{name}]
\button[background={my graphic},frame=off]{Go Home}[firstpage]
\framed[background={my graphic},frame=off]{framed Go Home}
\stoptext
test-arnold.tex (END)




> David
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : https://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
>
> ___
>



-- 
luigi
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Metafun problem

2009-09-25 Thread David Arnold

All,

I've got the context minimals installed and I'm compiling the  
following (from the new Metafun manual) using MKIV:


\startuniqueMPgraphic{name}
path p;
p:=unitsquare xscaled OverlayWidth yscaled OverlayHeight;
fill p withcolor .625yellow;
draw p withcolor .625red;
\stopuniqueMPgraphic

\starttext
Hello, World!

\defineoverlay[my graphic][\uniqueMPgraphic{name}]
\button[background=my graphic,frame=off]{Go Home}[firstpage]

\stoptext

No button shows up. Am I missing something?

David
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] MKIV and externaligure inside metafun

2009-08-28 Thread Mojca Miklavec
On Fri, Aug 28, 2009 at 18:51, Hans Hagen wrote:
> Peter Rolf wrote:
>
>> My only explanation: Hans has direct access to your harddisk and changes
>> things silently in the background :D
>
> ok, this was supposed to be a secret, but indeed taco and i can log into her
> time capsule device and move her back- and forward in time depending on how
> much we mess up luatex; unfortunately we could not foresee that it would
> broke her beloved mac
>
> (maybe we should start a 'new laptop for mojca project')

The "project" has already been successful. Apple will send me a free
replacement as soon as I come to Germany (Slovenia is not listed on
their World map).

As as consequence someone else will have to start providing Mac ppc
binaries next month since their new OS most probably doesn't support
cross-compiling for ppc any more.

Mojca
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] MKIV and externaligure inside metafun

2009-08-28 Thread Hans Hagen

Peter Rolf wrote:

My only explanation: Hans has direct access to your harddisk and changes 
things silently in the background :D


ok, this was supposed to be a secret, but indeed taco and i can log into 
her time capsule device and move her back- and forward in time depending 
on how much we mess up luatex; unfortunately we could not foresee that 
it would broke her beloved mac


(maybe we should start a 'new laptop for mojca project')

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] MKIV and externaligure inside metafun

2009-08-28 Thread Peter Rolf

Mojca Miklavec schrieb:

On Fri, Aug 28, 2009 at 17:57, Mojca Miklavec wrote:
  

On Fri, Aug 28, 2009 at 17:36, Peter Rolf wrote:


Hi Mojca,

wrong colors (or what is the problem here)?
  

On my machine

\startMPcode
externalfigure("filename.png");
\stopMPcode

doesn't work in MKIV at all. On Hans' machine it generates weird
colors (though not that much wrong). I can send you an example, but I
guess that it behaves the same way with any png image.

But I would not worry too much. My installation is always broken when
it works for everyone else :) :) :)



I guess that I give up.

It started working now for no particular reason (no change in files,
no change in my installation).

And the colors are fine as well.

My only explanation is that I had a broken png file at some moment and
even if I tried to proccess it again, luatex still thought that png
was broken (maybe luatex caches images somewhere?).

  
My only explanation: Hans has direct access to your harddisk and changes 
things silently in the background :D



Mojca
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

  


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] MKIV and externaligure inside metafun

2009-08-28 Thread Taco Hoekwater

Hans Hagen wrote:


if i were you, i'd start worying about my disk


or the display ...


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] MKIV and externaligure inside metafun

2009-08-28 Thread Hans Hagen

Mojca Miklavec wrote:


I guess that I give up.


whow, you giving up?


It started working now for no particular reason (no change in files,
no change in my installation).


well, you'r laptop is somewhat randomly working anyway so ...


And the colors are fine as well.

My only explanation is that I had a broken png file at some moment and
even if I tried to proccess it again, luatex still thought that png
was broken (maybe luatex caches images somewhere?).


no caching, why should it

if i were you, i'd start worying about my disk

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] MKIV and externaligure inside metafun

2009-08-28 Thread Mojca Miklavec
On Fri, Aug 28, 2009 at 17:57, Mojca Miklavec wrote:
> On Fri, Aug 28, 2009 at 17:36, Peter Rolf wrote:
>>
>> Hi Mojca,
>>
>> wrong colors (or what is the problem here)?
>
> On my machine
>
> \startMPcode
> externalfigure("filename.png");
> \stopMPcode
>
> doesn't work in MKIV at all. On Hans' machine it generates weird
> colors (though not that much wrong). I can send you an example, but I
> guess that it behaves the same way with any png image.
>
> But I would not worry too much. My installation is always broken when
> it works for everyone else :) :) :)

I guess that I give up.

It started working now for no particular reason (no change in files,
no change in my installation).

And the colors are fine as well.

My only explanation is that I had a broken png file at some moment and
even if I tried to proccess it again, luatex still thought that png
was broken (maybe luatex caches images somewhere?).

Mojca
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] MKIV and externaligure inside metafun

2009-08-28 Thread Hans Hagen

Mojca Miklavec wrote:

On Fri, Aug 28, 2009 at 17:36, Peter Rolf wrote:

Hi Mojca,

wrong colors (or what is the problem here)?


On my machine

\startMPcode
externalfigure("filename.png");
\stopMPcode

doesn't work in MKIV at all. On Hans' machine it generates weird
colors (though not that much wrong). I can send you an example, but I
guess that it behaves the same way with any png image.

But I would not worry too much. My installation is always broken when
it works for everyone else :) :) :)


ah, so now er're talking of mp code

i bet it works, but that you don't see the small image ...

\startMPcode
externalfigure("filename.png") scaled 10cm ;
\stopMPcode

(actually in mkiv i could default to the natural size)

Hans



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] MKIV and externaligure inside metafun

2009-08-28 Thread Mojca Miklavec
On Fri, Aug 28, 2009 at 17:36, Peter Rolf wrote:
>
> Hi Mojca,
>
> wrong colors (or what is the problem here)?

On my machine

\startMPcode
externalfigure("filename.png");
\stopMPcode

doesn't work in MKIV at all. On Hans' machine it generates weird
colors (though not that much wrong). I can send you an example, but I
guess that it behaves the same way with any png image.

But I would not worry too much. My installation is always broken when
it works for everyone else :) :) :)

Mojca
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] MKIV and externaligure inside metafun

2009-08-28 Thread Peter Rolf

Mojca Miklavec schrieb:

On Fri, Aug 28, 2009 at 16:22, Hans Hagen wrote:
  

pdftex and luatex process your file ok



OK, so it's again "my computer only" problem :) :) :)

Well, never mind then. If it works for you then it probably works on
at least a few more machines, or will start working with the next
major release at least. Thanks a lot for looking into it.

(I used the "thought-it-was-working" installation this time, not with
the old and broken one.)

  

color viewing is somewhat different, maybe because of some resource
initialization



I remember similar problem a while ago due to some transparency being
used on the same page (but at that time you said it was a bug in adobe
reader).

  

Hi Mojca,

wrong colors (or what is the problem here)?

Peter


Thank you,
Mojca
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

  


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] MKIV and externaligure inside metafun

2009-08-28 Thread Hans Hagen

Mojca Miklavec wrote:


I remember similar problem a while ago due to some transparency being
used on the same page (but at that time you said it was a bug in adobe
reader).


i suspect that they use a different color renderer when extgstates are set


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


<    3   4   5   6   7   8   9   10   11   >