Re: [NTG-context] metafun \sometxt: should black be black or textcolor?

2006-08-06 Thread Taco Hoekwater
Hi Mojca,

Mojca Miklavec wrote:
 
 But the other \sometxt was indeed red - withcolor seems to work, but
 only conditionally. And I have some weird examples of two texts one
 after another. In some cases (if something else is drawn inbetween and
 a color changed twice), then the second text will be black. But it's
 quite unpredictable (that one might even be bug in my code, so I don't
 want to complain before I have an example).

Ok, I looked into this again, and I was definately wrong.

The actual problem appears to be that metapost does not write a
color switch for 'black' when it appears at the start of a file,
it simply assumes the start color is black. This could be
considered a bug in MetaPost or a missing feature in ConTeXt
(i have not decided yet :-)).

Quick fix: You can start your MP code with an explicit color
initialization.

   \startMPcode
  special 0 setgray;
  ..
   \stopMPcode


A hack, I know. MetaPost should be able to distinguish between
   draw p
and
   draw p withcolor (0,0,0)
but currently it can't (because the structure is initialized
as (0,0,0)). It is not quite a bug either, because there may
well be MP code out there that depends on this.
In fact, probably code by Knuth, Hobby, Jacko, and Hans ;-)

 
 A question for you or Hans: can please someone explain me in a few
 words what's the main strategy/philosophy behind \sometxt. I don't
 understand exactly how TeX processes it (and metapost
 shrinks/expands/shifts/colors) it inline.

TeX typesets the argument of the \sometxt macro in a hbox and
writes its box dimensions to jobname-mpgraph.mpb.

To the metapost file, a zero-padded serial number is written
instead, and MP uses the dimensions it finds in jobname-mpgraph.mpb
for the positioning of that label.

ConTeXt then replaces the metapost label number with the TeX material
while interpreting the Metapost result.

This is the short version, the actual situation is a little bit more
complex (not a whole lot though). The actual code is in meta-tex.tex
and mp-txts.mp

Cheers, taco



___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] metafun \sometxt: should black be black or textcolor?

2006-08-06 Thread Mojca Miklavec
On 8/6/06, Taco Hoekwater wrote:
 Hi Mojca,

 Mojca Miklavec wrote:
 
  But the other \sometxt was indeed red - withcolor seems to work, but
  only conditionally. And I have some weird examples of two texts one
  after another. In some cases (if something else is drawn inbetween and
  a color changed twice), then the second text will be black. But it's
  quite unpredictable (that one might even be bug in my code, so I don't
  want to complain before I have an example).

 Ok, I looked into this again, and I was definately wrong.

 The actual problem appears to be that metapost does not write a
 color switch for 'black' when it appears at the start of a file,

What a pitty that metapost wasn't one of Knuth's programs ;)

 it simply assumes the start color is black. This could be
 considered a bug in MetaPost or a missing feature in ConTeXt
 (i have not decided yet :-)).

 Quick fix: You can start your MP code with an explicit color
 initialization.

\startMPcode
   special 0 setgray;
   ..
\stopMPcode


 A hack, I know. MetaPost should be able to distinguish between
draw p
 and
draw p withcolor (0,0,0)
 but currently it can't (because the structure is initialized
 as (0,0,0)). It is not quite a bug either, because there may
 well be MP code out there that depends on this.
 In fact, probably code by Knuth, Hobby, Jacko, and Hans ;-)

Well, now to be honest: color zero (not 0 setgray, but the first
color in Gnuplot) is not supposed to be black, but should be
foreground color according to the guidelines (not that other divices
are configurable in that respect, but anyway). So it might indeed make
more sense to inherit the textcolor. What do you think?

I spotted the problem when I was using a dark background with white
text on it. I'm not sure if I indeed want black or not. I want to make
the colors configurable anyway (which they're currently not, but I
have to figure out how to do that first), probably with something like
\defineconversion[color set x][white,red,yellow,green]
\setupGNUPLOT[colorset=color set x]
% or perhaps even something like foregroundcolor|maincolor=white

So I actually liked the fact that the numbers on the plot were white
without having to configure anything (red and green were clearly seen
on the background), but the plot as a whole was useless since the
borders were still black  invisible and on some plots some text was
black as well (in a pseudo random way).

So rather than using that hack I would prefer to ask: which color
should I define in the module to make the border of the same color as
textcolor? Or (a question for later, it's not on the top priority
right now): how can I extract the color from
\setupGNUPLOT[foregroundcolor=yellow] and store it to a variable
color gp_foregroundcolor; defined in a module?

Any other thoughts about it?

  A question for you or Hans: can please someone explain me in a few
  words what's the main strategy/philosophy behind \sometxt. I don't
  understand exactly how TeX processes it (and metapost
  shrinks/expands/shifts/colors) it inline.

 TeX typesets the argument of the \sometxt macro in a hbox and
 writes its box dimensions to jobname-mpgraph.mpb.

 To the metapost file, a zero-padded serial number is written
 instead, and MP uses the dimensions it finds in jobname-mpgraph.mpb
 for the positioning of that label.

 ConTeXt then replaces the metapost label number with the TeX material
 while interpreting the Metapost result.

 This is the short version, the actual situation is a little bit more
 complex (not a whole lot though). The actual code is in meta-tex.tex
 and mp-txts.mp

Thanks for the wonderful explanation!

Thank you again,
Mojca
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] metafun \sometxt: should black be black or textcolor?

2006-08-06 Thread Hans Hagen
Taco Hoekwater wrote:
 Quick fix: You can start your MP code with an explicit color
 initialization.

\startMPcode
   special 0 setgray;
   ..
\stopMPcode


 A hack, I know. MetaPost should be able to distinguish between
draw p
 and
draw p withcolor (0,0,0)
 but currently it can't (because the structure is initialized
 as (0,0,0)). It is not quite a bug either, because there may
 well be MP code out there that depends on this.
 In fact, probably code by Knuth, Hobby, Jacko, and Hans ;-)
   
-)

i think that (given that in principle mp produces stand alone ps code) 
it should start out with black; when embedding as eps or when used as 
xform in pdf thsi probably is automatically taken care of

it makes sense to let mp do that for you; there are a few places where 
context forces the defaultcolor; we can make it an opion in the mp topdf 
converter as well

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
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] metafun \sometxt: should black be black or textcolor?

2006-08-06 Thread Hans Hagen
Taco Hoekwater wrote:
 Hi Mojca,

 Mojca Miklavec wrote:
   
 But the other \sometxt was indeed red - withcolor seems to work, but
 only conditionally. And I have some weird examples of two texts one
 after another. In some cases (if something else is drawn inbetween and
 a color changed twice), then the second text will be black. But it's
 quite unpredictable (that one might even be bug in my code, so I don't
 want to complain before I have an example).
 

 Ok, I looked into this again, and I was definately wrong.

 The actual problem appears to be that metapost does not write a
 color switch for 'black' when it appears at the start of a file,
 it simply assumes the start color is black. This could be
 considered a bug in MetaPost or a missing feature in ConTeXt
 (i have not decided yet :-)).

 Quick fix: You can start your MP code with an explicit color
 initialization.

\startMPcode
   special 0 setgray;
   ..
\stopMPcode


 A hack, I know. MetaPost should be able to distinguish between
draw p
 and
draw p withcolor (0,0,0)
 but currently it can't (because the structure is initialized
 as (0,0,0)). It is not quite a bug either, because there may
 well be MP code out there that depends on this.
 In fact, probably code by Knuth, Hobby, Jacko, and Hans ;-)

   
in meta-pdf.tex:

\chardef\blackoutMPgraphic\plusone

\def\finishMPgraphic
  {\stopMPresources
   \egroup
   \setbox\scratchbox\vbox
 {\forgetall
  \hbox
{\PDFcode{q \MPxscale\space 0 0 \MPyscale\space \MPxoffset\space 
\MPyoffset\space cm}%
 \ifcase\blackoutMPgraphic\or\PDFcode{0 g 0 G}\fi
 \lower\MPyshift\box\scratchbox % unscaled shift
 \PDFcode{Q}}}%
   \ht\scratchbox\MPheight
   \wd\scratchbox\MPwidth
   \dp\scratchbox\zeropoint\relax
   \dopackageMPgraphic\scratchbox
   \egroup
   \endinput}


\starttext

\color[red]{\startMPcode
draw fullcircle scaled 5cm ;
draw btex test etex ;
\stopMPcode red}

\startreusableMPgraphic{test}
draw fullcircle scaled 5cm ;
draw btex test etex ;
\stopreusableMPgraphic

\color[red]{red \reuseMPgraphic{test} red}

\stoptext


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

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] metafun \sometxt: should black be black or textcolor?

2006-08-05 Thread Mojca Miklavec
Hello,

Does anyone have any idea about what's going on here? I get blue text,
but a black square, although both are supposed to come out black (I
wouldn't mind so much, but the problem is that some text is blue and
some is black - I have some other testcases where this happens, but I
have to create a minimal example first).

\setupcolors
[state=start,textcolor=blue]

\starttext
\startMPcode
draw \sometxt{abc} withcolor black; % come out blue
draw \sometxt{def} shifted (3cm,0) withcolor red;
draw unitsquare xyscaled (3cm,2cm) withcolor black;
\stopMPcode
\stoptext

Thanks,
Mojca
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] couple of metafun questions

2006-08-03 Thread Thomas A. Schmitz

On Aug 2, 2006, at 11:56 PM, Mojca Miklavec wrote:

 So you have to draw the path twice with different color and pattern
 (you can write a macro for it of course if you need it often).

 beginfig(1);
   pickup pencircle scaled 2pt;
   picture dp[];
   dp[1] := dashpattern(on 2 off 6) scaled 3pt;
   dp[2] := dashpattern(off 4 on 2 off 2) scaled 3pt;

   path p; p := (origin .. (2,1) .. (3,-1) .. (5,0)) scaled 3cm;

   draw p dashed dp[1] withcolor blue;
   draw p dashed dp[2] withcolor red;
 endfig;
 end.

 Mojca


Mojca,

thanks so much, this works and does exactly what I want! For the rest  
of my questions: I've decided to go for an embedded staticMPfigure  
instead of MPpositiongraphic, so I can manage. But I'd still be  
curious if these things are possible or not. Anyways, thanks a lot!

Thomas
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] couple of metafun questions

2006-08-02 Thread Thomas A. Schmitz
Hi all,

I'm experimenting with some metafun code and positional graphics to  
produce a nice illustration for an article. There's some basic  
questions I haven't been able to solve (and I remember that I  
couldn't solve them before but found workarounds, but this time it  
looks like I'm stuck):

1. Is it possible to have a MPpositiongraphics anchored to more than  
two positions? Like
draw position1 -- position2 .. position3 ?



2. Related to 1.: Is it right that you can't anchor more than 1  
MPpositiongraphic to one anchor? If I have:

drawsomething position1 -- position2

I can't then say

drawsomething position1 .. position3

but must work around by reversing

drawsomething position3 .. position1



3. Is it possible to get a line/arrow dashed in two different colors,  
like red and blue?

Sorry if these are silly questions, but I just dabble into metafun!

Thanks, and best

Thomas
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] couple of metafun questions

2006-08-02 Thread Mojca Miklavec
On 8/2/06, Thomas A. Schmitz wrote:

 3. Is it possible to get a line/arrow dashed in two different colors,
 like red and blue?

Just out of curiosity I tried the following:

picture dp;
draw dashpattern(on 2 off 6) scaled 5pt withcolor blue;
draw dashpattern(off 4 on 2 off 2) scaled 5pt withcolor red;
dp := currentpicture;

draw origin--(5cm,0) dashed dp;

But of course ! Picture is too complicated to use as a dash pattern.
So you have to draw the path twice with different color and pattern
(you can write a macro for it of course if you need it often).

beginfig(1);
pickup pencircle scaled 2pt;
picture dp[];
dp[1] := dashpattern(on 2 off 6) scaled 3pt;
dp[2] := dashpattern(off 4 on 2 off 2) scaled 3pt;

path p; p := (origin .. (2,1) .. (3,-1) .. (5,0)) scaled 3cm;

draw p dashed dp[1] withcolor blue;
draw p dashed dp[2] withcolor red;
endfig;
end.

Mojca
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Metapost/Metafun/Tex/Context question

2006-07-19 Thread WN
Hi all,

I am trying to do the following in Metapost but my new math symbol  is 
not recognized.
Context knows about it but Tex does not.

How can I make this work ?

Kind regards
Wim Neimeijer

% = Test code 
\loadmapfile[original-youngryu-tx.map]
\definebodyfont [28pt,24pt,18pt,
  17.3pt,14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt,4pt] [mm] [
  mc=txexa sa 1]

\setupbodyfont [11pt]
\definemathsymbol [varointctrclockwise] [op] [mc] [2B] [mc] [2C]

\starttext
\startformula
\varointctrclockwise_{\gamma} f(z) \: dz = 0
\stopformula
\startMPcode
picture p ;
path q;
numeric u;

u := 1cm;

p := btex $\varointctrclockwise_{\gamma} f(z) \: dz = 0$ etex;
p := p scaled 0.15cm;
draw p;
\stopMPcode
\stoptext

=== Log file ==
 texmfstart texexec --autopdf --pdf testvaroint.tex
TeXExec | processing document 'testvaroint.tex'
TeXExec | no ctx file found
TeXExec | tex processing method: context
TeXExec | TeX run 1
TeXExec | writing option file testvaroint.top
TeXExec | using randomseed 1260
TeXExec | tex engine: pdfetex
TeXExec | tex format: cont-en
TeXExec | progname: context
This is pdfeTeX, Version 3.141592-1.30.3-2.2 (Web2c 7.5.5)
 \write18 enabled.
 (f:\context\usr\local\context\tex\texmf-local/web2c/natural.tcx)
