29 Oct
2012
29 Oct
'12
12:37 p.m.
Am 29.10.2012 um 12:07 schrieb Marco Patzer
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