ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \reuseMPgraphic error
@ 2004-11-04 18:07 David Arnold
  2004-11-04 19:03 ` Matthias Weber
  0 siblings, 1 reply; 5+ messages in thread
From: David Arnold @ 2004-11-04 18:07 UTC (permalink / raw)


All,

This file:

\setupoutput[pdf]

\startreusableMPgraphic{layout 1}
pickup pencircle scaled 1mm;
fill unitsquare xyscaled (7cm,8cm) withcolor 0.85white;
fill unitsquare xyscaled (5cm,5cm) shifted (1cm,1.5cm) withcolor 0.625yellow;
fill unitsquare xyscaled (5cm,1cm) shifted (1cm,0.5cm) withcolor 0.625red;
fill unitsquare xyscaled (5cm,1cm) shifted (1cm,6.5cm) withcolor 0.625red;
draw unitsquare xyscaled (5cm,7cm) shifted (1cm,0.5cm) withcolor 0.25white;
drawarrow (2cm,8cm)--top (2cm,7.5cm);
drawarrow (0cm,7cm)--lft(1cm,7cm);
clip currentpicture to unitsquare xyscaled (7cm,8cm);
\stopreusableMPgraphic


\startreusableMPgraphic{layout 2}
\includeMPgraphic{layout 1}
clip currentpicture to unitsquare scaled 3cm shifted (0,5cm);
currentpicture:=currentpicture scaled 2 shifted (0,-8cm);
setbounds currentpicture to unitsquare xyscaled (6cm,8cm);
\stopreusableMPgraphic



\setupcolors[state=start]

\starttext

Now is the time for all good men to come to the aid of their country.
Now is the time for all good men to come to the aid of their country.
Now is the time for all good men to come to the aid of their country.
Now is the time for all good men to come to the aid of their country.
Now is the time for all good men to come to the aid of their country.
Now is the time for all good men to come to the aid of their country.
Now is the time for all good men to come to the aid of their country.
Now is the time for all good men to come to the aid of their country.

 \hbox
{\reuseMPgraphic{layout 1}\hskip1cm
\reuseMPgraphic{layout 2}}

Now is the time for all good men to come to the aid of their country.
Now is the time for all good men to come to the aid of their country.
Now is the time for all good men to come to the aid of their country.
Now is the time for all good men to come to the aid of their country.
Now is the time for all good men to come to the aid of their country.
Now is the time for all good men to come to the aid of their country.
Now is the time for all good men to come to the aid of their country.
Now is the time for all good men to come to the aid of their country.

\page
Now is the time for all good men to come to the aid of their country.
Now is the time for all good men to come to the aid of their country.
Now is the time for all good men to come to the aid of their country.
Now is the time for all good men to come to the aid of their country.
Now is the time for all good men to come to the aid of their country.
Now is the time for all good men to come to the aid of their country.
Now is the time for all good men to come to the aid of their country.
Now is the time for all good men to come to the aid of their country.

\startlinecorrection[blank]
 \hbox
{\reuseMPgraphic{layout 1}\hskip1cm
\reuseMPgraphic{layout 2}}
\stoplinecorrection

Now is the time for all good men to come to the aid of their country.
Now is the time for all good men to come to the aid of their country.
Now is the time for all good men to come to the aid of their country.
Now is the time for all good men to come to the aid of their country.
Now is the time for all good men to come to the aid of their country.
Now is the time for all good men to come to the aid of their country.
Now is the time for all good men to come to the aid of their country.
Now is the time for all good men to come to the aid of their country.

\stoptext


Produces this error:

ERROR: Undefined control sequence.

--- TeX said ---
\getobject ...->\blabelgroup \let \dohandleobject 
                                                  \dogetobject \csname
\r!ob...
<argument> \includeMPgraphic {layout 1}
                                        clip currentpicture to unitsquare
sc...

\nonowriteMPgraphicline ... \long \edef \ascii {#1
                                                  }\expandafter
\flushMPgrap...

\shortMPflushN ...nowriteMPgraphicline #1#2\MPend 
                                                  \expandafter
\shortMPflush...
<argument> ...itsquare scaled 3cm shifted (0,5cm);

currentpicture:=currentpi...

\writeMPgraphicshortN ... \space \shortMPflushN #1
                                                  \empty ;\relax ;\egroup 
...
l.40 \reuseMPgraphic{layout 2}}
                               
--- HELP ---
TeX encountered an unknown command name. You probably misspelled the
name. If this message occurs when a LaTeX command is being processed,
the command is probably in the wrong place---for example, the error
can be produced by an \item command that's not inside a list-making
environment. The error can also be caused by a missing \documentstyle
command.

Any ideas?

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

* Re: \reuseMPgraphic error
  2004-11-04 18:07 \reuseMPgraphic error David Arnold
@ 2004-11-04 19:03 ` Matthias Weber
  2004-11-04 19:50   ` David Arnold
  2004-11-08 11:14   ` Hans Hagen
  0 siblings, 2 replies; 5+ messages in thread
