Am 29.10.2012 um 12:07 schrieb Marco Patzer <home...@lavabit.com>:

> 2012-10-29 Mari Voipio:
> 
>> The problem: I don't know how to input the logo graphic into Metapost
>> code. This did not work, even though the pdf is in the same directory:
>> 
>> externalfigure "vaaka-logo.pdf" scaled 1cm;
> 
> This works here:
> 
> \startbuffer [image]
>  \useMPlibrary [dum]
>  \startTEXpage
>    \externalfigure [dummy]
>  \stopTEXpage
> \stopbuffer
> 
> \ctxcommand{runbuffer("\jobname.tmp", "image", true)}
> 
> \starttext
> 
> \startMPcode
>  picture pic;
>  pic = externalfigure "\jobname-\jobname.tmp.pdf" scaled 1cm;
>  draw pic rotated 20;
> \stopMPcode
> 
> \stoptext

The important thing is to put “draw” in front of the externalfigure command,
a change in the syntax which isn’t mentioned in the manual.

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