From: luigi scarso <luigi.scarso@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Metapost error
Date: Wed, 19 Oct 2011 17:16:23 +0200 [thread overview]
Message-ID: <CAG5iGsD31vBh8ecakLpkv7CBN4EbV8fAeAPC=KmxjUrjT-hEcQ@mail.gmail.com> (raw)
In-Reply-To: <CAPoA6K3ZKkmM0A96akCv=6MYQ-8P==UbeDnEG8HwSgUStBJEVQ@mail.gmail.com>
On Wed, Oct 19, 2011 at 1:34 PM, Lutz Haseloff
<lutz.haseloff@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
___________________________________________________________________________________
next prev parent reply other threads:[~2011-10-19 15:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-19 11:34 Lutz Haseloff
2011-10-19 15:16 ` luigi scarso [this message]
2011-10-20 4:28 ` Lutz Haseloff
-- strict thread matches above, loose matches on Subject: below --
2003-09-05 5:24 MetaPost error ^Nitram^
2003-09-04 11:32 ^Nitram^
2003-09-04 16:43 ` Patrick Gundlach
2003-09-04 19:30 ` Willi Egger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAG5iGsD31vBh8ecakLpkv7CBN4EbV8fAeAPC=KmxjUrjT-hEcQ@mail.gmail.com' \
--to=luigi.scarso@gmail.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).