From: Matthias Weber @ 2004-11-04 19:03 UTC (permalink / raw)



On Nov 4, 2004, at 1:07 PM, David Arnold wrote:

> All,
>
> This file:
>
> \setupoutput[pdf]
>
> \startreusableMPgraphic{layout 1}
> pickup pencircle scaled 1mm;
> fill unitsquare xyscaled (7cm,8cm) withcolor 0.85white;
> fill unitsquare xyscaled (5cm,5cm) shifted (1cm,1.5cm) withcolor 
> 0.625yellow;
> fill unitsquare xyscaled (5cm,1cm) shifted (1cm,0.5cm) withcolor 
> 0.625red;
> fill unitsquare xyscaled (5cm,1cm) shifted (1cm,6.5cm) withcolor 
> 0.625red;
> draw unitsquare xyscaled (5cm,7cm) shifted (1cm,0.5cm) withcolor 
> 0.25white;
> drawarrow (2cm,8cm)--top (2cm,7.5cm);
> drawarrow (0cm,7cm)--lft(1cm,7cm);
> clip currentpicture to unitsquare xyscaled (7cm,8cm);
> \stopreusableMPgraphic
>
>
> \startreusableMPgraphic{layout 2}
> \includeMPgraphic{layout 1}

^^^^^^^^^
is that allowed? (it works without)