entering extended mode
(./testvaroint.tex

ConTeXt  ver: 2006.07.14 12:08  fmt: 2006.7.14  int: english  mes: english

language: language en is active
protectionstate 0
system  : cont-new loaded
(f:\context\usr\local\context\tex\texmf-local/tex/context/base/cont-new.tex
systems : beware: some patches loaded from cont-new.tex
color   : palette rollover is available
)
system  : cont-old loaded
(f:\context\usr\local\context\tex\texmf-local/tex/context/base/cont-old.tex
loading : Context Old Macros
)
system  : cont-fil loaded
(f:\context\usr\local\context\tex\texmf-local/tex/context/base/cont-fil.tex
loading : Context File Synonyms
)
system  : cont-sys loaded
(f:\context\usr\local\context\tex\texmf-local/tex/context/user/cont-sys.tex)
bodyfont: 12pt rm is loaded
language: patterns nl-texnansi:texnansi-1-2:3 
nl-ec:ec-2-2:3 fr-
texnansi:texnansi-3-2:3 fr-ec:ec-4-2:3 
de-texnansi:texnansi-5-2:3 de-e
c:ec-6-2:3 it-texnansi:texnansi-7-2:3 it-ec:ec-8-2:3 
pt-texnansi:texna
nsi-9-2:3 pt-ec:ec-10-2:3 hr-ec:ec-11-2:3 pl-pl0:pl0-12-2:3 
pl-ec:e
c-13-2:3 pl-qx:qx-14-2:3 cz-il2:il2-15-2:3 cz-ec:ec-16-2:3 
sk-il2:i
l2-17-2:3 sk-ec:ec-18-2:3 sl-ec:ec-19-2:3 en-ec:ec-21-2:3 
uk-ec:ec-
 22-2:3 us-ec:ec-23-2:3 agr-agr:agr-24-2:3 da-ec:ec-25-2:3 
sv-ec:ec-
 26-2:3 af-ec:ec-27-2:3 no-ec:ec-28-2:3 deo-ec:ec-29-2:3 
es-ec:ec-3
0-2:3 ca-ec:ec-31-2:3 la-ec:ec-32-2:3 ro-ec:ec-33-2:3 
tr-ec:ec-34-
2:3 fi-ec:ec-36-2:3 hu-ec:ec-37-2:3 loaded
specials: tex,postscript,rokicki loaded
system  : testvaroint.top loaded
(./testvaroint.top
specials: loading definition file tpd
(f:\context\usr\local\context\tex\texmf-local/tex/context/base/spec-tpd.tex
specials: loading definition file fdf
(f:\context\usr\local\context\tex\texmf-local/tex/context/base/spec-fdf.tex)
specials: fdf loaded
)
specials: fdf,tpd loaded
)
systems : system commands are enabled
(f:\context\usr\local\context\tex\texmf-local/tex/context/base/pdfr-ec.tex)
(./testvaroint.tuo) (./testvaroint.tuo) (./testvaroint.tuo) 
(./testvaroint.tuo)
(./testvaroint.tuo) (./testvaroint.tuo) (./testvaroint.tuo) 
(./testvaroint.tuo)
(./testvaroint.tuo) (./testvaroint.tuo)
(f:\context\usr\local\context\tex\texmf-local/tex/context/base/sort-def.tex)
(f:\context\usr\local\context\tex\texmf-local/tex/context/base/sort-lan.tex)
(./testvaroint.tuo) (./testvaroint.tuo)TeXExec | processing graphic 
'testvaroint-mpgraph'
TeXExec | using internal mptotex converter
TeXExec | processing document 'testvaroint-mpgraph-temp.tex'
TeXExec | no ctx file found
TeXExec | tex processing method: context
TeXExec | writing option file testvaroint-mpgraph-temp.top
TeXExec | using randomseed 447
TeXExec | tex engine: pdfetex
TeXExec | tex format: cont-en
TeXExec | progname: context
This is pdfeTeX, Version 3.141592-1.30.3-2.2 (Web2c 7.5.5)
 \write18 enabled.
 (f:\context\usr\local\context\tex\texmf-local/web2c/natural.tcx)
entering extended mode
(./testvaroint-mpgraph-temp.tex

ConTeXt  ver: 2006.07.14 12:08  fmt: 2006.7.14  int: english  mes: english

language: language en is active
protectionstate 0
system  : cont-new loaded
(f:\context\usr\local\context\tex\texmf-local/tex/context/base/cont-new.tex
systems : beware: some patches loaded from cont-new.tex
color   : palette rollover is available
)
system  : cont-old loaded
(f:\context\usr\local\context\tex\texmf-local/tex/context/base/cont-old.tex
loading : Context Old Macros
)
system  : cont-fil loaded

Re: [NTG-context] Metapost/Metafun/Tex/Context question

2006-07-19 Thread Hans Hagen
WN wrote:
 Hi all,

 I am trying to do the following in Metapost but my new math symbol  is 
 not recognized.
 Context knows about it but Tex does not.

 How can I make this work ?

 Kind regards
 Wim Neimeijer

 % = Test code 
 \loadmapfile[original-youngryu-tx.map]
 \definebodyfont [28pt,24pt,18pt,
   17.3pt,14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt,4pt] [mm] [
   mc=txexa sa 1]

 \setupbodyfont [11pt]
 \definemathsymbol [varointctrclockwise] [op] [mc] [2B] [mc] [2C]

 \starttext
 \startformula
 \varointctrclockwise_{\gamma} f(z) \: dz = 0
 \stopformula
 \startMPcode
 picture p ;
 path q;
 numeric u;

 u := 1cm;

 p := btex $\varointctrclockwise_{\gamma} f(z) \: dz = 0$ etex;
 p := p scaled 0.15cm;
 draw p;
 \stopMPcode
 \stoptext
   
make sure that mp knows about the definitions: 

- first extend the math collection (use decimen, since there is a linesplit bug 
with  here) 
- then load the times font 
- somehow display and inline math render differently; something for taco 

\startMPenvironment[global]

\startmathcollection [default]
\definemathsymbol [varointctrclockwise] [op] [mc] [43] [mc] [44]
\stopmathcollection
\usetypescript[times][ec]
\setupbodyfont[times,11pt]

\stopMPenvironment

\starttext

why the funny .15cm scale ... 

\startformula
\varointctrclockwise_{\gamma} f(z) \: dz = 0
\stopformula

$\varointctrclockwise_{\gamma} f(z) \: dz = 0$

\startMPcode
draw btex $\varointctrclockwise_{\gamma} f(z) \: dz = 0$ etex scaled 0.15cm 
;
\stopMPcode

\startMPcode
draw btex $\displaystyle \varointctrclockwise_{\gamma} f(z) \: dz = 0$ etex 
scaled 0.15cm ;
\stopMPcode

\stoptext


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

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Metapost/Metafun/Tex/Context question

2006-07-19 Thread Aditya Mahajan
On Wed, 19 Jul 2006, WN wrote:

 Hi all,

 I am trying to do the following in Metapost but my new math symbol  is
 not recognized.
 Context knows about it but Tex does not.

 How can I make this work ?

Hans and Taco have already explained the correct way to do this, so I 
will not go into that. This is one place where you can use the new 
sometxt feature.

 % = Test code 
 \loadmapfile[original-youngryu-tx.map]
 \definebodyfont [28pt,24pt,18pt,
  17.3pt,14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt,4pt] [mm] [
  mc=txexa sa 1]

 \setupbodyfont [11pt]
 \definemathsymbol [varointctrclockwise] [op] [mc] [2B] [mc] [2C]

 \starttext
 \startformula
 \varointctrclockwise_{\gamma} f(z) \: dz = 0
 \stopformula
 \startMPcode
picture p ;
path q;
numeric u;

u := 1cm;

p := btex $\varointctrclockwise_{\gamma} f(z) \: dz = 0$ etex;

Replace this by

  p := \sometxt{$\varointctrclockwise_{\gamma} f(z) \: dz = 0$} ;

and everything works!



p := p scaled 0.15cm;
draw p;
 \stopMPcode
 \stoptext

Aditya
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Metapost/Metafun/Tex/Context question

2006-07-19 Thread WN




[EMAIL PROTECTED] wrote:

  
Hans Hagen wrote:
  
  
make sure that mp knows about the definitions: 

- first extend the math collection (use decimen, since there is a linesplit bug with " here) 
- then load the times font 

  
  
Math family mc has to be txexa or something similar before the code
actually shows the integral instead  of a plus sign, but Wim can
figure that out himself, no doubt  :-)

  
  
- somehow display and inline math render differently; something for taco 

  
  
That is normal. One is with an operator with \limits, one without.

Taco
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context
  

For those interested, this is what I did. Taco is right in saying you
have to load the txexa font first. 
The code works for me, but I am not sure it is the proper Context way
of doing things. 

Kind regards
Wim Neimeijer

% === some extra math symbols I need
=
\startenvironment layout04

\unprotect
%
% extra math symbols
%
\usetypescript[modern]
\usetypescript[times]

\definetypeface[MyFace][rm][serif][times][default][encoding=ec]
\definetypeface[MyFace][mm][math][modern][default][encoding=ec]
\setupbodyfont[MyFace,10pt]

\loadmapfile[original-youngryu-tx.map]
\definebodyfont [28pt,24pt,18pt,
 17.3pt,14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt,4pt] [mm] [
 mc=txexa sa 1]

\setupbodyfont [11pt]

%%%
% txfonts
%%%

\definemathsymbol [oiint] [op] [mc] ["08] [mc] ["09]
\definemathsymbol [oiiint] [op] [mc] ["29] [mc] ["2a]
\definemathsymbol [ointctrclockwise] [op] [mc] ["0A] [mc] ["0B]
\definemathsymbol [ointclockwise] [op] [mc] ["0C] [mc] ["0D]
\definemathsymbol [varointctrclockwise] [op] [mc] ["2B] [mc] ["2C]
\definemathsymbol [varointclockwise] [op] [mc] ["2D] [mc] ["2E]

\definemathsymbol [iint] [op] [mc] ["21] [mc] ["22]
\definemathsymbol [iiint] [op] [mc] ["23] [mc] ["24]
\definemathsymbol [nt] [op] [mc] ["25] [mc] ["26]
\definemathsymbol [idotsint] [op] [mc] ["27] [mc] ["28]

\definemathsymbol [oiintctrclockwise] [op] [mc] ["40] [mc] ["41]
\definemathsymbol [oiintclockwise] [op] [mc] ["48] [mc] ["49]
\definemathsymbol [varoiintctrclockwise][op] [mc] ["4A] [mc] ["4B]
\definemathsymbol [varoiintclockwise] [op] [mc] ["42] [mc] ["43]

\definemathsymbol [oiiintctrclockwise] [op] [mc] ["44] [mc] ["45]
\definemathsymbol [oiiintclockwise] [op] [mc] ["4C] [mc] ["4D]
\definemathsymbol [varoiiintctrclockwise][op] [mc] ["4E] [mc] ["4F]
\definemathsymbol [varoiiintclockwise] [op] [mc] ["46] [mc] ["47]

\protect

\stopenvironment



___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Metapost/Metafun/Tex/Context question

2006-07-19 Thread WN
[EMAIL PROTECTED] wrote:
 On Wed, 19 Jul 2006, WN wrote:

   
 Hi all,

 I am trying to do the following in Metapost but my new math symbol  is
 not recognized.
 Context knows about it but Tex does not.

 How can I make this work ?
 

 Hans and Taco have already explained the correct way to do this, so I 
 will not go into that. This is one place where you can use the new 
 sometxt feature.

   
 % = Test code 
 \loadmapfile[original-youngryu-tx.map]
 \definebodyfont [28pt,24pt,18pt,
  17.3pt,14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt,4pt] [mm] [
  mc=txexa sa 1]

 \setupbodyfont [11pt]
 \definemathsymbol [varointctrclockwise] [op] [mc] [2B] [mc] [2C]

 \starttext
 \startformula
 \varointctrclockwise_{\gamma} f(z) \: dz = 0
 \stopformula
 \startMPcode
picture p ;
path q;
numeric u;

u := 1cm;

p := btex $\varointctrclockwise_{\gamma} f(z) \: dz = 0$ etex;
 

 Replace this by

   p := \sometxt{$\varointctrclockwise_{\gamma} f(z) \: dz = 0$} ;

 and everything works!

   
I was wondering about the \sometxt feature, I did not know exactly how 
to use it, but will certainly do
some experiments. Thanks Wim.



   
p := p scaled 0.15cm;
draw p;
 \stopMPcode
 \stoptext

 
 Aditya
 ___
 ntg-context mailing list
 ntg-context@ntg.nl
 http://www.ntg.nl/mailman/listinfo/ntg-context
   

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] metafun color broken?

2006-06-15 Thread Hans van der Meer
I used to draw in transparent color in MetaFun with:   newinternal tfill_mode; tfill_mode := 1;	% transparency mode for inside   newinternal tfill_fact;	tfill_fact := 1;	% transparency factor for inside   def withFillColor = withcolor transparent(tfill_mode, tfill_fact, fillcolor_) enddef;   fill somepath withFillColor;Suddenly (since the june update I guess) this fails.Because   fill somepath withcolor fillcolor_;is still working I wonder if something has done to this transparency business.If there was a change, why? It brings me trouble. Hans van der Meer ___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] metafun color broken?

2006-06-15 Thread Hans van der Meer
After posting this problem I did probe a lot further in this and a  
similar problem.
As I reported shortly, the problem goes away when solely replacing in  
supp-mps.tex the line
\ifx\TEXEXECcommand \undefined \def\TEXEXECcommand{texmfstart  
texexec} \fi
by
\ifx\TEXEXECcommand \undefined \def\TEXEXECcommand{texexec} \fi
This gives me the impression it might not be in context itself,  
especially since to my (inexperienced) eye there are no or few  
changes between the working and nonworking versions that might  
explain the problem.
It might be the change from the perl to the ruby scripts with a  
problem in one of the latter.

I expect Hans or Taco to react soon with there usual speed and will  
await for their comments first.

Hans van der Meer


On Jun 15, 2006, at 17:52, Mojca Miklavec wrote:

 Replying off-list since I have no place to test anything and no  
 time righ now:

 I know that Hans has played with transparency at the beginning of May
 in order to enable it in XeTeX (but that should happen/break already
 earlier then), but I can't help you any further. Normar with color
 transparent worked a couple of days ago as far as I can remember, but
 I might have had an older version installed (from May).


 However: I would like to ask you to commit such examples (you have
 much more bug reports everywhere) to contexttest suite, see

I usually do this when in doubt if my code is right.
But in this case formerly perfectly working code is suddenly broken.
And of course I need to run my production and development runs on my  
own machine, so I have to solve it for that one.

 http://wiki.contextgarden.net/Test.

 Mojca


 On 6/13/06, Hans van der Meer  wrote:

 I used to draw in transparent color in MetaFun with:

newinternal tfill_mode; tfill_mode := 1; % transparency mode  
 for inside
newinternal tfill_fact; tfill_fact := 1; % transparency factor  
 for inside
def withFillColor = withcolor transparent(tfill_mode, tfill_fact,
 fillcolor_) enddef;
fill somepath withFillColor;

 Suddenly (since the june update I guess) this fails.
 Because

fill somepath withcolor fillcolor_;

 is still working I wonder if something has done to this transparency
 business.
 If there was a change, why? It brings me trouble.


 Hans van der Meer



___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] metafun color broken?

2006-06-15 Thread Taco Hoekwater

Hi Hans,

Hans van der Meer wrote:
 
 I expect Hans or Taco to react soon with there usual speed and will  
 await for their comments first.

Perhaps you missed the post below. The current problem is just
a different symptom of the same problem.

Greetings, Taco

Taco Hoekwater wrote:
  Hans van der Meer wrote:
 
  2. The mpgraph.1 files differ only slightly, except for a few roundoff
  differences:
  new format extra lines: (but not a problem, I would guess)
  %%MetaPostSpecials: 2.0 123 1000
  %%HiResBoundingBox: -5.66927 -5.66927 359.9991 119.05481
  %%MetaPostSpecial: 7 1 1 1 1 0.94118 1 3
 
 
  Believe it or not, but this is a known problem within web2c.
  It is triggered by an interaction between the new texexec
  and having two different entries in texmf.cnf for Metaposts
  memory size, for example like this:
 
main_memory.mpost= 50
main_memory.metafun  = 300
 
  Now, the metafun format is generated as mpost, but the
  graphics are created as metafun, and the different memory
  sizes make the specials go disappear.
 
  Strangely, I thought Hans and I had fixed by that a few weeks
  back by changing the mpost commandlines, but apparently we didn't.
 
  A workaround (while we sort this out) is to make sure that the
  .mpost and .metafun settings use the same (highest) number.
 
  Taco
 
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] metafun color broken?

2006-06-15 Thread Hans Hagen
Taco Hoekwater wrote:
 Hi Hans,

 Hans van der Meer wrote:
   
 I expect Hans or Taco to react soon with there usual speed and will  
 await for their comments first.
 

 Perhaps you missed the post below. The current problem is just
 a different symptom of the same problem.
   

part of the problem is that when no progname is given, the format should 
determine the progname (at least that was the case soem tiem ago) but 
then, mpost is behaving weird with respect to mem vars anyway; the 
current (context) approach is 'use metafun everywhere a prognam eis 
needed' [a problem, at least in the past, is that there were tetex 
versions with no metafun entries in texmf.cnf so we went back to mpost 
as progname for a while]

 Greetings, Taco

 Taco Hoekwater wrote:
   Hans van der Meer wrote:
  
   2. The mpgraph.1 files differ only slightly, except for a few roundoff
   differences:
   new format extra lines: (but not a problem, I would guess)
   %%MetaPostSpecials: 2.0 123 1000
   %%HiResBoundingBox: -5.66927 -5.66927 359.9991 119.05481
   %%MetaPostSpecial: 7 1 1 1 1 0.94118 1 3
  
  
   Believe it or not, but this is a known problem within web2c.
   It is triggered by an interaction between the new texexec
   and having two different entries in texmf.cnf for Metaposts
   memory size, for example like this:
  
 main_memory.mpost= 50
 main_memory.metafun  = 300
  
   Now, the metafun format is generated as mpost, but the
   graphics are created as metafun, and the different memory
   sizes make the specials go disappear.
  
   Strangely, I thought Hans and I had fixed by that a few weeks
   back by changing the mpost commandlines, but apparently we didn't.
  
   A workaround (while we sort this out) is to make sure that the
   .mpost and .metafun settings use the same (highest) number.
  
   Taco
  
 ___
 ntg-context mailing list
 ntg-context@ntg.nl
 http://www.ntg.nl/mailman/listinfo/ntg-context
   


