ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* error with _dojoin ?
@ 2000-12-07 15:29 Denis B. Roegel
  2000-12-07 17:07 ` Hans Hagen
  2000-12-07 22:10 ` Hans Hagen
  0 siblings, 2 replies; 7+ messages in thread
From: Denis B. Roegel @ 2000-12-07 15:29 UTC (permalink / raw)
  Cc: Denis B. Roegel

I am trying to use the boxes.mp file with context and
I get an error with _dojoin:

...
\startuseMPgraphic{prelim}
input boxes; % bibliothèque d'encadrés
\stopuseMPgraphic

Later I have things like:

  picture cercle;fill fullcircle scaled 4mm;
  cercle:=currentpicture;currentpicture:=nullpicture;
  circleit.n1(cercle);circleit.n2(cercle);

Apparently, the second circleit triggers an error:

This is MetaPost, Version 0.641 (Web2C 7.3.2x) (mem=metafun 2000.10.27)  27 OCT 
2000 16:26
**&metafun test40-mpgraph
(test40-mpgraph.mp
{randomseed:=2616}
(/usr/local/tex/texmf/metapost/base/boxes.mp)
>> _dojoin
! Isolated expression.
<to be read again> 
                   (
endbox_->if.known.pic_.prevbox:_dojoin(
                                       prevbox,(SUFFIX1));fi.def.prevbox=(SU...

circleit->...(SUFFIX2));endbox_(clearc_,(SUFFIX2))
                                                  ;endgroup
l.121 circleit.n2(cercle)
                         ;
I couldn't find an `=' or `:=' after the
expression that is shown above this error message,
so I guess I'll just ignore it and carry on.

! Extra tokens will be flushed.
...

--------
Is this normal?

Thanks,

Denis


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: error with _dojoin ?
  2000-12-07 15:29 error with _dojoin ? Denis B. Roegel
@ 2000-12-07 17:07 ` Hans Hagen
  2000-12-07 17:13   ` Denis B. Roegel
  2000-12-07 17:17   ` Denis B. Roegel
  2000-12-07 22:10 ` Hans Hagen
  1 sibling, 2 replies; 7+ messages in thread
From: Hans Hagen @ 2000-12-07 17:07 UTC (permalink / raw)
  Cc: ntg-context, Denis B. Roegel

At 04:29 PM 12/7/00 +0100, Denis B. Roegel wrote:
>I am trying to use the boxes.mp file with context and
>I get an error with _dojoin:

>Is this normal?

That depends on what boxit does. I took a quick look at the code and it
looks like a picture collector hooked into extra begin/endfig. Somehow
_dojoin is not defined at some outer level, and nilling it (def
_dojoin(suffix a,b)  = enddef; as well as nilling clearboxes makes the
error disappear but i got no picture then. 

Hans  
-------------------------------------------------------------------------
                                                  Hans Hagen | PRAGMA ADE
                      Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: error with _dojoin ?
  2000-12-07 17:07 ` Hans Hagen
@ 2000-12-07 17:13   ` Denis B. Roegel
  2000-12-07 22:53     ` Hans Hagen
  2000-12-07 17:17   ` Denis B. Roegel
  1 sibling, 1 reply; 7+ messages in thread
From: Denis B. Roegel @ 2000-12-07 17:13 UTC (permalink / raw)
  Cc: Denis B. Roegel, ntg-context, Denis B. Roegel

`Hans Hagen' wrote
>   
>   At 04:29 PM 12/7/00 +0100, Denis B. Roegel wrote:
>   >I am trying to use the boxes.mp file with context and
>   >I get an error with _dojoin:
>   
>   
>   >Is this normal?
>   
>   That depends on what boxit does. I took a quick look at the code and it
>   looks like a picture collector hooked into extra begin/endfig. Somehow
>   _dojoin is not defined at some outer level, and nilling it (def
>   _dojoin(suffix a,b)  = enddef; as well as nilling clearboxes makes the
>   error disappear but i got no picture then. 
>   

I'll try to nil _dojoin.

This problem only occurs with metafun. Something in metafun
triggers it. I am trying to port some metapost code
(that's working) within context.

Denis


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: error with _dojoin ?
  2000-12-07 17:07 ` Hans Hagen
  2000-12-07 17:13   ` Denis B. Roegel
@ 2000-12-07 17:17   ` Denis B. Roegel
  1 sibling, 0 replies; 7+ messages in thread
From: Denis B. Roegel @ 2000-12-07 17:17 UTC (permalink / raw)
  Cc: Denis B. Roegel, ntg-context, Denis B. Roegel

`Hans Hagen' wrote
>   
>   At 04:29 PM 12/7/00 +0100, Denis B. Roegel wrote:
>   >I am trying to use the boxes.mp file with context and
>   >I get an error with _dojoin:
>   
>   
>   >Is this normal?
>   
>   That depends on what boxit does. I took a quick look at the code and it
>   looks like a picture collector hooked into extra begin/endfig. Somehow
>   _dojoin is not defined at some outer level, and nilling it (def
>   _dojoin(suffix a,b)  = enddef; as well as nilling clearboxes makes the
>   error disappear but i got no picture then. 

And it still does not work:

This is MetaPost, Version 0.641 (Web2C 7.3.2x) (mem=metafun 2000.10.27)  27 OCT 
2000 16:26
**&metafun test40-mpgraph
(test40-mpgraph.mp
{randomseed:=2592}
(/usr/local/tex/texmf/metapost/base/boxes.mp)
! MetaPost capacity exceeded, sorry [input stack size=300].
clearboxes->clearboxes
                      .clearc_(n1);clearc_(n2);clearc_(n3);clearc_(n4);clear...

clearboxes->clearboxes
                      .clearc_(n1);clearc_(n2);clearc_(n3);clearc_(n4);clear...

...
clearboxes->clearboxes
                      .clearc_(n1);clearc_(n2);clearc_(n3);clearc_(n4);clear...
<scantokens> ... reset_extra_specials ; clearboxes
                                                  ;
<to be read again> 
                   ;
endfig->scantokens.extra_endfig;
                                shipit;endgroup
l.167 endfig
            ;
If you really absolutely need more capacity,
you can ask a wizard to enlarge me.

Denis


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: error with _dojoin ?
  2000-12-07 15:29 error with _dojoin ? Denis B. Roegel
  2000-12-07 17:07 ` Hans Hagen
@ 2000-12-07 22:10 ` Hans Hagen
  2000-12-08 12:32   ` Denis B. Roegel
  1 sibling, 1 reply; 7+ messages in thread
From: Hans Hagen @ 2000-12-07 22:10 UTC (permalink / raw)
  Cc: ntg-context, Denis B. Roegel

At 04:29 PM 12/7/00 +0100, Denis B. Roegel wrote:
>I am trying to use the boxes.mp file with context and
>I get an error with _dojoin:
>
>...
>\startuseMPgraphic{prelim}
>input boxes; % bibliothèque d'encadrés
>\stopuseMPgraphic
>
>Later I have things like:
>
>  picture cercle;fill fullcircle scaled 4mm;
>  cercle:=currentpicture;currentpicture:=nullpicture;
>  circleit.n1(cercle);circleit.n2(cercle);
>
>Apparently, the second circleit triggers an error:

Got it! You need to say: 

\startMPinclusions
input boxes ;
\stopMPinclusions

\startMPcode
picture cercle;fill fullcircle scaled 100mm withcolor red ;
cercle:=currentpicture;currentpicture:=nullpicture;
circleit.n1(cercle);
circleit.n2(cercle);
\stopMPcode

This will load the boxes macro once and outside the begin/endfig, which is
needed since the box package extends begin / endfig and both error
producing macros are defined at beginfig time, which then already has passed. 

BTW, this graphic does not show anything. 

BTW, I have reimplemented [more accurate: extended] the format package to
do real tex labels instead of pseudo ones but currently lack the time to
properly document it. I will do that soon, after which there will be some
powerful label thingies.  

Hans  
-------------------------------------------------------------------------
                                                  Hans Hagen | PRAGMA ADE
                      Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: error with _dojoin ?
  2000-12-07 17:13   ` Denis B. Roegel
@ 2000-12-07 22:53     ` Hans Hagen
  0 siblings, 0 replies; 7+ messages in thread
From: Hans Hagen @ 2000-12-07 22:53 UTC (permalink / raw)
  Cc: Denis B. Roegel, ntg-context, Denis B. Roegel

At 06:13 PM 12/7/00 +0100, Denis B. Roegel wrote:
>This problem only occurs with metafun. Something in metafun
>triggers it. I am trying to port some metapost code
>(that's working) within context.

See previous mail, it also happens in any mp code when you input the boxes
file inside a beginfig. 

Hans
-------------------------------------------------------------------------
                                                  Hans Hagen | PRAGMA ADE
                      Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: error with _dojoin ?
  2000-12-07 22:10 ` Hans Hagen
@ 2000-12-08 12:32   ` Denis B. Roegel
  0 siblings, 0 replies; 7+ messages in thread
From: Denis B. Roegel @ 2000-12-08 12:32 UTC (permalink / raw)
  Cc: Denis B. Roegel, ntg-context, Denis B. Roegel

`Hans Hagen' wrote
>   

>   BTW, this graphic does not show anything. 

That's normal, thanks.

Denis


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2000-12-08 12:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-07 15:29 error with _dojoin ? Denis B. Roegel
2000-12-07 17:07 ` Hans Hagen
2000-12-07 17:13   ` Denis B. Roegel
2000-12-07 22:53     ` Hans Hagen
2000-12-07 17:17   ` Denis B. Roegel
2000-12-07 22:10 ` Hans Hagen
2000-12-08 12:32   ` Denis B. Roegel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).