> clip currentpicture to unitsquare scaled 3cm shifted (0,5cm);
> currentpicture:=currentpicture scaled 2 shifted (0,-8cm);
> setbounds currentpicture to unitsquare xyscaled (6cm,8cm);
> \stopreusableMPgraphic
>
>
>
> \setupcolors[state=start]
>
> \starttext
>
> Now is the time for all good men to come to the aid of their country.
> Now is the time for all good men to come to the aid of their country.
> Now is the time for all good men to come to the aid of their country.
> Now is the time for all good men to come to the aid of their country.
> Now is the time for all good men to come to the aid of their country.
> Now is the time for all good men to come to the aid of their country.
> Now is the time for all good men to come to the aid of their country.
> Now is the time for all good men to come to the aid of their country.
>
>  \hbox
> {\reuseMPgraphic{layout 1}\hskip1cm
> \reuseMPgraphic{layout 2}}
>
> Now is the time for all good men to come to the aid of their country.
> Now is the time for all good men to come to the aid of their country.
> Now is the time for all good men to come to the aid of their country.
> Now is the time for all good men to come to the aid of their country.
> Now is the time for all good men to come to the aid of their country.
> Now is the time for all good men to come to the aid of their country.
> Now is the time for all good men to come to the aid of their country.
> Now is the time for all good men to come to the aid of their country.
>
> \page
> Now is the time for all good men to come to the aid of their country.
> Now is the time for all good men to come to the aid of their country.
> Now is the time for all good men to come to the aid of their country.
> Now is the time for all good men to come to the aid of their country.
> Now is the time for all good men to come to the aid of their country.
> Now is the time for all good men to come to the aid of their country.
> Now is the time for all good men to come to the aid of their country.
> Now is the time for all good men to come to the aid of their country.
>
> \startlinecorrection[blank]
>  \hbox
> {\reuseMPgraphic{layout 1}\hskip1cm
> \reuseMPgraphic{layout 2}}
> \stoplinecorrection
>
> Now is the time for all good men to come to the aid of their country.
> Now is the time for all good men to come to the aid of their country.
> Now is the time for all good men to come to the aid of their country.
> Now is the time for all good men to come to the aid of their country.
> Now is the time for all good men to come to the aid of their country.
> Now is the time for all good men to come to the aid of their country.
> Now is the time for all good men to come to the aid of their country.
> Now is the time for all good men to come to the aid of their country.
>
> \stoptext
>
>
> Produces this error:
>
> ERROR: Undefined control sequence.
>
> --- TeX said ---
> \getobject ...->\blabelgroup \let \dohandleobject
>                                                   \dogetobject \csname
> \r!ob...
> <argument> \includeMPgraphic {layout 1}
>                                         clip currentpicture to 
> unitsquare
> sc...
>
> \nonowriteMPgraphicline ... \long \edef \ascii {#1
>                                                   }\expandafter
> \flushMPgrap...
>
> \shortMPflushN ...nowriteMPgraphicline #1#2\MPend
>                                                   \expandafter
> \shortMPflush...
> <argument> ...itsquare scaled 3cm shifted (0,5cm);
>
> currentpicture:=currentpi...
>
> \writeMPgraphicshortN ... \space \shortMPflushN #1
>                                                   \empty ;\relax 
> ;\egroup
> ...
> l.40 \reuseMPgraphic{layout 2}}
>
> --- HELP ---
> TeX encountered an unknown command name. You probably misspelled the
> name. If this message occurs when a LaTeX command is being processed,
> the command is probably in the wrong place---for example, the error
> can be produced by an \item command that's not inside a list-making
> environment. The error can also be caused by a missing \documentstyle
> command.
>
> Any ideas?
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
>
>

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

