On Wed, Oct 19, 2011 at 1:34 PM, Lutz Haseloff
<lutz.hasel...@googlemail.com> wrote:
> Hi Hans, Hi all,
>
> with newest Context and luatex compiling following file:
>
> \starttext
> \startMPcode
> draw externalfigure "hacker.jpg" xscaled 30mm yscaled 20mm ;
> \stopMPcode
> \stoptext
>
> doesn't show the picture and gives an error message:
>
>
> ! Improper `addto'.
> <to be read again>
>                   withpen
> draw->...:also(EXPR0)else:doublepath(EXPR0)withpen
>                                                  .currentpen.fi._op_
> <to be read again>
>                   ;
> <to be read again>
>                   ;
> <*> ...re "hacker.jpg" xscaled 30mm yscaled 20mm ;
>                                                   ;
>
>
> metapost        > error: unknown, no error, terminal or log messages
> metapost        > terminal: [1]
>
>
> Thanks for any help
>
> Lutz
hm, strange, it seems that
externalfigure is redefined
This is ok

\starttext
\startMPcode
def externalfigure primary filename =
    if false :
        rawtextext("\externalfigure[" & filename & "]")
    else :
        image (
            addto currentpicture doublepath unitsquare
                withprescript "fg_name=" & filename ;
        )
%             unitsquare
%                 withpen pencircle scaled 0
%                 withprescript "fg_name=" & filename
    fi
enddef ;
draw externalfigure "hacker.jpg" xscaled 30mm yscaled 20mm ;
\stopMPcode
\stoptext

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

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

Reply via email to