From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/72074 Path: news.gmane.org!not-for-mail From: "Meer, H. van der" Newsgroups: gmane.comp.tex.context Subject: macro string in metapost Date: Tue, 1 Nov 2011 22:21:35 +0000 Message-ID: <1048231C-BD55-488E-9934-6CF9DBF33BE7@uva.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1320186117 29590 80.91.229.12 (1 Nov 2011 22:21:57 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 1 Nov 2011 22:21:57 +0000 (UTC) To: ConTeXt NTG Original-X-From: ntg-context-bounces@ntg.nl Tue Nov 01 23:21:53 2011 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.69) (envelope-from ) id 1RLMiO-000413-RZ for gctc-ntg-context-518@m.gmane.org; Tue, 01 Nov 2011 23:21:52 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 1A9CFCB0AF; Tue, 1 Nov 2011 23:21:52 +0100 (CET) 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 dM0tzRtA6WFg; Tue, 1 Nov 2011 23:21:51 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 56BF9CB0A8; Tue, 1 Nov 2011 23:21:49 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 9DD4ACB0A8 for ; Tue, 1 Nov 2011 23:21:48 +0100 (CET) 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 JLw+c+xcburW for ; Tue, 1 Nov 2011 23:21:37 +0100 (CET) Original-Received: from filter4-til.mf.surf.net (filter4-til.mf.surf.net [194.171.167.220]) by balder.ntg.nl (Postfix) with ESMTP id D463FCB098 for ; Tue, 1 Nov 2011 23:21:37 +0100 (CET) Original-Received: from jansen.uva.nl (jansen.uva.nl [146.50.108.229]) by filter4-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id pA1MLaom009329 for ; Tue, 1 Nov 2011 23:21:37 +0100 Original-Received: from vanthoff.uva.nl (146.50.108.242) by jansen.uva.nl (146.50.108.229) with Microsoft SMTP Server (TLS) id 14.1.289.1; Tue, 1 Nov 2011 23:21:36 +0100 Original-Received: from ketelaar.uva.nl ([fe80::cc61:4c73:c438:df97]) by vanthoff.uva.nl ([::1]) with mapi id 14.01.0289.001; Tue, 1 Nov 2011 23:21:36 +0100 Thread-Topic: macro string in metapost Thread-Index: AQHMmOSd4713es/p+0CYV1N1SSex8A== Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [82.95.102.36] Content-ID: <2FE5C4CF9BF7C9409CB89558099F982F@uva.nl> X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=146.50.108.229; country=NL; region=07; city=Amsterdam; latitude=52.3500; longitude=4.9167; http://maps.google.com/maps?q=52.3500,4.9167&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 05FPWlBtE - 81114ca450b4 - 20111101 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.220 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:72074 Archived-At: The goal is to make the following string in metapost: string s; where s must become "\MPcolor{Blue}". and ultimately execute this at the right moment with: scantokens s; The following makes s = "MPcolor{Blue}": s := "MPcolor" & char oct"134" & char oct"173" & "Blue" & char oct"134" & char oct"175"; But I seem unable to add a \ in front of it without expanding the string by TeX. Thus it does not work to put: s := char oct"134" & "MPcolor" & char oct"134" & char oct"173" & "Blue" & char oct"134" & char oct"175"; Placing a \noexpand in front does not help. How to? Hans van der Meer ___________________________________________________________________________________ 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 ___________________________________________________________________________________