-- 

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

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] metafun color broken?

2006-06-15 Thread Hans Hagen
Hans van der Meer wrote:
 I expect Hans or Taco to react soon with there usual speed and will  
 await for their comments first.
   
as taco mentioned, it's in the mem values; mpost does not store them with the 
format (in the past this even could give segfaults and worse); tex does not 
have this 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
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \MetaFun

2006-06-09 Thread Hans Hagen
andrea valle wrote:
 As I made a presentation concerning typesetting I used the magic 
 symbols \TeX, \LaTex, \ConTeXt, \MetaFont, \MetaPost.
 I also used \MetaFun: no error (so it's a recognized command,  I 
 guess), but not special output, \MetaFun = MetaFun.  I was hoping to 
 have the nice MetaFun shaked logo...
   What am I missing?

   
\setupcolors[state=start] \MetaFun \end

should work ok; maybe some problem with your metafun run? 

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
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \MetaFun

2006-06-09 Thread andrea valle
Thanks Hans

This is what I obtain.

http://www.semiotiche.it/andrea/membrana/metafun.zip

?

Best

-a-

PS: Console and log follow.

Here console:

  TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005

fixing engine variable : pdfetex
 executable : pdfetex
 format : cont-en
  inputfile : metafun
 output : pdftex
  interface : en
   current mode : none
TeX run : 1

This is pdfeTeX, Version 3.141592-1.30.4-2.2 (Web2C 7.5.5)
  (/usr/local/teTeX/share/texmf.local/web2c/natural.tcx)
entering extended mode
(./metafun.tex

ConTeXt  ver: 2006.02.03 21:03  fmt: 2006.3.13  int: english  mes:  
english

language: language en is active
protectionstate 0
system  : cont-new loaded
(/usr/local/teTeX/share/texmf.local/tex/context/base/cont-new.tex
systems : beware: some patches loaded from cont-new.tex
color   : palette rollover is available
)
system  : cont-old loaded
(/usr/local/teTeX/share/texmf.local/tex/context/base/cont-old.tex
loading : Context Old Macros
)
system  : cont-fil loaded
(/usr/local/teTeX/share/texmf.local/tex/context/base/cont-fil.tex
loading : Context File Synonyms
)
system  : cont-sys.rme loaded
(/usr/local/teTeX/share/texmf.local/tex/context/user/cont-sys.rme
(/usr/local/teTeX/share/texmf.local/tex/context/base/type-exa.tex)
(/usr/local/teTeX/share/texmf.local/tex/context/base/type-syn.tex)
(/usr/local/teTeX/share/texmf.local/tex/context/base/type-enc.tex)
(/usr/local/teTeX/share/texmf.local/tex/context/base/type-siz.tex)
(/usr/local/teTeX/share/texmf.local/tex/context/base/type-map.tex)
(/usr/local/teTeX/share/texmf.local/tex/context/base/type-spe.tex)
(/usr/local/teTeX/share/texmf.local/tex/context/base/type-akb.tex))
bodyfont: 12pt rm is loaded
language: patterns nl-texnansi:texnansi-1-2:3  
nl-ec:ec-2-2:3 fr-
texnansi:texnansi-3-2:3 fr-ec:ec-4-2:3  
de-texnansi:texnansi-5-2:3 de-e
c:ec-6-2:3 it-texnansi:texnansi-7-2:3 it-ec:ec-8-2:3  
pt-texnansi:texna
nsi-9-2:3 pt-ec:ec-10-2:3 hr-ec:ec-11-2:3 pl-pl0:pl0-12-2:3  
pl-ec:e
c-13-2:3 pl-qx:qx-14-2:3 cz-il2:il2-15-2:3 cz-ec:ec-16-2:3  
sk-il2:i
l2-17-2:3 sk-ec:ec-18-2:3 sl-il2:il2-19-2:3 sl-ec:ec-20-2:3  
en-ec:e
c-22-2:3 uk-ec:ec-23-2:3 us-ec:ec-24-2:3 da-ec:ec-25-2:3  
sv-ec:ec-
26-2:3 af-ec:ec-27-2:3 no-ec:ec-28-2:3 deo-ec:ec-29-2:3  
es-ec:ec-30
-2:3 ca-ec:ec-31-2:3 la-ec:ec-32-2:3 ro-ec:ec-33-2:3  
tr-ec:ec-34-2
:3 fi-ec:ec-36-2:3 hu-ec:ec-37-2:3 loaded
specials: tex,postscript,rokicki loaded
system  : metafun.top loaded
(./metafun.top
specials: loading definition file tpd
(/usr/local/teTeX/share/texmf.local/tex/context/base/spec-tpd.tex
specials: loading definition file fdf
(/usr/local/teTeX/share/texmf.local/tex/context/base/spec-fdf.tex)
specials: fdf loaded
)
specials: fdf,tpd loaded
)
color   : system rgb is global activated
fonts   : resetting map file list
fonts   : using map file: original-base
fonts   : using map file: ec-public-lm
fonts   : using map file: ec-base
fonts   : using map file: 8r-base
fonts   : using map file: t5-base
fonts   : using map file: original-ams-base
fonts   : using map file: original-ams-euler
fonts   : using map file: original-public-lm
(/usr/local/teTeX/share/texmf.local/tex/context/base/pdfr-ec.tex)  
[1.1{/usr/loc
al/teTeX/share/texmf.local/fonts/map/pdftex/context/original- 
empty.map}{/usr/lo
cal/teTeX/share/texmf.local/fonts/map/pdftex/context/original- 
base.map}{/usr/lo
cal/teTeX/share/texmf.local/fonts/map/pdftex/context/ec-public- 
lm.map}{/usr/loc
al/teTeX/share/texmf.local/fonts/map/pdftex/context/ec-base.map}{/usr/ 
local/teT
eX/share/texmf.local/fonts/map/pdftex/context/8r-base.map}{/usr/local/ 
teTeX/sha
re/texmf.local/fonts/map/pdftex/context/t5-base.map}{/usr/local/teTeX/ 
share/tex
mf.local/fonts/map/pdftex/context/original-ams-base.map}{/usr/local/ 
teTeX/share
/texmf.local/fonts/map/pdftex/context/original-ams-euler.map}{/usr/ 
local/teTeX/
share/texmf.local/fonts/map/pdftex/context/original-public-lm.map}]
systems : end file metafun at line 1
   
){/usr/local/teTeX/share/texmf.tetex/fonts/enc/dvips/lm/lm-ec.enc}/ 
usr/local/
teTeX/share/texmf.tetex/fonts/type1/public/lm/lmr12.pfb
Output written on metafun.pdf (1 page, 22275 bytes).
Transcript written on metafun.log.

return code : 0
   run time : 6 seconds
   sorting and checking : running texutil

  TeXUtil 9.0.0 - ConTeXt / PRAGMA ADE 1992-2004

 action : processing commands, lists and registers
 option : sorting IJ under Y
 option : converting high ASCII values
 input file : metafun.tui
output file : metafun.tuo
passed commands : 18
  remapped keys : 0
   register entries : 0 - 0 entries 0 references

Re: [NTG-context] \MetaFun

2006-06-09 Thread Taco Hoekwater


andrea valle wrote:
 Thanks Hans
 
 This is what I obtain.
 
 http://www.semiotiche.it/andrea/membrana/metafun.zip

I may be missing something, but this is the output I would
expect. cont-log.tex contains only this simple definition:

   \unexpanded\def\MetaFun
 {MetaFun}

Cheers,
Taco
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \MetaFun

2006-06-09 Thread andrea valle
Ah, ok, that's exactly what I need to know.

I was thinking that maybe there was some kind of special look for the 
\MetaFun word: I was supposing that calling \MetaFun I would have 
obtained the (nice) shaken metafun logo of the manuals.

Thanks

-a-


On 9 Jun 2006, at 16:55, Taco Hoekwater wrote:



 andrea valle wrote:
 Thanks Hans

 This is what I obtain.

 http://www.semiotiche.it/andrea/membrana/metafun.zip

 I may be missing something, but this is the output I would
 expect. cont-log.tex contains only this simple definition:

\unexpanded\def\MetaFun
  {MetaFun}

 Cheers,
 Taco
 ___
 ntg-context mailing list
 ntg-context@ntg.nl
 http://www.ntg.nl/mailman/listinfo/ntg-context


Andrea Valle
DAMS - Facoltà di Scienze della Formazione
Università degli Studi di Torino
http://www.semiotiche.it/andrea
[EMAIL PROTECTED]

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Metafun - Metapost capacity exceeded

2006-04-05 Thread Taco Hoekwater
Thomas Engel wrote:
 Hello Hans,
 
 
 this is the message I got after running texexec pro_mcc_a3.tex.
 As you can see I have increased the memory size for mp.
 I have attached the two tex-files.
 Maybe there is a mistake in the mp-code. A pdf-file will be produced,
 but if you check the output you will see, that one cubicle is missing!

No problems here. It uses 2351976 words of memory, though.

Cheers, Taco
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Metafun - Metapost capacity exceeded

2006-04-05 Thread Thomas Engel
Hello Hans,


this is the message I got after running texexec pro_mcc_a3.tex.
As you can see I have increased the memory size for mp.
I have attached the two tex-files.
Maybe there is a mistake in the mp-code. A pdf-file will be produced,
but if you check the output you will see, that one cubicle is missing!

Thanks for your help!

Thomas




 TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005

  metapost : pro_mcc_a3-mpgraph
format : metafun
This is MetaPost, Version 0.901 (Web2C 7.5.3)
(/home/thomas/texmf/web2c/natural.tcx)
(pro_mcc_a3-mpgraph.mp [1] [2] [3] [4] [5] [6] [7] [8] [9]
! MetaPost capacity exceeded, sorry [main memory size=200].
recently read ;

l.2277 ...aw he_zehn ((1.75),(5.6), (0.2),(17.5));

9 output files written: pro_mcc_a3-mpgraph.1 .. pro_mcc_a3-mpgraph.9
Transcript written on pro_mcc_a3-mpgraph.log.
 error in metapost run : pro_mcc_a3-mpgraph.mp:2277

total run time : 0 seconds
  sorting and checking : running texutil

 TeXUtil 9.0.0 - ConTeXt / PRAGMA ADE 1992-2004

action : processing commands, lists and registers
option : sorting IJ under Y
option : converting high ASCII values
input file : pro_mcc_a3.tui
   output file : pro_mcc_a3.tuo
   passed commands : 18
 remapped keys : 0
  register entries : 0 - 0 entries 0 references
   synonym entries : 0 - 0 entries
embedded files : 2

total run time : 7 seconds



\startproduct prd_mcc_a3
\project pro_mcc_a3
\setuppapersize[A3, landscape][A3, landscape]


\startMPenvironment
  \setupbodyfont[pos]
\stopMPenvironment

\startuseMPgraphic{fra}

   StartPage ;
   u:=10mm;
 draw Page enlarged -1cm;
 draw Page enlarged -0.80cm;
 draw (1u,2u)--(41u,2u)--cycle;
   StopPage ;

\stopuseMPgraphic



\startuniqueMPgraphic{bottomline}
  draw bottomboundary OverlayBox
  leftenlarged 6pt rightenlarged 6pt
  shifted (0,.75HeaderHeight) ;
  setbounds currentpicture to OverlayBox ; % forces dimensions
\stopuniqueMPgraphic

\startuseMPgraphic{ruler}
u:=5mm;
draw(0,0)--(78u,0)--(0,0);
defaultfont:=cmr5;
draw (0,0)--(0,-0.5u);
label(decimal 0,(0,-1u+4));
for n=1 upto 77:
   draw (1u*n,0)--(1u*n,-0.5u);
endfor
for n=1 upto 38.5 :
   defaultfont:=cmr5;
   label(decimal (2n*100),(1u*2n,-1u+4));
  % draw (2u*n,0)--(2u*n,-0.5u);
  % defaultfont:=cmr5;
   label(decimal (2n*100-100),(1u*2n-1u,-1.1u));
endfor
\stopuseMPgraphic

\startuseMPgraphic{vruler}
u:=5mm;
draw(0,0)--(0,24u)--(0,0);
defaultfont:=cmr5;
draw (0,0)--(-0.5u,0);
label(decimal 0,(-1u+4,0));
for n=1 upto 24:
   draw (0,1u*n)--(-0.5u,1u*n);
endfor
for n=1 upto 24 :
   defaultfont:=cmr5;
   label(decimal (n*100),(-1.2u,1u*n));
endfor
\stopuseMPgraphic







\setupMPvariables[mcc1000][e1=0,e2=0,e3=0,e4=0,e5=0,e6=0,e7=0,e8=0,e9=0]
\startuseMPgraphic{mcc1000}{e1,e2,e3,e4,e5,e6,e7,e8,e9}
  vardef he_eins (expr h, b, ho, vo) =
 save Panel, z;
 picture Panel;
 path s[] ;
 u:=5mm;
 s1 := (0,0)--(b*u,0)--(b*u,h*u)--(0,h*u)--cycle;
 s2 := (0.2u,0.1u)--(0.2u,(h-0.05)*u);
 s3 := ((b-0.2)*u,0.1u)--((b-0.2)*u,(h-0.05)*u);
 s4 := (4.8u,0.3u)--(4.8u,0.7u);
 draw s1 shifted (ho*u,vo*u);
 pickup pencircle scaled 1;
 draw s2 shifted (ho*u,vo*u);
 draw s3 shifted (ho*u,vo*u);
 pickup pencircle scaled 0.5;
%%Simocode
 draw unitsquare xscaled 1.4u yscaled 0.6u shifted ((ho+0.4)*u,(vo+h-0.8)*u) ;
draw unitsquare xscaled 0.2u yscaled 0.2u shifted ((ho+0.5)*u,(vo+h-0.7)*u);
draw unitsquare xscaled 0.2u yscaled 0.2u shifted ((ho+0.8)*u,(vo+h-0.7)*u);
draw unitsquare xscaled 0.2u yscaled 0.2u shifted ((ho+1.1)*u,(vo+h-0.7)*u);
%%Schalter
draw unitsquare xscaled 0.6u yscaled 0.6u shifted ((ho+4.5)*u,(vo+0.2)*u);
draw fullcircle scaled 0.45u shifted  ((ho+4.8)*u,(vo+0.5)*u);
draw fullcircle scaled 0.3u shifted  ((ho+4.8)*u,(vo+0.5)*u);
pickup pencircle scaled 1;
draw s4 shifted (ho*u,vo*u) ;
   pickup pencircle scaled 0.5;
   Panel:=currentpicture;
   Panel
enddef;

  vardef he_zehn (expr h, b, ho, vo) =
 save Panel, z;
 picture Panel;
 path s[] ;
 u:=5mm;
 s1 := (0,0)--(b*u,0)--(b*u,h*u)--(0,h*u)--cycle;
 s2 := (0.2u,0.1u)--(0.2u,(h-0.05)*u);
 s3 := ((b/2+0.2)*u,0.1u)--((b/2+0.2)*u,(h-0.05)*u);
 s4 := (4.8u,0.3u)--(4.8u,0.7u);
 s5 := (2u,0.3u)--(2u,0.7u);
 s6 := (2.8u,0)--(2.8u,1.75u);
draw s1 shifted (ho*u,vo*u);
pickup pencircle scaled 1;
draw s2 shifted (ho*u,vo*u);
pickup pencircle scaled 0.5;
%%Simocode
 draw unitsquare xscaled 1.4u yscaled 0.6u shifted ((ho+0.4)*u,(vo+h-0.8)*u) ;
draw unitsquare xscaled 0.2u yscaled 0.2u shifted ((ho+0.5)*u,(vo+h-0.7)*u);
draw unitsquare xscaled 0.2u yscaled 0.2u shifted ((ho+0.8)*u,(vo+h-0.7)*u);
draw unitsquare xscaled 0.2u yscaled 0.2u shifted ((ho+1.1)*u,(vo+h-0.7)*u);
%%Schalter
draw unitsquare xscaled 0.6u yscaled 0.6u shifted ((ho+1.7)*u,(vo+0.2)*u

Re: [NTG-context] Metafun - Metapost capacity exceeded

2006-04-05 Thread Hans Hagen
Thomas Engel wrote:
 Hello Hans,


 this is the message I got after running texexec pro_mcc_a3.tex.
 As you can see I have increased the memory size for mp.
 I have attached the two tex-files.
 Maybe there is a mistake in the mp-code. A pdf-file will be produced,
 but if you check the output you will see, that one cubicle is missing!
   
i run out of tex memory (8 meg) while converting the big last one 

btw: 

\definelayer[s1]
\defineoverlay[s1][\composedlayer{s1}]
\setupbackgrounds[page][background=s1]

you can omit the second lin ethere (automatically done) 

\definelayer[s1]
\setupbackgrounds[page][background=s1]

also, there is no need for \starttext .. \stoptext inside a \startproject .. 
\stopproject 

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
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Metafun - Metapost capacity exceeded

2006-04-05 Thread Hans Hagen
Thomas Engel wrote:
 Hello Hans,


 this is the message I got after running texexec pro_mcc_a3.tex.
 As you can see I have increased the memory size for mp.
 I have attached the two tex-files.
 Maybe there is a mistake in the mp-code. A pdf-file will be produced,
 but if you check the output you will see, that one cubicle is missing!
   
ok, i stripped down the sample to one image and coul dgenerate a page 

(btw \twodigitMPoutput will make mem usage less but also the quality) 

now, the problem is in the way you define your graphic: 

def Whatever () = 
  save SomePicture ; 
  picture SomePicture ; 
  lots of draws
  SomePicture := currentpicture ;
  SomePicture % return value
end 

here you *never* erase the currentpicture, so graphic keeps accumulating, and 
each SomePicture has all previous draws

you can see that on the screen: acrobat takes ages to draw the simple graphic 
and you can also see it from the mp output (a couple of 100K lines). 

solution: 

def Whatever () = 
  save SomePicture ; 
  picture SomePicture ; 
  lots of draws
  SomePicture := currentpicture ;
  currentpicture := nullpicture ; % ADDED
  SomePicture % return value
end 

or just 

def Whatever () = 
  image ( 
  lots of draws
  ) 
end 

So ... 

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
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Metafun - Metapost capacity exceeded

2006-04-05 Thread Taco Hoekwater


Hans Hagen wrote:
 Thomas Engel wrote:
 
Hello Hans,


this is the message I got after running texexec pro_mcc_a3.tex.
As you can see I have increased the memory size for mp.
I have attached the two tex-files.
Maybe there is a mistake in the mp-code. A pdf-file will be produced,
but if you check the output you will see, that one cubicle is missing!
  
 
 i run out of tex memory (8 meg) while converting the big last one 

Oh yeah, it needs 14.5 MB of memory or so for the conversion.

Taco
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Metafun - Metapost capacity exceeded

2006-04-03 Thread Thomas Engel
Hello,

I'm doing my first work with metafun to generate a switchgear layout
from  a cvs file.
During the run (texexec ) I get the message -  Metapost capacity
exceeded  and a part of the drawing is missing.

I followed the thread  -TeX capacity exceeded with metafun-
and increased the memory size in texmf.cnf but this is not the solution!

Any suggestion what's going wrong?

btw.
it is allowed to send the tex file to the list?

Thanks

Thomas
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Metafun - Metapost capacity exceeded

2006-04-03 Thread Hans Hagen
Thomas Engel wrote:
 Hello,

 I'm doing my first work with metafun to generate a switchgear layout
 from  a cvs file.
 During the run (texexec ) I get the message -  Metapost capacity
 exceeded  and a part of the drawing is missing.

 I followed the thread  -TeX capacity exceeded with metafun-
 and increased the memory size in texmf.cnf but this is not the solution!

 Any suggestion what's going wrong?
   
texmfstart bin:scite.exe kpse:texmf.cnf

(or another editor)

will open the used texmf.cnf file, which may giv eyou a clue about the 
memory values
 btw.
 it is allowed to send the tex file to the list?
   
sure

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
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] TeX capacity exceeded with metafun

2006-03-14 Thread Hans Hagen
andrea valle wrote:
 Console is extremely slow in processing the file including the  
   
that is an os issue (maybe choose another font for your console)

i have no speed problems on the windows and linux boxes 

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
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] TeX capacity exceeded with metafun

