ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Funny error
@ 2003-08-05 18:49 darnold
  0 siblings, 0 replies; 4+ messages in thread
From: darnold @ 2003-08-05 18:49 UTC (permalink / raw)


All,

This from the Metafun manual:

\setupoutput[pdf]

\runMPgraphicstrue

\setupcolors[state=start]

\startuseMPgraphic{FunnyFrame}
 picture p; numeric w, h, o;
 p:=textext.rt(\MPstring{FunnyFrame});
 w:=OverlayWidth; h:=OverlayHeight; o:=BodyFontSize;
 p:=p shifted (2o,h-ypart center p); draw p;
 drawoptions (withpen pencircle scaled 1pt withcolor .625red);
 draw (2o,h)--(0,h)--(0,0)--(w,0)--(w,h)--(xpart urcorner p, h) ;
 draw boundingbox p;
 setbounds currentpicture to unitsquare xyscaled (w,h);
\stopuseMPgraphic

\defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}]

\defineframedtext[FunnyText][frame=off,background=FunnyFrame]

\def\StartFrame{\startFunnyText}
\def\StopFrame{\stopFunnyText}

\def\FrameTitle#1%
 {\setMPtext{FunnyFrame}{\hbox spread 1em {\hss\strut#1\hss}}}

\setMPtext{FunnyFrame}{}

\starttext

\FrameTitle{Zapf (1)}
\StartFrame
Coming back to the use of typefaces in electronic
publishing: many of the new typographers receive their
knowledge and information about the rules of typography from
books, from computer magazines or the instruction manuals
which they get with the purchase of a PC or software.
\StopFrame

\stoptext

Is producing this "funny" error:

>> unknown picture p
>> textext.rt
! Equation cannot be performed (unknown picture=numeric).
<to be read again>
                   (
l.211 p:=textext.rt(
                    "\hbox spread 1em {\hss \strut Zapf (1)\hss }");
?

Any ideas?

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

end of thread, other threads:[~2003-08-06  5:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1173.209.209.17.51.1060109368.squirrel@webmail.inreach.com >
2003-08-05 21:02 ` Funny error Hans Hagen
2003-08-05 23:09   ` darnold
2003-08-06  5:34   ` darnold
2003-08-05 18:49 darnold

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