* Re: \reuseMPgraphic error
  2004-11-04 19:03 ` Matthias Weber
@ 2004-11-04 19:50   ` David Arnold
  2004-11-08 11:14   ` Hans Hagen
  1 sibling, 0 replies; 5+ messages in thread
From: David Arnold @ 2004-11-04 19:50 UTC (permalink / raw)


Matthias,

This was allowed at one time. It is straight out of the Metafun manual.

At 02:03 PM 11/4/04 -0500, you wrote:
>
>On Nov 4, 2004, at 1:07 PM, David Arnold wrote:
>
>> All,
>>
>> This file:
>>
>> \setupoutput[pdf]
>>
>> \startreusableMPgraphic{layout 1}
>> pickup pencircle scaled 1mm;
>> fill unitsquare xyscaled (7cm,8cm) withcolor 0.85white;
>> fill unitsquare xyscaled (5cm,5cm) shifted (1cm,1.5cm) withcolor 
>> 0.625yellow;
>> fill unitsquare xyscaled (5cm,1cm) shifted (1cm,0.5cm) withcolor 
>> 0.625red;
>> fill unitsquare xyscaled (5cm,1cm) shifted (1cm,6.5cm) withcolor 
>> 0.625red;
>> draw unitsquare xyscaled (5cm,7cm) shifted (1cm,0.5cm) withcolor 
>> 0.25white;
>> drawarrow (2cm,8cm)--top (2cm,7.5cm);
>> drawarrow (0cm,7cm)--lft(1cm,7cm);
>> clip currentpicture to unitsquare xyscaled (7cm,8cm);
>> \stopreusableMPgraphic
>>
>>
>> \startreusableMPgraphic{layout 2}
>> \includeMPgraphic{layout 1}
>
>^^^^^^^^^
>is that allowed? (it works without)
>
>
>> clip currentpicture to unitsquare scaled 3cm shifted (0,5cm);
>> currentpicture:=currentpicture scaled 2 shifted (0,-8cm);
>> setbounds currentpicture to unitsquare xyscaled (6cm,8cm);
>> \stopreusableMPgraphic
>>
>>
>>
>> \setupcolors[state=start]
>>
>> \starttext
>>
>> Now is the time for all good men to come to the aid of their country.
>> Now is the time for all good men to come to the aid of their country.
>> Now is the time for all good men to come to the aid of their country.
>> Now is the time for all good men to come to the aid of their country.
>> Now is the time for all good men to come to the aid of their country.
>> Now is the time for all good men to come to the aid of their country.
>> Now is the time for all good men to come to the aid of their country.
>> Now is the time for all good men to come to the aid of their country.
>>
>>  \hbox
>> {\reuseMPgraphic{layout 1}\hskip1cm
>> \reuseMPgraphic{layout 2}}
>>
>> Now is the time for all good men to come to the aid of their country.
>> Now is the time for all good men to come to the aid of their country.
>> Now is the time for all good men to come to the aid of their country.
>> Now is the time for all good men to come to the aid of their country.
>> Now is the time for all good men to come to the aid of their country.
>> Now is the time for all good men to come to the aid of their country.
>> Now is the time for all good men to come to the aid of their country.
>> Now is the time for all good men to come to the aid of their country.
>>
>> \page
>> Now is the time for all good men to come to the aid of their country.
>> Now is the time for all good men to come to the aid of their country.
>> Now is the time for all good men to come to the aid of their country.
>> Now is the time for all good men to come to the aid of their country.
>> Now is the time for all good men to come to the aid of their country.
>> Now is the time for all good men to come to the aid of their country.
>> Now is the time for all good men to come to the aid of their country.
>> Now is the time for all good men to come to the aid of their country.
>>
>> \startlinecorrection[blank]
>>  \hbox
>> {\reuseMPgraphic{layout 1}\hskip1cm
>> \reuseMPgraphic{layout 2}}
>> \stoplinecorrection
>>
>> Now is the time for all good men to come to the aid of their country.
>> Now is the time for all good men to come to the aid of their country.
>> Now is the time for all good men to come to the aid of their country.
>> Now is the time for all good men to come to the aid of their country.
>> Now is the time for all good men to come to the aid of their country.
>> Now is the time for all good men to come to the aid of their country.
>> Now is the time for all good men to come to the aid of their country.
>> Now is the time for all good men to come to the aid of their country.
>>
>> \stoptext
>>
>>
>> Produces this error:
>>
>> ERROR: Undefined control sequence.
>>
>> --- TeX said ---
>> \getobject ...->\blabelgroup \let \dohandleobject
>>                                                   \dogetobject \csname
>> \r!ob...
>> <argument> \includeMPgraphic {layout 1}
>>                                         clip currentpicture to 
>> unitsquare
>> sc...
>>
>> \nonowriteMPgraphicline ... \long \edef \ascii {#1
>>                                                   }\expandafter
>> \flushMPgrap...
>>
>> \shortMPflushN ...nowriteMPgraphicline #1#2\MPend
>>                                                   \expandafter
>> \shortMPflush...
>> <argument> ...itsquare scaled 3cm shifted (0,5cm);
>>
>> currentpicture:=currentpi...
>>
>> \writeMPgraphicshortN ... \space \shortMPflushN #1
>>                                                   \empty ;\relax 
>> ;\egroup
>> ...
>> l.40 \reuseMPgraphic{layout 2}}
>>
>> --- HELP ---
>> TeX encountered an unknown command name. You probably misspelled the
>> name. If this message occurs when a LaTeX command is being processed,
>> the command is probably in the wrong place---for example, the error
>> can be produced by an \item command that's not inside a list-making
>> environment. The error can also be caused by a missing \documentstyle
>> command.
>>
>> Any ideas?
>> _______________________________________________
>> 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
>
>

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

* Re: \reuseMPgraphic error
  2004-11-04 19:03 ` Matthias Weber
  2004-11-04 19:50   ` David Arnold
@ 2004-11-08 11:14   ` Hans Hagen
  2004-11-09  3:06     ` David Arnold
  1 sibling, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2004-11-08 11:14 UTC (permalink / raw)


Matthias Weber wrote:
> 
> On Nov 4, 2004, at 1:07 PM, David Arnold wrote:
> 
>> All,
>>
>> This file:
>>
>> \setupoutput[pdf]
>>
>> \startreusableMPgraphic{layout 1}
>> pickup pencircle scaled 1mm;
>> fill unitsquare xyscaled (7cm,8cm) withcolor 0.85white;
>> fill unitsquare xyscaled (5cm,5cm) shifted (1cm,1.5cm) withcolor 
>> 0.625yellow;
>> fill unitsquare xyscaled (5cm,1cm) shifted (1cm,0.5cm) withcolor 
>> 0.625red;
>> fill unitsquare xyscaled (5cm,1cm) shifted (1cm,6.5cm) withcolor 
>> 0.625red;
>> draw unitsquare xyscaled (5cm,7cm) shifted (1cm,0.5cm) withcolor 
>> 0.25white;
>> drawarrow (2cm,8cm)--top (2cm,7.5cm);
>> drawarrow (0cm,7cm)--lft(1cm,7cm);
>> clip currentpicture to unitsquare xyscaled (7cm,8cm);
>> \stopreusableMPgraphic
>>
>>
>> \startreusableMPgraphic{layout 2}
>> \includeMPgraphic{layout 1}
> 
> 
> ^^^^^^^^^
> is that allowed? (it works without)

it is allowed, but only when layout 1 is a usableMPgraphic

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

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

* Re: \reuseMPgraphic error
  2004-11-08 11:14   ` Hans Hagen