2006-03-13 Thread Hans Hagen
andrea valle wrote:
 Thanks Hans

 So:
 1. If I understand, I have to edit context.cnf, right?
   
no, texmf.cnf ; context.tmf is an example of what i use here; (you can 
try copying context.fmf to you texmf-local/web2c path)
 
 2. It may work, but non necessarily. It is thus possible that I cannot 
 solve definitively the problem. How do I choose a clever number to set?
   
locate the texmf,cnf files used and just change the numbers; going from 
2 meg to 4 meg is no problem, but in your case of adding a zero, going 
to 20 meg is more that tex can offer
 3. Ehm... No, I haven't regenerated the format. How can I do it?
   
texexec --make --all 

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
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] TeX capacity exceeded with metafun

2006-03-13 Thread andrea valle
Thanks Hans,
I made some tweaking with values (quasi-randomly...).
Console is extremely slow in processing the file including the  
MPGraphic (I thought many times it hanged, then letting it run without  
looking I discovered some minutes after that it was still working).
Looking at the the terminal (from TeXShop), it seemed that the process  
was not finished, so I killed it, but the pdf is complete.
In any case now I have my drawing of 10,000 squares.

Best and thanks a lot

-a-

PS:
Here you have my algorithmic hommage à Boetti  
(http://www.artfacts.net/index.php/pageType/exhibitionInfo/exhibition/ 
5797/lang/3):
http://www.semiotiche.it/andrea/membrana/alternando.pdf



On 13 Mar 2006, at 09:24, Hans Hagen wrote:

 andrea valle wrote:
 Thanks Hans

 So:
 1. If I understand, I have to edit context.cnf, right?

 no, texmf.cnf ; context.tmf is an example of what i use here; (you can
 try copying context.fmf to you texmf-local/web2c path)

 2. It may work, but non necessarily. It is thus possible that I cannot
 solve definitively the problem. How do I choose a clever number to  
 set?

 locate the texmf,cnf files used and just change the numbers; going from
 2 meg to 4 meg is no problem, but in your case of adding a zero, going
 to 20 meg is more that tex can offer
 3. Ehm... No, I haven't regenerated the format. How can I do it?

 texexec --make --all

 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
 -

 ___
 ntg-context mailing list
 ntg-context@ntg.nl
 http://www.ntg.nl/mailman/listinfo/ntg-context


Andrea Valle
DAMS - Facoltà di Scienze della Formazione
Università degli Studi di Torino
http://www.semiotiche.it/andrea
[EMAIL PROTECTED]

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] TeX capcity excedeed with metafun

2006-03-12 Thread andrea valle
Hi to all,

I'm plotting 10,000 little squares thus exceeding TeX capacity. I was 
going to modify context.cnf (everything works with 5,000 squares).


In particular, I'm  on macosx 10.3 with Gerben's distro. I am editing 
this file:
  /usr/local/teTeX/share/texmf.local/web2c/context.cnf

1. is it correct?
2. Above all, I'am obtaining:
! TeX capacity exceeded, sorry [main memory size=800].

Here's the log:

If you really absolutely need more capacity,
you can ask a wizard to enlarge me.


Here is how much of TeX's memory you used:
  1108 strings out of 60272
  18484 string characters out of 602115
  801 words of memory out of 800
  38234 multiletter control sequences out of 1+5
  75018 words of font info for 37 fonts, out of 200 for 2000
  192 hyphenation exceptions out of 5000
  36i,2n,31p,223b,477s stack positions out of 
5000i,500n,6000p,20b,4s
PDF statistics:
  0 PDF objects out of 30
  0 named destinations out of 131072
  1 words of extra memory for PDF output out of 1
No pages of output.



But in context.cnf I have:
main_memory.context  = 200
main_memory.mpost= 300
main_memory.metafun  = 300

Now, I added one 0 to all these params, thus decuplicating the values, 
but nothing changes.

?

Many thanks as usual for any hints

Best

-a-

Andrea Valle
DAMS - Facoltà di Scienze della Formazione
Università degli Studi di Torino
http://www.semiotiche.it/andrea
[EMAIL PROTECTED]
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] TeX capacity exceeded with metafun

2006-03-12 Thread andrea valle
Now, as far as I understand it seems that I have to edit texmf.cnf.

In any case, I do not know in which way...


Thanks!

-a-






On 12 Mar 2006, at 11:19, andrea valle wrote:

 Hi to all,

 I'm plotting 10,000 little squares thus exceeding TeX capacity. I was
 going to modify context.cnf (everything works with 5,000 squares).


 In particular, I'm  on macosx 10.3 with Gerben's distro. I am editing
 this file:
   /usr/local/teTeX/share/texmf.local/web2c/context.cnf

 1. is it correct?
 2. Above all, I'am obtaining:
 ! TeX capacity exceeded, sorry [main memory size=800].

 Here's the log:

 If you really absolutely need more capacity,
 you can ask a wizard to enlarge me.


 Here is how much of TeX's memory you used:
   1108 strings out of 60272
   18484 string characters out of 602115
   801 words of memory out of 800
   38234 multiletter control sequences out of 1+5
   75018 words of font info for 37 fonts, out of 200 for 2000
   192 hyphenation exceptions out of 5000
   36i,2n,31p,223b,477s stack positions out of
 5000i,500n,6000p,20b,4s
 PDF statistics:
   0 PDF objects out of 30
   0 named destinations out of 131072
   1 words of extra memory for PDF output out of 1
 No pages of output.



 But in context.cnf I have:
 main_memory.context  = 200
 main_memory.mpost= 300
 main_memory.metafun  = 300

 Now, I added one 0 to all these params, thus decuplicating the values,
 but nothing changes.

 ?

 Many thanks as usual for any hints

 Best

 -a-

 Andrea Valle
 DAMS - Facoltà di Scienze della Formazione
 Università degli Studi di Torino
 http://www.semiotiche.it/andrea
 [EMAIL PROTECTED]
 ___
 ntg-context mailing list
 ntg-context@ntg.nl
 http://www.ntg.nl/mailman/listinfo/ntg-context


Andrea Valle
DAMS - Facoltà di Scienze della Formazione
Università degli Studi di Torino
http://www.semiotiche.it/andrea
[EMAIL PROTECTED]

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] TeX capacity exceeded with metafun

2006-03-12 Thread Hans Hagen
andrea valle wrote:
 Now, as far as I understand it seems that I have to edit texmf.cnf.

 In any case, I do not know in which way...


 Thanks!

 -a-






 On 12 Mar 2006, at 11:19, andrea valle wrote:

   
 Hi to all,

 I'm plotting 10,000 little squares thus exceeding TeX capacity. I was
 going to modify context.cnf (everything works with 5,000 squares).


 In particular, I'm  on macosx 10.3 with Gerben's distro. I am editing
 this file:
   /usr/local/teTeX/share/texmf.local/web2c/context.cnf

 1. is it correct?
 2. Above all, I'am obtaining:
 ! TeX capacity exceeded, sorry [main memory size=800].

 Here's the log:

 If you really absolutely need more capacity,
 you can ask a wizard to enlarge me.


 Here is how much of TeX's memory you used:
   1108 strings out of 60272
   18484 string characters out of 602115
   801 words of memory out of 800
   38234 multiletter control sequences out of 1+5
   75018 words of font info for 37 fonts, out of 200 for 2000
   192 hyphenation exceptions out of 5000
   36i,2n,31p,223b,477s stack positions out of
 5000i,500n,6000p,20b,4s
 PDF statistics:
   0 PDF objects out of 30
   0 named destinations out of 131072
   1 words of extra memory for PDF output out of 1
 No pages of output.



 But in context.cnf I have:
 main_memory.context  = 200
 main_memory.mpost= 300
 main_memory.metafun  = 300

 Now, I added one 0 to all these params, thus decuplicating the values,
 but nothing changes.
 
did you regenerate the formats? 

(btw adding a 0 will not work, duplicating may) 

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
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] TeX capacity exceeded with metafun

2006-03-12 Thread andrea valle
Thanks Hans

So:
1. If I understand, I have to edit context.cnf, right?
2. It may work, but non necessarily. It is thus possible that I cannot 
solve definitively the problem. How do I choose a clever number to set?
3. Ehm... No, I haven't regenerated the format. How can I do it?

Thanks

Best
-a-


 But in context.cnf I have:
 main_memory.context  = 200
 main_memory.mpost= 300
 main_memory.metafun  = 300

 Now, I added one 0 to all these params, thus decuplicating the 
 values,
 but nothing changes.

 did you regenerate the formats?

 (btw adding a 0 will not work, duplicating may)

 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
 -

 ___
 ntg-context mailing list
 ntg-context@ntg.nl
 http://www.ntg.nl/mailman/listinfo/ntg-context


Andrea Valle
DAMS - Facoltà di Scienze della Formazione
Università degli Studi di Torino
http://www.semiotiche.it/andrea
[EMAIL PROTECTED]

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] TeX capacity exceeded with metafun

2006-03-12 Thread andrea valle
I edited the file doubling the 3 values


 But in context.cnf I have:
 main_memory.context  = 200
 main_memory.mpost= 300
 main_memory.metafun  = 300


 did you regenerate the formats?




Then I ran:

texexec --make

(right?)

But nothing changed

Best

-a-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] metafun boxes

2006-03-02 Thread Renaud AUBIN

Hi all,

Yesterday, I have tried to put \input boxes within a MPgraphic. As a
result, I obtain errors at compilation. After discussing this issue with
Taco on #context, it appears that boxes.mp and metafun interaction is
not safe at all.
Ok, but since my needs remain the same, solutions are :
1. just do it, but manually (not smart at all)
2. use metapost then include the result in my document through ps or pdf
files (this solution needs the user takes care of fonts + manually
metaposting - not really smart)
3. use charts (but depends on what you want achieve - ok, but not for
all purposes)
4. define some metafun macros (time consuming at  the beginning but it's
best to invest for the long term)
X. others solutions I don't know yet... (feel free to add yours !)

My thought is to finally obtain in metafun:
1. Nodes with text (multiline text!) and a collection of simple shapes
to use like box, circle, box with rounded corner... 2. Nodes must be
placed freely accroding to the metapost coordinate system
3. Connections between nodes (using boundaries of each nodes +
possibility to give angles from...to for each connections)

PSTricks can do that but it can be nice if metafun can provide this kind
of features.
See http://renolab.lrv.uvsq.fr/perso/ConTeXt/sample.png to have an idea
(nodes are aligned in this figure but it is a particular case)...

Maybe a solution exists, but since I don't know it, I send this post:
1. Are other people interested ?
2. What is the best solution to implement this feature in metafun ?

My idea is to use \framed + shapes + path + ...

Feel free to give your opinion/need/contribution/whateveryouwant ;-)

Cheers,

Renaud


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] metafun boxes

2006-03-02 Thread Aditya Mahajan
--- On Mar 2, Renaud AUBIN wrote ---


 Hi all,

 Yesterday, I have tried to put \input boxes within a MPgraphic. As a
 result, I obtain errors at compilation. After discussing this issue with
 Taco on #context, it appears that boxes.mp and metafun interaction is
 not safe at all.

Shouldn't  that be input boxes; in a MPinclusions?

 X. others solutions I don't know yet... (feel free to add yours !)

Have a look at metaobj.
 My thought is to finally obtain in metafun:
 1. Nodes with text (multiline text!)

Place inside a framed

 and a collection of simple shapes to use like box, circle, box 
 with rounded corner...

Metaobj provides all basic shapes

 2. Nodes must be placed freely accroding to the metapost coordinate 
 system

Metaobj provides a better interface to placement. You can specify the 
distance and alignment between the nodes.

 3. Connections between nodes (using boundaries of each nodes +
 possibility to give angles from...to for each connections)

Has all of that

 See http://renolab.lrv.uvsq.fr/perso/ConTeXt/sample.png to have an idea

See the example below. metaobj has some bugs and limitations, but 
works as expected most of the time.

\starttext

