From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/53064 Path: news.gmane.org!not-for-mail From: Matthijs Kooijman Newsgroups: gmane.comp.tex.context Subject: vardef with @# not working within context Date: Mon, 21 Sep 2009 13:56:02 +0200 Message-ID: <20090921115602.GT8930@katherina.student.utwente.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1734345617==" X-Trace: ger.gmane.org 1253534188 21181 80.91.229.12 (21 Sep 2009 11:56:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 21 Sep 2009 11:56:28 +0000 (UTC) To: Mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Sep 21 13:56:21 2009 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.50) id 1MphVF-0008Of-3d for gctc-ntg-context-518@m.gmane.org; Mon, 21 Sep 2009 13:56:21 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 9851CC9AF9; Mon, 21 Sep 2009 13:56:14 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 90qN+DkHpBAf; Mon, 21 Sep 2009 13:56:10 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id AF395C9AB7; Mon, 21 Sep 2009 13:56:09 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 77567C9AAF for ; Mon, 21 Sep 2009 13:56:07 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id RqsEwsCFA99u for ; Mon, 21 Sep 2009 13:56:03 +0200 (CEST) Original-Received: from katherina.student.utwente.nl (katherina.student.utwente.nl [130.89.168.160]) by balder.ntg.nl (Postfix) with ESMTP id D82E4C9AB7 for ; Mon, 21 Sep 2009 13:56:02 +0200 (CEST) Original-Received: from matthijs by katherina.student.utwente.nl with local (Exim 4.69) (envelope-from ) id 1MphUw-0002Vw-Kp for ntg-context@ntg.nl; Mon, 21 Sep 2009 13:56:02 +0200 Mail-Followup-To: Mailing list for ConTeXt users X-PGP-Fingerprint: 7F6A 9F44 2820 18E2 18DE 24AA CF49 D0E6 8A2F AFBC X-PGP-Key: http://katherina.student.utwente.nl/~matthijs/gpg_pubkey.asc User-Agent: Mutt/1.5.18 (2008-05-17) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:53064 Archived-At: --===============1734345617== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="bWTBxx0QKOXH2iZ2" Content-Disposition: inline --bWTBxx0QKOXH2iZ2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi all, I've been fiddling around with metaobj a bit, but defining my own objects failed. After some debugging, I've reduced this to a metapost / context MkIV issue (so no metaobj specifics anymore). What happens, is that vardefs that use @# as a placeholder in their name on= ly work when they are defined in an external .mp file. When I define them insi= de context (\startMPcode or \startMPinclusions), I get funny errors (mostly "Isolated expression", which seems to mean that the macro is not defined). I suspect this is because the way context extracts metapost code. Is this a fundamental problem, or could it be fixed? The following context file will easily reproduce the problem: \starttext \startMPcode vardef foo =3D draw (0mm,0mm)--(10mm,10mm); enddef; foo; vardef xy@# =3D (@#,@#) enddef ; draw xy0mm -- xy10mm;=20 \stopMPcode \stoptext Running this file gives the following (first) error: mplib | mp terminal: >> xy0mm ! Improper `addto'. To illustrate that this is specific to the use of @#, I've included the foo vardef which does work properly. When I move the vardef xy.. line to a separate file, say foo.mp, and replace it with "input foo;", the errors disappear. Gr. Matthijs --bWTBxx0QKOXH2iZ2 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkq3adIACgkQz0nQ5oovr7wfXwCglOarK3WGAPcAJ/sgUM1uU863 22sAn0jCAc7514cuks4jYecjExSGdTb0 =FBTn -----END PGP SIGNATURE----- --bWTBxx0QKOXH2iZ2-- --===============1734345617== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --===============1734345617==--