@ 2004-11-09  3:06     ` David Arnold
  0 siblings, 0 replies; 5+ messages in thread
From: David Arnold @ 2004-11-09  3:06 UTC (permalink / raw)


Hans, Matthias,

Thanks. Changing:

\startreusableMPgraphic{layout 1}

to

\startruseMPgraphic{layout 1}

fixed the problem. 

At 12:14 PM 11/8/04 +0100, you wrote:
>Matthias Weber wrote:
>> 
>> On Nov 4, 2004, at 1:07 PM, David Arnold wrote:
>> 
>>> All,
>>>
>>> This file:
>>>
>>> \setupoutput[pdf]
>>>
>>> \startreusableMPgraphic{layout 1}
>>> pickup pencircle scaled 1mm;
>>> fill unitsquare xyscaled (7cm,8cm) withcolor 0.85white;
>>> fill unitsquare xyscaled (5cm,5cm) shifted (1cm,1.5cm) withcolor 
>>> 0.625yellow;
>>> fill unitsquare xyscaled (5cm,1cm) shifted (1cm,0.5cm) withcolor 
>>> 0.625red;
>>> fill unitsquare xyscaled (5cm,1cm) shifted (1cm,6.5cm) withcolor 
>>> 0.625red;
>>> draw unitsquare xyscaled (5cm,7cm) shifted (1cm,0.5cm) withcolor 
>>> 0.25white;
>>> drawarrow (2cm,8cm)--top (2cm,7.5cm);
>>> drawarrow (0cm,7cm)--lft(1cm,7cm);
>>> clip currentpicture to unitsquare xyscaled (7cm,8cm);
>>> \stopreusableMPgraphic
>>>
>>>
>>> \startreusableMPgraphic{layout 2}
>>> \includeMPgraphic{layout 1}
>> 
>> 
>> ^^^^^^^^^
>> is that allowed? (it works without)
>
>it is allowed, but only when layout 1 is a usableMPgraphic
>
>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
>
>

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

end of thread, other threads:[~2004-11-09  3:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-04 18:07 \reuseMPgraphic error David Arnold
2004-11-04 19:03 ` Matthias Weber
2004-11-04 19:50   ` David Arnold
2004-11-08 11:14   ` Hans Hagen
2004-11-09  3:06     ` David Arnold

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