\startMPenvironment
   \setupbodyfont[8pt]
   \setupframed[width=3cm, align=center, frame=off]
\stopMPenvironment

\startMPinclusions
   input metaobj;
   setObjectDefaultOption(Ellipse)(fit)(false)
   setCurveDefaultOption(arcangleA,15);
   setCurveDefaultOption(arcangleB,15);
\stopMPinclusions

\startMPpage
   % Metaobj provides a Circle command. But there seems to be
   % a bug in the interaction of Circle and Matix. So using Ellipse with
   % fit=false
   newEllipse.N1(btex \framed{Mise Sous Tension} etex) ;
   newEllipse.N2(btex \framed{Mesure du point zéro méchaique} etex) ;
   newEllipse.N3(btex \framed{Régalage des paramèters de contrôle} etex) ;
   newEllipse.N4(btex \framed{Envoi du contenu de l'\cap{EEPROM}} etex) ;
   newEllipse.N5(btex \framed{{\bf Mode stop|/| réglage}
 Attente de commande} etex) ;
   newEllipse.N6(btex \framed{\bf Mode freins libres} etex) ;
   newEllipse.N7(btex \framed{Le contenu de l'\cap{EEPROM} a changé} etex) ;
   newEllipse.N8(btex \framed{Ëcriture du contenu de la
 \cap{RAM} vers l'\cap{EEPROM}} etex);
   newEllipse.N9(btex \framed{{\bf Mode  Contrôle} La valeur
 de la commande est rafraîchie à chaque cycle} etex) ;

   newMatrix.diagram(3,3)(N1,N2,N3,N4,N5,N6,N7,N8,N9)
 hsep(1.5cm), vsep(1.5cm);
   diagram.c = origin ;
   drawObj(diagram) ;
   ncline(N1)(N5) ;
   for i = 2,3,4,6,7,8,9:
 ncarc(N[i])(N[5]) ;
 ncarc(N[5])(N[i]) ;
   endfor
   nccircle(N6) angleA(-120) ;
   nccircle(N9) angleA(-120) ;

   % Labels can be added. See metaobj manual

\stopMPpage

\stoptext





-- 
Aditya Mahajan, EECS Systems, University of Michigan
http://www.eecs.umich.edu/~adityam || Ph: 7342624008
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] metafun boxes

2006-03-02 Thread Renaud AUBIN

Hi Adita,

I have already seen metaobj in the past... but I have forgotten it... ;-)

Thank you very much for the example !

Cheers,

Renaud
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] metafun: problems, problems problems again

2006-02-21 Thread Mojca Miklavec
On 2/20/06, Hans Hagen wrote:
 Mojca Miklavec wrote:
  But I still get no figures at all under MikTeX and undefined labels
  with the standalone.
 
 that normally means that no tex subruns take place (or wrong ones)

 (maybe the system command is not executed, in the log you can see what
 write 18 does)

 you can try (on a mp file):

 texexec --mptex somefile.mp

 and see what is reported

I traced the problem of getting annoying \loadfontfilesoncetrue
undefined messages down to the line 2936 in texexec.pl, sub RunMPX:
   if ( ( $Format eq '' ) || ( $Format =~ /^cont.*/io ) ) {
  RunConTeXtFile( $MpTmp, tex );
   } else {
  RunSomeTeXFile( $MpTmp, tex );
   }

The first subroutine (RunConTeXtFile) is executed (as it should be),
but it calls TeX instead of ConTeXt (format) and I have no idea how
to change this behaviour. That's why all ConTeXt commands are
undefined.

The same is true for tex.rb, line 1442:
   if context then
  ok = RunConTeXtFile(mptex)
   else
  ok = RunSomeTeXFile(mptex)
   end

It goes into the first part of the if sentence, but it nevertheless
runs (plain) tex. Except that in this time it was far from evident for
me where this RunConTeXtFile came from (I didn't see the definition
anywhere except if it calls Perl at that place).

On 2/20/06, Taco Hoekwater wrote:
 Mojca Miklavec wrote:
  Is there any way to explore why the crash would happen? I get An
  unhandled win32 exception occured in pdfetex.exe [2384], 3164, 812,
  1752, 2776, ...

 A (likely) candidate is an (software-ignored) attempt to write to
 a file that is still in use by another application. It is quite
 possible that this is the result of an I/O timing error that is in
 itself caused by a misconfigured win32 install (harddisks in ms-dos
 compatility mode, for example, or soundcard that share interrupts
 with the harddisk controller.

Might be. I also heard from some latex people that they had problems
with pdflatex on some disks. It happened to me on two different
computers on two different distros (MikTeX, standalone). Some crashing
went away when I removed \setupoutput[pdf] from cont-sys.tex (but I'm
stil confused since there are two cont-sys files, one .rme and one
.ori. Which one should be used? They are identical, but why would one
want to have the same file at two places?)

Mojca
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] metafun: problems, problems problems again

2006-02-21 Thread Hans Hagen
Mojca Miklavec wrote:

 went away when I removed \setupoutput[pdf] from cont-sys.tex (but I'm
 stil confused since there are two cont-sys files, one .rme and one
 .ori. Which one should be used? They are identical, but why would one
 want to have the same file at two places?)
   
because that way you still have an original when you mess up your local 
cont-sys.tex file; when no cont-sys.tex file is present (not in the 
distribution because it's not to be overwritten) context will load the 
rme file; the rme file also shows the latest greatest options that make 
sense to go there

btw, setupoutput[pdf] is not supposed to be in the cont-sys.tex file; 
newtexec defaults to pdf output anyway

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
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] metafun: problems, problems problems again

2006-02-20 Thread Hans Hagen
Mojca Miklavec wrote:
 Hello,

 This metafun will soon drive me crazy.

 1. I can't make textext work

 Once upon a time I only had problems in MikTeX, now standone is
 causing me problems as well. I have:
 - write18 / -shell-escape enabled
 - \runMPgraphicstrue
   \runMPTEXgraphicstrue
   \useMETAFUNformattrue
   \protectbufferstrue
   enabled (I don't know where to look further).
 But I still get no figures at all under MikTeX and undefined labels
 with the standalone.
   
that normally means that no tex subruns take place (or wrong ones)

(maybe the system command is not executed, in the log you can see what 
write 18 does)

you can try (on a mp file):

texexec --mptex somefile.mp

and see what is reported


 2. mptopdf doesn't work under MikTeX (as already mentioned), but
 that's not so critical since I can still use texmfstart or write my
 own .bat file to run it
   
forget about something mptopdf.exe, the bat method using texmfstart is 
the way to go
 3. metafun reformats the whole metapost source (including that in
 verbatin) and so you can never predict what will come out; often the
 TeX commands fail to work and while it's possible to easily debug
 plain metapost sources, metafun swallows most of the error warnings
 somehow, so you don't get any output, but no error reports either.
   
there is normally a jobname-mpgraph.log file
 4. I have problems with \loadfontfilesoncetrue. I searched through
   
hm, loadfontfilesonce is not there (any more)
 mailing list archives and found out that that problems was already
 present in 2002 and that someone solved it by deleting all ConTeXt
 files from MikTeX. I don't understand why since I have fresh MikTeX
 distribution on the computer, but I'll try that.
   
maybe some old cont-sys.tex file?
 5. I hoped to be able to use gnuplot with context terminal, but the
 file I produced crashes pdfetex 1.30.3--2.2 (in stand-alone distro).
 1.21a under MikTeX doesn't crash, but since there is no output it
 might be that the older version never gets to the point where it would
 crash. A very rare event. The files that make the pdftex crash are
 located here: http://pub.mojca.org/gnuplot/pdftex-crash/
   
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
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] metafun: problems, problems problems again

2006-02-20 Thread Taco Hoekwater


Mojca Miklavec wrote:
 
 5. I hoped to be able to use gnuplot with context terminal, but the
 file I produced crashes pdfetex 1.30.3--2.2 (in stand-alone distro).
 1.21a under MikTeX doesn't crash, but since there is no output it
 might be that the older version never gets to the point where it would
 crash. A very rare event. The files that make the pdftex crash are
 located here: http://pub.mojca.org/gnuplot/pdftex-crash/

Mojca,

What commandline do I have to run to get a crash? (as opposed to
a TeX error message)

Cheers, Taco

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] metafun: problems, problems problems again

2006-02-20 Thread Mojca Miklavec
On 2/20/06, Hans Hagen wrote:
  4. I have problems with \loadfontfilesoncetrue. I searched through
 
 hm, loadfontfilesonce is not there (any more)

But it's in all my -mpgraph.mp documents. Anyhow, other ConTeXt
commands aren't recognized either.

I reinstalled ConTeXt/MikTeX for the second or the third time and now
it doesn't crash any more (but now I get complaints about all the
ConTeXt-specific commands).

However, I discovered something strange in the log files in temporary
folder (they were left there while I stil had the crashing version of
pdfTeX). Log files about processing mpx314.tex files have preloaded
format=plain in them. Is it possible that they are processed with the
wrong switch for MikTeX (with its own specifics)? This might explain
the loadfontfileonce and other errors. There's usually no chance to
see those log files (if pdfTeX didn't crash, I wouldn't see them).
PdfTeX in standalone ConTeXt crashes before that, so it just manages
to create some trash empty directory which is deleted again after I
click no, don't report that error to Microsoft, please.

  mailing list archives and found out that that problems was already
  present in 2002 and that someone solved it by deleting all ConTeXt
  files from MikTeX. I don't understand why since I have fresh MikTeX
  distribution on the computer, but I'll try that.
 
 maybe some old cont-sys.tex file?

Which one I just realized that there are actually two cont-sys.
One from user/cont-sys.rme and the other one from base/cont-sys.ori.
They are (almost) identical.

I have overwritten the MikTeX dir with files from cont-tfm.zip. And
now MikTeX crashes (crashed, I'm writing this mail in non-cronological
order) with the sample mentioned below as well. (OK, there were two
minor mistakes in the sample files I've put online, but no reason why
pdfTeX should crash on it. pdfTeX crashes approximately on the moment
when mpx files are generated.)

I used MikTeX on another computer and during playing with those
cont-sys.tex and cont-usr.tex, refreshing  remaking formats, the
behaviour changed from non-crashing into the crashing one, but I don't
manage to repeat that behaviour on my computer. Since I came back, it
doesn't crash any more. Mist.

[again one paragraph that should be written in past tense] But on my
computer I simply don't manage to change anything. Keeps crashing
while processing those mpx files and after that it complains that
context-specific commands are unknown (seems as if everything between
btex ... etex would be processed with latex). Is it OK that those
mpx314 files end with \end{document}?

Is there any way to explore why the crash would happen? I get An
unhandled win32 exception occured in pdfetex.exe [2384], 3164, 812,
1752, 2776, ...

Mojca
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] metafun: problems, problems problems again

2006-02-20 Thread Taco Hoekwater
Mojca Miklavec wrote:

 Is it OK that those mpx314 files end with \end{document}?

Yes, that is 'normal': plain TeX (and thereby ConTeXt) only sees the
\end command, and LaTeX/SliTeX sees the whole \end{document} (this
stuff was written before ConTeXt became popular).

 Is there any way to explore why the crash would happen? I get An
 unhandled win32 exception occured in pdfetex.exe [2384], 3164, 812,
 1752, 2776, ...

A (likely) candidate is an (software-ignored) attempt to write to
a file that is still in use by another application. It is quite
possible that this is the result of an I/O timing error that is in
itself caused by a misconfigured win32 install (harddisks in ms-dos
compatility mode, for example, or soundcard that share interrupts
with the harddisk controller.

The crash information means absolutely nothing to me, sorry.

Cheers, Taco
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] metafun: problems, problems problems again

2006-02-19 Thread Mojca Miklavec
Hello,

This metafun will soon drive me crazy.

1. I can't make textext work

Once upon a time I only had problems in MikTeX, now standone is
causing me problems as well. I have:
- write18 / -shell-escape enabled
- \runMPgraphicstrue
  \runMPTEXgraphicstrue
  \useMETAFUNformattrue
  \protectbufferstrue
  enabled (I don't know where to look further).
But I still get no figures at all under MikTeX and undefined labels
with the standalone.

2. mptopdf doesn't work under MikTeX (as already mentioned), but
that's not so critical since I can still use texmfstart or write my
own .bat file to run it

3. metafun reformats the whole metapost source (including that in
verbatin) and so you can never predict what will come out; often the
TeX commands fail to work and while it's possible to easily debug
plain metapost sources, metafun swallows most of the error warnings
somehow, so you don't get any output, but no error reports either.

4. I have problems with \loadfontfilesoncetrue. I searched through
mailing list archives and found out that that problems was already
present in 2002 and that someone solved it by deleting all ConTeXt
files from MikTeX. I don't understand why since I have fresh MikTeX
distribution on the computer, but I'll try that.

5. I hoped to be able to use gnuplot with context terminal, but the
file I produced crashes pdfetex 1.30.3--2.2 (in stand-alone distro).
1.21a under MikTeX doesn't crash, but since there is no output it
might be that the older version never gets to the point where it would
crash. A very rare event. The files that make the pdftex crash are
located here: http://pub.mojca.org/gnuplot/pdftex-crash/

Thanks a lot for any help  suggestions,
Mojca
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] using symbols in MetaFun

2006-02-15 Thread Mojca Miklavec
Thank you very much to both of you! This works perfectly and just the
way I wanted.

I have some other questions, but I have to write exact specification(s) first.

(The whole documentation for implementing 3D features is approximately
read the cryptic implementation in PostScript, figure out what it
does and implement it that way in your terminal. I hate that, but
I'll try to come through it. I'll report as soon as there will be
something functional available.)

Thanks a lot for all the help,
Mojca


On 2/13/06, Hans Hagen wrote:
 Mojca Miklavec wrote:
  Hello,
 
  I have a conversion defined in the following way:
 
  \usesymbols[jmn]
  \defineconversion
 [gnuplot]
 [$\bullet$,
  $\circ$,
  $\star$,
  x,
  {\symbol[navigation 1][NextJump]}]
 
  I would like to use these symbols in a macro
  draw_symbol(x,y,number)
  so that
  draw_symbol(0,0,3)
  would draw a star in the origin.
 
  The problem is that I don't know:
  - how to use symbol sets inside MetaFun (verbatimtex \usesymbols[jmn]
  etex doesn't work here)
  - how to enable
  label(btex \convertnumber{gnuplot}{5} etex, (x,y))
to work properly in metafun (no luck with verbatimtex ... etex again)
 
  Any hints would be appreciated.
 
  test.tex 

 \starttext

 \startMPenvironment [global]

 \readfile{test-gnuplot}{}{}

 \stopMPenvironment

 \setupcolors[state=start]

 \startMPcode
 def the_symbol(expr n) =
 textext(\GnuPlotSymbol{  decimal n  })
 enddef ;
 def draw_symbol(expr x, y, n) =
 draw the_symbol(n) shifted (x,y)
 enddef ;

 for i=1 upto 10 :
 draw_symbol(i*10,i*10,i) withcolor red ;
 endfor ;
 \stopMPcode

 \stoptext


 === test-gnuplot.tex 

 \defineconversion
   [gnuplot]
   [$\bullet$,
$\circ$,
$\star$,
x,
   {\symbol[navigation 1][NextJump]}]

 \unexpanded\def\GnuPlotSymbol#1%
   {\convertnumber{gnuplot}{#1}}
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] using symbols in MetaFun

2006-02-13 Thread Hans Hagen
Taco Hoekwater wrote:
 I could not figure out how to use a 'verbatimtex' preamble either,
 so this loads the myenv definition file for each label. Ugly, but
 the best I can manage with my current knowledge.
   
ha, we reached similar solutions -) 

the solution for the inclusion is in

\startMPenvironment
\stopMPenvironment 

when this becomes a module, one can best append the code loading to 

  \everyMPTEXgraphic

as in 

\appendtoks 
  \usemodule[...]% 
\to \everyMPTEXgraphic 

so that it will not clash with user defined environments and/or inclusions 

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
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] using symbols in MetaFun

2006-02-12 Thread Taco Hoekwater
Mojca Miklavec wrote:
 The problem is that I don't know:
 - how to use symbol sets inside MetaFun (verbatimtex \usesymbols[jmn]
 etex doesn't work here)
 - how to enable
 label(btex \convertnumber{gnuplot}{5} etex, (x,y))
   to work properly in metafun (no luck with verbatimtex ... etex again)
 
 Any hints would be appreciated.

I am very much a beginner at metafun, so the following is probably
garbage, but to its defence I can say that it actually achieves the
goal :)

There are two files:

% myenv.tex: contains the symbol definition
\usesymbols[jmn]
\defineconversion
[gnuplot]
[$\bullet$,
 $\circ$,
 $\star$,
 x,
 {\symbol[navigation 1][NextJump]}]
% end

% sym.tex: the main file
\environment myenv

\startMPinclusions
def draw_symbol(expr X, Y, Number) =
   label(textext(char 92  input myenv  
 char 92  convertnumber{gnuplot}{ 
decimal Number  }),(X,Y))
enddef
\stopMPinclusions

\starttext
\startuseMPgraphic
draw_symbol(0,0,3);
\stopuseMPgraphic
\useMPgraphic
\stoptext
% end

I could not figure out how to use a 'verbatimtex' preamble either,
so this loads the myenv definition file for each label. Ugly, but
the best I can manage with my current knowledge.

Cheers,
Taco


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Metafun example doesn't work

2005-12-18 Thread Taco Hoekwater

Hi David,

To me it looks like it does work, but perhaps I am not looking
at it correctly. Here is what I compiled:

  \setupcolors[state=start]
  \setupoutput[pdftex]
  \starttext
  \startMPgraphic
  draw unitsquare
xscaled 5cm yscaled 1cm
withpen pencircle scaled 2mm
withcolor .625 red;
  \stopMPgraphic
  \hbox\bgroup
  \loadcurrentMPgraphic{width=5cm,height=1cm}\placeMPgraphic\quad
  \loadcurrentMPgraphic{width=8cm,height=1cm}\placeMPgraphic\egroup
  \stoptext

And I get a red outline around two rectangles next to eachother.
Does it crash for you?

Taco

David Arnold wrote:

All,

I've always wondered why this Metafun manual example doesn't work.

\startMPgraphic
  draw unitsquare
xscaled 5cm yscaled 1cm
withpen pencircle scaled 2mm
withcolor .625 red;
\stopMPgraphic

\hbox\bgroup
\loadcurrentMPgraphic{width=5cm,height=1cm}\placeMPgraphic\quad
\loadcurrentMPgraphic{width=8cm,height=1cm}\placeMPgraphic\egroup
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Metafun example doesn't work

2005-12-18 Thread David Arnold
It compiles, but the figures should not be identical according to the  
Metafun manual, page 201.


On Dec 18, 2005, at 1:01 AM, Taco Hoekwater wrote:


Hi David,

To me it looks like it does work, but perhaps I am not looking
at it correctly. Here is what I compiled:

  \setupcolors[state=start]
  \setupoutput[pdftex]
  \starttext
  \startMPgraphic
  draw unitsquare
xscaled 5cm yscaled 1cm
withpen pencircle scaled 2mm
withcolor .625 red;
  \stopMPgraphic
  \hbox\bgroup
  \loadcurrentMPgraphic{width=5cm,height=1cm}\placeMPgraphic\quad
  \loadcurrentMPgraphic{width=8cm,height=1cm}\placeMPgraphic\egroup
  \stoptext

And I get a red outline around two rectangles next to eachother.
Does it crash for you?

Taco

David Arnold wrote:

All,
I've always wondered why this Metafun manual example doesn't work.
\startMPgraphic
  draw unitsquare
xscaled 5cm yscaled 1cm
withpen pencircle scaled 2mm
withcolor .625 red;
\stopMPgraphic
\hbox\bgroup
\loadcurrentMPgraphic{width=5cm,height=1cm}\placeMPgraphic\quad
\loadcurrentMPgraphic{width=8cm,height=1cm}\placeMPgraphic\egroup
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Metafun example doesn't work

2005-12-18 Thread Taco Hoekwater

David Arnold wrote:
It compiles, but the figures should not be identical according to the  
Metafun manual, page 201.


Ah, I see now.  The second argument is dropped, because it was
assumed that it was never actually used. See the two disjunct
definitions of \insertMPfile in supp-mps.tex (the version documented
in the metafun manual) versus the one in in meta-ini.tex (the
version that is actually used).


Taco




___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Metafun example doesn't work

2005-12-18 Thread Hans Hagen

Taco Hoekwater wrote:


David Arnold wrote:

It compiles, but the figures should not be identical according to 
the  Metafun manual, page 201.



Ah, I see now.  The second argument is dropped, because it was
assumed that it was never actually used. See the two disjunct
definitions of \insertMPfile in supp-mps.tex (the version documented
in the metafun manual) versus the one in in meta-ini.tex (the
version that is actually used).


indeed, a substantial speed optimization -)

so ... i need to change the metafun example to use scaling instead

Hans
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Metafun example doesn't work

2005-12-18 Thread Hans Hagen

Taco Hoekwater wrote:


Hi David,

To me it looks like it does work, but perhaps I am not looking
at it correctly. Here is what I compiled:

  \setupcolors[state=start]
  \setupoutput[pdftex]
  \starttext
  \startMPgraphic
  draw unitsquare
xscaled 5cm yscaled 1cm
withpen pencircle scaled 2mm
withcolor .625 red;
  \stopMPgraphic
  \hbox\bgroup
  \loadcurrentMPgraphic{width=5cm,height=1cm}\placeMPgraphic\quad
  \loadcurrentMPgraphic{width=8cm,height=1cm}\placeMPgraphic\egroup
  \stoptext

And I get a red outline around two rectangles next to eachother.


i will change that example (or maybe some other low level code -)

Hans
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Metafun example doesn't work

2005-12-17 Thread David Arnold

All,

I've always wondered why this Metafun manual example doesn't work.

\startMPgraphic
  draw unitsquare
xscaled 5cm yscaled 1cm
withpen pencircle scaled 2mm
withcolor .625 red;
\stopMPgraphic

\hbox\bgroup
\loadcurrentMPgraphic{width=5cm,height=1cm}\placeMPgraphic\quad
\loadcurrentMPgraphic{width=8cm,height=1cm}\placeMPgraphic\egroup
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Drawing oriented paths in MetaFun

2005-11-16 Thread Giuseppe Bilotta
Does MetaFun provide some macro to draw oriented paths? I
would like it to basically add a small arrow *in the middle*
of the path? Such a macro

draworiented somepath somespecs ;

would have to act like

drawarrow firsthalf(somepath) somespecs ;
draw secondhalf(somepath) somespecs ;

Is it available already, or should I roll my own?

-- 
Giuseppe Oblomov Bilotta

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Drawing oriented paths in MetaFun

2005-11-16 Thread Giuseppe Bilotta
Wednesday, November 16, 2005 Giuseppe Bilotta wrote:

 Does MetaFun provide some macro to draw oriented paths? I
 would like it to basically add a small arrow *in the middle*
 of the path? Such a macro

 draworiented somepath somespecs ;

 would have to act like

 drawarrow firsthalf(somepath) somespecs ;
 draw secondhalf(somepath) somespecs ;

 Is it available already, or should I roll my own?


Hm. I came up with

def draworiented expr c =
  path _c_ ; _c_ := c ;
  do_draworiented
enddef ;

def do_draworiented text t =
  draw _c_ t ;
  drawarrow subpath(0, length(_c_)/2) of _c_ ;
enddef;
 
which works, although I have to do

draworiented (reverse p1)

Is there an easy way to have it work with

draworiented reverse p1 ?

-- 
Giuseppe Oblomov Bilotta

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re[2]: [NTG-context] Drawing oriented paths in MetaFun

2005-11-16 Thread Giuseppe Bilotta
Wednesday, November 16, 2005 Giuseppe Bilotta wrote:

 Wednesday, November 16, 2005 Giuseppe Bilotta wrote:

 Does MetaFun provide some macro to draw oriented paths? I
 would like it to basically add a small arrow *in the middle*
 of the path? Such a macro

 draworiented somepath somespecs ;

 would have to act like

 drawarrow firsthalf(somepath) somespecs ;
 draw secondhalf(somepath) somespecs ;

 Is it available already, or should I roll my own?


 Hm. I came up with

 def draworiented expr c =
   path _c_ ; _c_ := c ;
   do_draworiented
 enddef ;

 def do_draworiented text t =
   draw _c_ t ;
   drawarrow subpath(0, length(_c_)/2) of _c_ ;
 enddef;
 
 which works, although I have to do

 draworiented (reverse p1)

 Is there an easy way to have it work with

 draworiented reverse p1 ?


Oh sorry it works ... however, it traces half of the curve
twice. So I came up with the next:

def draworiented expr c =
  path _c_ ; _c_ := c ;
  do_draworiented
enddef ;

def do_draworiented text t =
  drawarrow subpath(0, length(_c_)/2) of _c_ t ;
  draw subpath(length(_c_)/2, length(_c_)) of _c_ t ;
enddef;
 
This still isn't perfect, but it works. It needs a little
tuning so that the arrow is more centered, and of course it
could be improved to put the arrow at any arbitrary point on
the path.

-- 
Giuseppe Oblomov Bilotta

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Drawing oriented paths in MetaFun

2005-11-16 Thread Hans Hagen

Giuseppe Bilotta wrote:


Does MetaFun provide some macro to draw oriented paths? I
would like it to basically add a small arrow *in the middle*
of the path? Such a macro

draworiented somepath somespecs ;

would have to act like

drawarrow firsthalf(somepath) somespecs ;
draw secondhalf(somepath) somespecs ;

Is it available already, or should I roll my own?

 


it's there; watch out, i just added a scaling option

\starttext

\setupcolors[state=start]

\startMPpage

vardef arrowheadonpath (expr p, s) =
 save autoarrows ; boolean autoarrows ; autoarrows := true ;
 set_ahlength(scaled ahfactor) ; % added
 arrowhead p if s1 : cutafter (point (s*arclength(p)+.5ahlength) on p) fi
enddef ;

path p ; p := (0,0)--(10cm,10cm) ;

draw p withcolor red ;
ahfactor := 5 ; % default is 2.5
fill arrowheadonpath(p,.5) withcolor blue ; % try .25

currentpicture := currentpicture xsized (10cm) ;
\stopMPpage

\stoptext

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Drawing oriented paths in MetaFun

2005-11-16 Thread Hans Hagen

Giuseppe Bilotta wrote:


Wednesday, November 16, 2005 Giuseppe Bilotta wrote:

 


Does MetaFun provide some macro to draw oriented paths? I
would like it to basically add a small arrow *in the middle*
of the path? Such a macro
   



 


draworiented somepath somespecs ;
   



 


would have to act like
   



 


drawarrow firsthalf(somepath) somespecs ;
draw secondhalf(somepath) somespecs ;
   



 


Is it available already, or should I roll my own?
   




Hm. I came up with

def draworiented expr c =
 path _c_ ; _c_ := c ;
 do_draworiented
enddef ;

def do_draworiented text t =
 draw _c_ t ;
 drawarrow subpath(0, length(_c_)/2) of _c_ ;
enddef;

which works, although I have to do

draworiented (reverse p1)

Is there an easy way to have it work with

draworiented reverse p1 ?

 

add another step (do_do_) , first pick up 'reverse p1' as expression, 
save that in a path variable, and then pick up the text


Hans

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


function plotting (was: Re: [NTG-context] Q: about \externalfile from metafun-p.pdf)

2005-10-04 Thread Alexander Lazic

On Mon 03.10.2005 19:26, Christopher Creutzig wrote:


MetaPost is not really a function plotter.  So, yes, you have to use
some sort of loop, although there may be some predefined macros hiding
them.


Is there a better way in ConTeXt/tex for this?!

Should i use some external Programms for this?

al ;-)
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: function plotting (was: Re: [NTG-context] Q: about \externalfile from metafun-p.pdf)

2005-10-04 Thread Mojca Miklavec
Alexander Lazic wrote:
 On Mon 03.10.2005 19:26, Christopher Creutzig wrote:
 
  MetaPost is not really a function plotter.  So, yes, you have to use
 some sort of loop, although there may be some predefined macros hiding
 them.

 Is there a better way in ConTeXt/tex for this?!

 Should i use some external Programms for this?

 al ;-)

I use gnuplot which makes graphs of superb visual quality and has
extensive support for many different function manipulations and weird
stuff that you want to do with it. I do something like:

set terminal latex
set output file.tex
set title '\bf My wonderful function $sin(\omega t)$'
set xlabel '$t\ \rm[s]$'
set ylabel '$A$'
plot sin(x)

and then \input file inside of the main LaTeX file. Gnuplot cannot
make output in ConTeXt (yet), but perhaps you can include the
resulting PDFs in your ConTeXt source. (Gnuplot is one of the very few
examples where I still use LaTeX.) You can also output the
(ConTeXt-friendly) metapost (with set terminal), but you lose on
quality.

Mojca
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: function plotting (was: Re: [NTG-context] Q: about \externalfile from metafun-p.pdf)

2005-10-04 Thread Alexander Lazic

On Die 04.10.2005 19:48, Mojca Miklavec wrote:


I use gnuplot which makes graphs of superb visual quality and has
extensive support for many different function manipulations and weird
stuff that you want to do with it. 


I have also think on gnuplot, but wasn't sure that i can use the ps/pdf
into my context doc.


and then \input file inside of the main LaTeX file. Gnuplot cannot
make output in ConTeXt (yet), but perhaps you can include the resulting
PDFs in your ConTeXt source. (Gnuplot is one of the very few examples
where I still use LaTeX.) You can also output the (ConTeXt-friendly)
metapost (with set terminal), but you lose on quality.


Well i will also try with gnuplot.

How much bad is 'lose quality' in %?

greetings

al ;-)
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Q: about \externalfile from metafun-p.pdf

2005-10-03 Thread Alexander Lazic

On Son 02.10.2005 22:36, Christopher Creutzig wrote:

Alexander Lazic wrote:


2.) i have try

\startreusableMPgraphic{sin}

  sin (1);
\stopreusableMPgraphic{sin}


This {sin} at the end is wrong; it's interpreted as text.


This  have i understand ;-)
I called it sin, sorry for confusion.


What you can do is something like

   drawdot(10*x, 10*sin(x)) withpen pencircle scaled 1pt;


Thanx.
Have i right understand, if i want to draw a sinuscurve i must use a
for-loop?


I think it really helps with MP programming to understand this type of
loops.


Well i think i must learn mp before context, if i want to draw some
mathemathics functions ;-)

Thanx again for help.

greetings

al ;-)
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Q: about \externalfile from metafun-p.pdf

2005-10-03 Thread Christopher Creutzig
Alexander Lazic wrote:
\stopreusableMPgraphic{sin}

This {sin} at the end is wrong; it's interpreted as text.
 
 
 This  have i understand ;-)
 I called it sin, sorry for confusion.

 The name is unimportant – my point is that the \stop... commands don't
get arguments.

 Thanx.
 Have i right understand, if i want to draw a sinuscurve i must use a
 for-loop?

 MetaPost is not really a function plotter.  So, yes, you have to use
some sort of loop, although there may be some predefined macros hiding them.


Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Q: about \externalfile from metafun-p.pdf

2005-10-02 Thread Alexander Lazic

Hi,

i'm starting to learn context and therefore i have copied some examples
from metafun-p.pdf and get the following error:

---
! Undefined control sequence.
l.42 \externalfile
 [mprun.21][width=5cm]
---
---
texexec  --version

TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005

  texexec : TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005
  texutil : TeXUtil 9.0.0 - ConTeXt / PRAGMA ADE 1992-2004
  tex : pdfeTeX, 3.141592-1.30.3-2.2 (Web2C 7.5.5)
  context : ver: 2005.07.27
  cont-en : ver: 2005.07.27  fmt: 2005.10.1  mes: english

   total run time : 2 seconds
---
The context code:

---
\language[de]

\setupcolors[state=start]
\setupoutput[pdftex]
\setuppapersize[A4][A4]

\setuppagenumbering[location={footer,right}]
\setupfootertexts[][{Seite \pagenumber{} von \totalnumberofpages}]

\starttext
% in the metapost_test is the code from page 118 = beginfig(21) ;...
\startMPrun
 input metapost_test;
\stopMPrun

\externalfile[mprun.21][width=5cm]

\showsetups
\showlayout
\stoptext
---

Please can any body help, thx.

al ;-)
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Q: about \externalfile from metafun-p.pdf

2005-10-02 Thread Christopher Creutzig
Alexander Lazic wrote:
 i'm starting to learn context and therefore i have copied some examples
 from metafun-p.pdf and get the following error:
 
 ---
 ! Undefined control sequence.
 l.42 \externalfile
   [mprun.21][width=5cm]

 Probably a typo in metafun-p.pdf; try \externalfigure instead.


Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Q: about \externalfile from metafun-p.pdf

2005-10-02 Thread Alexander Lazic

On Son 02.10.2005 19:54, Christopher Creutzig wrote:


Probably a typo in metafun-p.pdf; try \externalfigure instead.


Thanx this works ;-)

Oh btw: i have see in the syntax-diagramm sin.

1.) is this the sinus function?
2.) i have try

---
\startreusableMPgraphic{sin}

 sin (1);
\stopreusableMPgraphic{sin}

\reuseMPgraphic{sin}
---

and get:

Isolated expression.

Do you know what's going wrong?

al ;-)
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Q: about \externalfile from metafun-p.pdf

2005-10-02 Thread Christopher Creutzig
Alexander Lazic wrote:
 Oh btw: i have see in the syntax-diagramm sin.
 
 1.) is this the sinus function?

 Sure.  (The sine function as used by mathematicians.  If you want the
sine of an angle expressed in degrees, I believe you want sind.)

 2.) i have try
 
 ---
 \startreusableMPgraphic{sin}
 
   sin (1);
 \stopreusableMPgraphic{sin}

 This {sin} at the end is wrong; it's interpreted as text.

 
 \reuseMPgraphic{sin}
 ---
 
 and get:
 
 Isolated expression.
 
 Do you know what's going wrong?

 It's the same error as trying to “plot” the MP code

 1;

MetaPost is confused since it has no idea what to do with that number
and tells you so.  Since MP can handle more than just numbers, you get a
slightly more general error message that talks about an “expression”
rather than a “number.”


 What you can do is something like

\starttext

\startusableMPgraphic{sin}
  for x := 0 step 0.6282 until 6.282:
drawdot(10*x, 10*sin(x)) withpen pencircle scaled 1pt;
  endfor
\stopusableMPgraphic

\useMPgraphic{sin}

\stoptext


Or, you can use the fact that in MetaPost you can build up an expression
within a for loop as follows:


\starttext

\startusableMPgraphic{sin}
  draw (0,0)
  for x := 0 step 0.2 until 6.282: ..(10*x, 10*sin(x)) endfor;
\stopusableMPgraphic

\useMPgraphic{sin}

\stoptext


 I think it really helps with MP programming to understand this type of
loops.


Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] puzzling metafun graphics

2005-09-13 Thread Adam Lindsay
Hans Hagen said this at Mon, 12 Sep 2005 19:38:25 +0200:

Thomas A. Schmitz wrote:

 OK, I'm answering my own post. The plot thickens. It looks like this  
 has something to do with file names. It only happens when I have a  
 name with a period in it.

 Bug or feature? You decide, Hans!

bug; but does this mean that the old texexec works ok? 

Hang on, could this have to do with the following web2c setting?
 allow_multiple_suffixes = f

(as seen in minstall.pdf...)
-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Adam T. Lindsay, Computing Dept. [EMAIL PROTECTED]
 Lancaster University, InfoLab21+44(0)1524/510.514
 Lancaster, LA1 4WA, UK Fax:+44(0)1524/510.492
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] puzzling metafun graphics

2005-09-13 Thread Thomas A. Schmitz
Hmm -- this is getting curioser and curioser... 
I just verified on my linux partition, and I can confirm that 
I don't have the problem there; it's only in OS X. (I'm having 
different problems with my linux install, but that'll be 
another post...). So Adam's educated guess that it must be some
 setting in a config file is more  than probably right. I'll 
keep you posted about this.

On Tue, 2005-09-13 at 10:26 +0100, Adam Lindsay wrote:
 Hans Hagen said this at Mon, 12 Sep 2005 19:38:25 +0200:
 
 Thomas A. Schmitz wrote:
 
  OK, I'm answering my own post. The plot thickens. It looks like this  
  has something to do with file names. It only happens when I have a  
  name with a period in it.
 
  Bug or feature? You decide, Hans!
 
 bug; but does this mean that the old texexec works ok? 
 
 Hang on, could this have to do with the following web2c setting?
  allow_multiple_suffixes = f
 
 (as seen in minstall.pdf...)

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] puzzling metafun graphics

2005-09-13 Thread Hans Hagen

Thomas A. Schmitz wrote:


OK, I'm back on OS X and checked:

1. created file 01_01_01.tex with this content:
\starttext

\startuseMPgraphic{circle}

draw fullcircle scaled 10 cm ;

\stopuseMPgraphic

\useMPgraphic{circle}

\stoptext

compiled fine; circle was there.

2. copied file to 01.01.01.tex. Compilation does not give errors, but  
there is no visible output.


3. Treid setting allow_multiple_suffixes = t in texmf.cnf - no  
difference.


Puzzled

Thomas


it's a tricky thins: 

in order to determine a suffix programs/scripts assume that in 01.01.01 the last 01 is the suffix (there is no rule that tex is the suffix, it's just the built in fallback); 


someprogram 01.01.01
someprogram 01.01.01.tex 

is different. The multiple suffixes always test for a tex file first but that results in two file searches each time (slows down). 

texexec 01.01.01.tex works ok 
texexec 01.01.01 fails 

newtexexec fails in both cases (i will look into that) 


It's kind of tricky to auto append tex since nowadasy we have xml and other 
variants ..

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
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] puzzling metafun graphics

2005-09-12 Thread Thomas A. Schmitz
This one hast just cost me two hours, and I'm still baffled. The  
story (in shorthand):  was trying to integrate a positional metafun  
graphic into a presentation. I got no output. I tried making a  
minimal example file to reproduce the problem, and sure enough,  
everything went fine. I rebuilt the entire file, by pasting one  
paragraph of the original file at a time, and I got exactly the  
output I wanted. [Drumroll] I deleted the original file and  
everything associated with it [i.e. all those .tui and .tuo etc.],  
saved the new file from my /tmp directory to my working directory,  
and -- I got no output again. diff shows that both files are  
identical. Looking at the logs, there's only one difference I can spot:


 \openout5 = `test-mpgraph.mp'.
---
 \openout5 = `05.11.08-mpgraph.mp'.
205,206c206,207
  [MP to PDF] (./test-mpgraph.1) [MP to PDF] (./test-mpgraph.2)
 [MP to PDF] (./test-mpgraph.3)
---
  [MP 05.11.08-mpgraph.1] [MP 05.11.08-mpgraph.2]
 [MP 05.11.08-mpgraph.3]
211c212
 systems : end file test at line 426
---
 systems : end file 05.11.08 at line 426
213c214
 [flush and process test-mpgraph.mp afterwards] )
---
 [flush and process 05.11.08-mpgraph.mp afterwards] )

The MP to PDF part is missing from the file 05.11.08, which might  
explain why I don't see anything in the resulting pdf. But why? Can  
anybody enlighten me why the same file can behave differently? And  
how I can coax ConTeXt into running this MP to PDF thingy? Thanks


Thomas
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] puzzling metafun graphics

2005-09-12 Thread Thomas A. Schmitz
OK, I'm answering my own post. The plot thickens. It looks like this  
has something to do with file names. It only happens when I have a  
name with a period in it. Thusly, file 05.11.08.tex will not run MP  
to PDF, when I copy the exact same file to 05_11_08.tex, everything  
works as it should.


This may have something to do with the fact (as I just found out)  
that newtexexec doesn't even want to touch these files. I have two  
identical files in a directory, one called 05.10.18.tex, the other  
05_10_18.tex. Here's what happens when I run newtexexec on them:


TeXExec | processing document '05.10.18.tex'
TeXExec | runtime: 0.006379

(and that's it. No output, no action)

TeXExec | processing document '05_10_18.tex'
TeXExec | tex processing method: context
TeXExec | TeX run 1
TeXExec | tex engine: pdfetex
TeXExec | tex format: cont-en
TeXExec | progname: context
This is pdfeTeX, Version 3.141592-1.30.3-2.2 (Web2C 7.5.5)
\write18 enabled.
entering extended mode
(./05_10_18.tex

ConTeXt  ver: 2005.09.08  fmt: 2005.9.9  int: english  mes: english

[snip]

and so on.

Bug or feature? You decide, Hans!

Best

Thomas

On Sep 12, 2005, at 5:45 PM, Thomas A. Schmitz wrote:

This one hast just cost me two hours, and I'm still baffled. The  
story (in shorthand):  was trying to integrate a positional metafun  
graphic into a presentation. I got no output. I tried making a  
minimal example file to reproduce the problem, and sure enough,  
everything went fine. I rebuilt the entire file, by pasting one  
paragraph of the original file at a time, and I got exactly the  
output I wanted. [Drumroll] I deleted the original file and  
everything associated with it [i.e. all those .tui and .tuo etc.],  
saved the new file from my /tmp directory to my working directory,  
and -- I got no output again. diff shows that both files are  
identical. Looking at the logs, there's only one difference I can  
spot:


 \openout5 = `test-mpgraph.mp'.
---
 \openout5 = `05.11.08-mpgraph.mp'.
205,206c206,207
  [MP to PDF] (./test-mpgraph.1) [MP to PDF] (./test-mpgraph.2)
 [MP to PDF] (./test-mpgraph.3)
---
  [MP 05.11.08-mpgraph.1] [MP 05.11.08-mpgraph.2]
 [MP 05.11.08-mpgraph.3]
211c212
 systems : end file test at line 426
---
 systems : end file 05.11.08 at line 426
213c214
 [flush and process test-mpgraph.mp afterwards] )
---
 [flush and process 05.11.08-mpgraph.mp afterwards] )

The MP to PDF part is missing from the file 05.11.08, which might  
explain why I don't see anything in the resulting pdf. But why? Can  
anybody enlighten me why the same file can behave differently? And  
how I can coax ConTeXt into running this MP to PDF thingy? Thanks


Thomas
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context



___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] puzzling metafun graphics

2005-09-12 Thread Taco Hoekwater

Thomas A. Schmitz wrote:
working directory,  and -- I got no output again. diff shows that both 
files are  identical. Looking at the logs, there's only one difference I 
can spot:


Perhaps it can be that something decides that your file has the
interesting filename extension '11.08-mpgraph.mp' instead of just
'.mp'?

Taco
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] puzzling metafun graphics

2005-09-12 Thread Hans Hagen

Thomas A. Schmitz wrote:

OK, I'm answering my own post. The plot thickens. It looks like this  
has something to do with file names. It only happens when I have a  
name with a period in it. Thusly, file 05.11.08.tex will not run MP  
to PDF, when I copy the exact same file to 05_11_08.tex, everything  
works as it should.


This may have something to do with the fact (as I just found out)  
that newtexexec doesn't even want to touch these files. I have two  
identical files in a directory, one called 05.10.18.tex, the other  
05_10_18.tex. Here's what happens when I run newtexexec on them:


TeXExec | processing document '05.10.18.tex'
TeXExec | runtime: 0.006379

(and that's it. No output, no action)

TeXExec | processing document '05_10_18.tex'
TeXExec | tex processing method: context
TeXExec | TeX run 1
TeXExec | tex engine: pdfetex
TeXExec | tex format: cont-en
TeXExec | progname: context
This is pdfeTeX, Version 3.141592-1.30.3-2.2 (Web2C 7.5.5)
\write18 enabled.
entering extended mode
(./05_10_18.tex

ConTeXt  ver: 2005.09.08  fmt: 2005.9.9  int: english  mes: english

[snip]

and so on.

Bug or feature? You decide, Hans!


bug; but does this mean that the old texexec works ok? 

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
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] puzzling metafun graphics

2005-09-12 Thread Hans Hagen

Thomas A. Schmitz wrote:

This one hast just cost me two hours, and I'm still baffled. The  
story (in shorthand):  was trying to integrate a positional metafun  
graphic into a presentation. I got no output. I tried making a  
minimal example file to reproduce the problem, and sure enough,  
everything went fine. I rebuilt the entire file, by pasting one  
paragraph of the original file at a time, and I got exactly the  
output I wanted. [Drumroll] I deleted the original file and  
everything associated with it [i.e. all those .tui and .tuo etc.],  
saved the new file from my /tmp directory to my working directory,  
and -- I got no output again. diff shows that both files are  
identical. Looking at the logs, there's only one difference I can spot:


 \openout5 = `test-mpgraph.mp'.
---
 \openout5 = `05.11.08-mpgraph.mp'.
205,206c206,207
  [MP to PDF] (./test-mpgraph.1) [MP to PDF] (./test-mpgraph.2)
 [MP to PDF] (./test-mpgraph.3)
---
  [MP 05.11.08-mpgraph.1] [MP 05.11.08-mpgraph.2]
 [MP 05.11.08-mpgraph.3]
211c212
 systems : end file test at line 426
---
 systems : end file 05.11.08 at line 426
213c214
 [flush and process test-mpgraph.mp afterwards] )
---
 [flush and process 05.11.08-mpgraph.mp afterwards] )

The MP to PDF part is missing from the file 05.11.08, which might  
explain why I don't see anything in the resulting pdf. But why? Can  
anybody enlighten me why the same file can behave differently? And  
how I can coax ConTeXt into running this MP to PDF thingy? Thanks


So the only difference in the source files is the filename? (should not 
make much of a difference because mp conversion is rather stupid)


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
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] puzzling metafun graphics

2005-09-12 Thread Thomas A. Schmitz
Well, at least the old texexec processes the file. However, the  
problem with metafun graphics I described occurs in the old texexec  
(I'm not at all sure if the two problems are related).


Thomas

On Sep 12, 2005, at 7:38 PM, Hans Hagen wrote:


bug; but does this mean that the old texexec works ok?
Hans



___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] puzzling metafun graphics

2005-09-12 Thread Hans Hagen

Thomas A. Schmitz wrote:

Well, at least the old texexec processes the file. However, the  
problem with metafun graphics I described occurs in the old texexec  
(I'm not at all sure if the two problems are related).


can you make me a smal test file? 

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
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] A question on drawing functions in MetaFun

2005-08-15 Thread Hans Hagen

Jin-Hwan Cho wrote:


On Aug 13, 2005, at 1:10 AM, Hans Hagen wrote:


\defineframed[Shaped][background=Shape,frame=off,location=low]



Thanks. Still I could not get the right figure with

\setuplayer[BackLayer][direction=reverse]

Even though direction=reverse option was given, I got only the first
figure. Means that the option did not work. Hope anyone fix my problem
by checking the attached sample.


it took me a while to uncover but ... in page-lyr, 


\doifnotvalue{\layerparameter\c!direction}\v!reverse{\box\layerpagebox}%
   
should be 


\doifnot{\layerparameter\c!direction}\v!reverse{\box\layerpagebox}%

(bug introduced when \layerparameter was added) 

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
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] A question on drawing functions in MetaFun

2005-08-12 Thread Jin-Hwan Cho

On Aug 11, 2005, at 8:26 AM, Hans Hagen wrote:

StartPage .. StopPage will make a graphic as large as the current  
page; dimensions are passed by context to mp, but this happens  
before the graphic is drawn; so, the graphic becomes (default) a4.

just omit the StartPage .. StopPage (the inner ones)


Got it. Thanks a lot. Could you tell me the answer of my previous  
posting

on Aug 11, about \Shaped definition?

Best, ChoF.
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] A question on drawing functions in MetaFun

2005-08-12 Thread Vit Zyka

Jin-Hwan Cho wrote:

On Aug 11, 2005, at 8:26 AM, Hans Hagen wrote:

StartPage .. StopPage will make a graphic as large as the current  
page; dimensions are passed by context to mp, but this happens  before 
the graphic is drawn; so, the graphic becomes (default) a4.

just omit the StartPage .. StopPage (the inner ones)



Got it. Thanks a lot. Could you tell me the answer of my previous  posting
on Aug 11, about \Shaped definition?


Try to play with
  \defineframed[Shaped][...=...]
  \Shaped{...}

vit
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] A question on drawing functions in MetaFun

2005-08-12 Thread Jin-Hwan Cho

On Aug 12, 2005, at 7:15 PM, Vit Zyka wrote:


\defineframed[Shaped][...=...]


Thanks. However what I wanted to know was the definition of \Shaped
which generates the second figure in p.145 of metafun-p.pdf (the oval
shape in the second line went to under the first oval).

Best, ChoF.
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] A question on drawing functions in MetaFun

2005-08-12 Thread Hans Hagen

Jin-Hwan Cho wrote:


On Aug 12, 2005, at 7:15 PM, Vit Zyka wrote:


\defineframed[Shaped][...=...]



Thanks. However what I wanted to know was the definition of \Shaped
which generates the second figure in p.145 of metafun-p.pdf (the oval
shape in the second line went to under the first oval).


\startbuffer[def]
\defineframed[Shaped][background=Shape,frame=off,location=low]
\stopbuffer

\getbuffer[def]

We can now put this background shape behind the running text,
for instance with:

\startbuffer
 some \inframed[background=Shape]{text} with a frame ...
 some \Shaped{text} with a frame ...
\stopbuffer

\typebuffer

\startlines
\getbuffer
\stoplines

The \type {\Shaped} macro was defined as:

\typebuffer[def]


this last line had no [def] so the wrong buffer was shown; it's indeed defined 
by \defineframed[Shapes]


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
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] A question on drawing functions in MetaFun

2005-08-12 Thread Jin-Hwan Cho

On Aug 13, 2005, at 1:10 AM, Hans Hagen wrote:


\defineframed[Shaped][background=Shape,frame=off,location=low]


Thanks. Still I could not get the right figure with

\setuplayer[BackLayer][direction=reverse]

Even though direction=reverse option was given, I got only the first
figure. Means that the option did not work. Hope anyone fix my problem
by checking the attached sample.

Best, ChoF.



ch53-2.tex
Description: Binary data
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] A question on drawing functions in MetaFun

2005-08-12 Thread Vit Zyka

Jin-Hwan Cho wrote:

On Aug 13, 2005, at 1:10 AM, Hans Hagen wrote:


\defineframed[Shaped][background=Shape,frame=off,location=low]



Thanks. Still I could not get the right figure with

\setuplayer[BackLayer][direction=reverse]

Even though direction=reverse option was given, I got only the first


Ou, now I understand. I got exactly the same result as you. Seems 
'direction' is ommited. The only relevant occurence in the source is in 
the core-lyr.tex, but sorry, I have no solution.


vit


figure. Means that the option did not work. Hope anyone fix my problem
by checking the attached sample.

Best, ChoF.

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] A question on drawing functions in MetaFun

2005-08-12 Thread Hans Hagen

Vit Zyka wrote:


Jin-Hwan Cho wrote:


On Aug 13, 2005, at 1:10 AM, Hans Hagen wrote:


\defineframed[Shaped][background=Shape,frame=off,location=low]




Thanks. Still I could not get the right figure with

\setuplayer[BackLayer][direction=reverse]

Even though direction=reverse option was given, I got only the first



Ou, now I understand. I got exactly the same result as you. Seems 
'direction' is ommited. The only relevant occurence in the source is 
in the core-lyr.tex, but sorry, I have no solution.


i'll have a look at it

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
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] \Shaped macro in MetaFun manual

2005-08-10 Thread Jin-Hwan Cho
The third line in the page 145 in the MetaFun manual (metafun-p.pdf)  
says


The \Shaped macro was defined as:

    some \inframed[background=Shape]{text} with a frame ...
    some \Shaped{text} with a frame ...

It seems to be a typo. Let me know the exact definition of \Shaped  
macro.


Thanks in advance.

Best, ChoF.
~   ***
| Cho, Jin-Hwan == ChoF |   ^ ^
~~~  o
| Dept. of Mathematics| ---
| The University of Suwon |  |
~~~  |
| Korean TeX Users Group  |  |
| http://www.ktug.or.kr   |  |
~~~  |
| [EMAIL PROTECTED] | ***
~~~

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Draw a line with Metafun

2005-08-08 Thread Hans Hagen

Jessica Holle wrote:


Hi,

I want to draw a line myself with Metafun.
This line should looks like in the module pre-05.

I've copied a few lines and try to understand what there happend.
But it failed. I've also read in the metafun.pdf, but it ist very
hard to understand.

I don't see the context between the numbers of x ond y. When I
change the numbers the output varies but in no relation to the
numbers.

Can anyone help to explain this to me or has another documentation?

so looks my test:

\setupoutput[pdftex]
\setupcolors[state=start]
\definecolor[back2][r=.6,g=.7,b=.8]
\definecolor[back][s=.95]
\starttext
\startMPinclusions
def random_hash_frame (expr width, height, offset, linewidth ) =
def delta = ((uniformdeviate .5offset) + .25offset) enddef ;
x1 := 0.5cm ; y1 :=0.5cm ; x2 := 16cm ; y2 := 3cm ;
drawoptions(withpen pencircle scaled linewidth withcolor
\MPcolor{back2}) ;
fill z1--(x2,y1)--z2--(x1,y2)--cycle ;
enddef;
\stopMPinclusions
\startuseMPgraphic{jessi}
random_hash_frame(height,width, 0.5cm,0.5cm)
 


   10cm,5cm

or whatever, you need to provide some known measures


\stopuseMPgraphic
\useMPgraphic{jessi}
\stoptext
 

think of z1 being equivalent to (x1,y1) 

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
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] metafun not working

2005-07-07 Thread Hans Hagen

Mojca Miklavec wrote:

pstoedit now doesn't crash any more, but 'P' or 'O' for example don't 
have holes any more. I'll try to reinstall my cygwin or to compile the 
source of pstoedit on Linux later. If I understood correctly than this 
patch should solve the problem and -ssp should work again.


do you need a cygwin version on windows? there is a regular one

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
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] metafun not working

2005-06-30 Thread piskala upendran
hi wolfgang and all,

I did configured the pstoedit as you said and
generated new metafun.mem.
Compilation of makempy complains of 

process aborted : invalid 'texexec --batch -- once
--interface=en --pdf' run

I did check pdftops as per requirement of mmakempy.pdf
manual. pdftops.exe is not available in miktex/bin/.

what does the error message point at. do I have to to
install pdftops.exe. or configure from somewhere else.
gsview 4.7 does not provide pdftops but pdftotxt3.exe

I am attaching the makeMPY generated file.

thanks all

%--  


 MakeMPY 1.1 - MetaFun / PRAGMA ADE 2000-2004

   processing file : MP-mpgraph.mpo
tex format : context
   requested texts : 1
generating : pdf file
processing aborted : invalid `texexec --batch
--once --interface=en --pdf' run
  second MP run needed : text graphics found
  metapost : MP-mpgraph
format : metafun

total run time : 1 seconds
[MP to PDF] (./MP-mpgraph.1)
[1.1{original-empty.map}{original-base.map}{ec-pub
lic-lm.map}{ec-base.map}{original-ams-base.map}{original-public-lm.map}]
systems : end file MP at line 10

){ec-lm.enc}f:\texmf\fonts\type1\public\lm\lmr12.pfb
Output written on MP.pdf (1 page, 5654 bytes).
Transcript written on MP.log.

   return code : 0
  run time : 3 seconds
  sorting and checking : running texutil

%__ 

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] metafun not working

2005-06-29 Thread luigi.scarso
-mpgraph.mp

TeXExec 5.2.3 - ConTeXt / PRAGMA ADE 1997-2004

 metapost : MP-mpgraph
   format : metafun
This is MetaPost, Version 0.641 (Web2C 7.4.5)
(/usr/share/texmf/web2c/natural.tcx)
(MP-mpgraph.mp [1]
metafun 2005-3-7 13:31
)
1 output file written: MP-mpgraph.1
Transcript written on MP-mpgraph.log.

MakeMPY 1.1 - MetaFun / PRAGMA ADE 2000-2004

  processing file : MP-mpgraph.mpo
   tex format : context
  requested texts : 1
   generating : pdf file
   generating : metapost file
pstoedit: version 3.40 / DLL interface 108 (build Jun 29 2005 - release 
build) : Copyright (C) 1993 - 2005 Wolfgang Glunz

  processed texts : 1
produced file : MP-mpgraph.mpy
 second MP run needed : text graphics found
 metapost : MP-mpgraph
   format : metafun
This is MetaPost, Version 0.641 (Web2C 7.4.5)
(/usr/share/texmf/web2c/natural.tcx)
(MP-mpgraph.mp (MP-mpgraph.mpy
! A statement can't begin with `{'.
to be read again
to be read again
  {
---{
curl1}..{curl1}
l.37 --
  cycle;
?

MP-mpgraph.mpy:
% mpochecksum : 8298
begingraphictextfig(1);
linecap := butt;
linejoin := mitered;
fill (27.4968,79.3826)..controls (26.6599,81.6541) and 
(26.5403,82)..(23.7905,82)

   --(5.26001,82)--(5.26001,79)--(7.65112,79)
   ..controls (16.2588,79) and (16.9998,77.6316)..(16.9998,72.5681)
   --(16.9998,12.314)..controls (16.9998,9.08618) and 
(16.6174,3.00024)..(5.26001,3.00024)
   --(5.26001,0.000244141)..controls (8.36841,0.239258) and 
(14.7046,0.239258)..(18.052,0.239258)
   ..controls (21.3994,0.239258) and 
(27.7356,0.239258)..(30.844,0.000244141)
   --(30.844,3.00024)..controls (19.4866,3.00024) and 
(19.9998,8.91602)..(19.9998,12.314)

   --(19.9998,77.5894)--(19.6062,77.5894)--(48.4182,2.27173)
   ..controls (48.8965,0.956543) and 
(49.2551,0.000244141)..(50.4507,0.000244141)
   ..controls (51.5266,0.000244141) and 
(51.7656,0.5979)..(52.4829,2.39111)

   --(81.5339,79)--(81.9995,79)--(81.9995,9.08594)
   ..controls (81.9995,4.6626) and (81.627,3)..(72.6873,3)
   --(70.2961,3)--(70.2961,0)..controls (73.0459,0.239014) and 
(82.6101,0.239014)..(86.0771,0.239014)

   ..controls (89.5442,0.239014) and (99.1084,0.239014)..(101.858,0)
   --(101.858,3)--(99.467,3)..controls (90.8594,3) and 
(90.9995,4.29517)..(90.9995,9.08594)
   --(90.9995,72.5681)..controls (90.9995,76.9915) and 
(91.3381,79)..(99.467,79)

   --(101.858,79)--(101.858,82)--(83.3276,82)
   --cycle;
fill (133.3,38)--(133,39.9998)--(133,73.4045)
   ..controls (133,77.3499) and (133.241,78.9998)..(138.561,78.9998)
   --(149.798,78.9998)..controls (169.166,78.9998) and 
(169,64.9016)..(169,59.5369)

   ..controls (169,54.5156) and (169.166,40)..(149.679,40)
   --(133,39.9998)--(133.3,38)--(153.505,38)
   ..controls (167.492,38) and (180,47.4524)..(180,59.5369)
   ..controls (180,71.1333) and (168.522,81.9998)..(152.548,81.9998)
   --(112.259,81.9998)--(112.259,78.9998)--(114.65,78.9998)
   ..controls (123.258,78.9998) and (123,77.6313)..(123,72.5679)
   --(123,9.08569)..controls (123,4.66235) and 
(122.666,2.99976)..(114.65,2.99976)
   --(112.259,2.99976)--(112.259,-0.000244141)..controls 
(115.128,0.23877) and (124.932,0.23877)..(128.399,0.23877)
   ..controls (131.985,0.23877) and 
(141.789,0.23877)..(144.658,-0.000244141)
   --(144.658,2.99976)--(142.267,2.99976)..controls 
(133.659,2.99976) and (133.3,4.29492)..(133.3,9.08569)

   --cycle;
--cycle;


well, one of  my bad day ?

luigi
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] metafun not working

2005-06-29 Thread Taco Hoekwater

luigi.scarso wrote:

MP.tex  does not work for me.


[...]


(141.789,0.23877)..(144.658,-0.000244141)
   --(144.658,2.99976)--(142.267,2.99976)..controls 
(133.659,2.99976) and (133.3,4.29492)..(133.3,9.08569)

   --cycle;
--cycle;


well, one of  my bad day ?


Looks like it. The last line in the mpy file
should have been:

  endgraphictextfig;

not --cycle.

Can you try this?

   makempy --force --noclean MP-mpgraph.mpo

The last lines in the (now kept) mpy-MP-mpgraph.tmp should be

--cycle;
  endfig;
  end

If not, your pstoedit is broken. If yes, your makempy script
is broken.

Good luck, Taco
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] metafun not working

2005-06-29 Thread Hans Hagen

luigi.scarso wrote:

MP.tex  does not work for me.


it works ok here


MP.tex:
\starttext
\startMPcode
graphictext MP scaled 8 outlinefill
withdrawcolor .7blue withfillcolor .7white dashed
evenly withpen
pencircle scaled 2pt ;
\stopMPcode


\stoptext


(133.659,2.99976) and (133.3,4.29492)..(133.3,9.08569)
   --cycle;
--cycle;
 
well, one of  my bad day ?


seems so, this stand alone --cycle does not look good. See taco's previosu 
response.


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
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] metafun not working

2005-06-29 Thread luigi.scarso

Taco Hoekwater wrote:




   makempy --force --noclean MP-mpgraph.mpo

The last lines in the (now kept) mpy-MP-mpgraph.tmp should be

--cycle;
  endfig;
  end


no, again

   --(144.658,2.99976)--(142.267,2.99976)..controls 
(133.659,2.99976) and (133.3,4.29492)..(133.3,9.08569)

   --cycle;
--cycle;


If not, your pstoedit is broken.


It seem that last pstoedit for linux is  broken.

I make MP.tex with  my old-friend 
Context.2002--still_crazy_after_all_these_years--, and pstoedit 3.33 and 
no problems.



luigi


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] metafun not working

2005-06-29 Thread luigi.scarso

MP.tex works after downgrading to pstoedit 3.33

luigi

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] metafun not working

2005-06-29 Thread Wolfgang Zillig

Hello,

I have problems with this graphic too. First I noticed that I don't have 
pstoedit installed on my computer. I downloaded version 3.40 from 
http://www.pstoedit.net/pstoedit. When I now run this MP code I get a 
Windows (xp) errormessage: Unhandled exception in pstoedit.exe 
(STDDRIVERS.DLL): 0xC005: Access Violation. But I get the graphic 
rendered.


Any suggestions?

Wolfgang
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] metafun not working

2005-06-29 Thread luigi.scarso

Wolfgang Zillig wrote:


Hello,

I have problems with this graphic too. First I noticed that I don't 
have pstoedit installed on my computer. I downloaded version 3.40 from 
http://www.pstoedit.net/pstoedit. When I now run this MP code I get a 
Windows (xp) errormessage: Unhandled exception in pstoedit.exe 
(STDDRIVERS.DLL): 0xC005: Access Violation. But I get the graphic 
rendered.


Any suggestions?


hmm, try on ctan:

ctan/support/pstoedit/windows

It should be an older (3.31) but good version .

luigi

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Re: metafun not working

2005-06-29 Thread Mojca Miklavec
luigi.scarso wrote:

 hmm, try on ctan:
 
 ctan/support/pstoedit/windows
 
 It should be an older (3.31) but good version .

cited from the webpage:

New or changed in 3.32:
...
workaround to cope with a change introduced since ghostscript 7.04.
Some new operators were added to ghostscript's internal array of
operators without increasing the maximum size of the array. This led
to the problem, that pstoedit couldn't add further operators.
...

I tried it out before reading that paragraph and I can approve: unless
you have an ancient GS, it doesn't work at all. 3.40 at least does
something even though it crashes.

Mojca
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


<    5   6   7   8   9   10   11   >