From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/108719 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Geert Verhaag Newsgroups: gmane.comp.tex.context Subject: Struggling with startuseMPgraphic and string argument! Date: Wed, 16 Sep 2020 16:32:00 +0200 Message-ID: <25c339a4-6507-db95-b4f1-752db5e86867@ziggo.nl> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0578789543044355510==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6936"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Wed Sep 16 16:32:24 2020 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kIYTw-0001h9-4U for gctc-ntg-context-518@m.gmane-mx.org; Wed, 16 Sep 2020 16:32:24 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 717CC1A8EBE; Wed, 16 Sep 2020 16:32:05 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QuHq5qrlLgDP; Wed, 16 Sep 2020 16:32:03 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id A6C501A8EC3; Wed, 16 Sep 2020 16:32:03 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id C47341A8EBE for ; Wed, 16 Sep 2020 16:32:02 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id onUn21gWrFCn for ; Wed, 16 Sep 2020 16:32:01 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=212.54.42.167; helo=smtpq4.tb.mail.iss.as9143.net; envelope-from=verhaaggchm@ziggo.nl; receiver= Original-Received: from smtpq4.tb.mail.iss.as9143.net (smtpq4.tb.mail.iss.as9143.net [212.54.42.167]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 858551A8EB9 for ; Wed, 16 Sep 2020 16:32:01 +0200 (CEST) Original-Received: from [212.54.42.110] (helo=smtp7.tb.mail.iss.as9143.net) by smtpq4.tb.mail.iss.as9143.net with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIYTZ-0001dv-6P for ntg-context@ntg.nl; Wed, 16 Sep 2020 16:32:01 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ziggo.nl; s=202002corplgsmtpnl; h=Date:Subject:From:To; bh=GxtKc2vR6F7S/YFixYuok5lkfu+csa2OGYPpH/uav/I=; b=KL2Abtw+L3Ri/q3t4PAcG2NaQr QoVmTf31uKKdZBey5hGY2H+dQrIuQkKfiGd8jhw0IyNw6HmuAiJ33fnLiN2GHSNdJOLwNnXJfG8nN k/N1Kg3Zgpbm2/JkPqiq2Yz+25Eb/dF6ZKwY1SUkBdmVayd5loU8EzjSm6+cyXj3GkuyQREIfJO8Q PLYALJQ/ERBSUy6gEfGzTkWpGk1swi+yA7psfUIc3GnAQdOTDJZKGwy+Qnn6Mqj4oRF5uT3y82VHv iXRNVP3fNUi8Cn2ytzeP0shJML+MJRE5/5VOmQM98DK1coTbMWnQiVS2X3LsJ9Oh+BwsiLoWv3v1d 9tjUC0cA==; Original-Received: from 84-28-24-192.cable.dynamic.v4.ziggo.nl ([84.28.24.192] helo=[192.168.0.100]) by smtp7.tb.mail.iss.as9143.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kIYTZ-0004fx-2i for ntg-context@ntg.nl; Wed, 16 Sep 2020 16:32:01 +0200 Content-Language: en-US X-SourceIP: 84.28.24.192 X-Authenticated-Sender: verhaaggchm@ziggo.nl (via SMTP) X-Ziggo-spambar: / X-Ziggo-spamscore: 0.0 X-Ziggo-spamreport: CMAE Analysis: v=2.4 cv=EM64b3VC c=1 sm=1 tr=0 ts=5f6221e1 a=Ve/L2x+2+5RdmP9wc+6rQQ==:17 a=9+rZDBEiDlHhcck0kWbJtElFXBc=:19 a=reM5J-MqmosA:10 a=r77TgQKjGQsHNAKrUKIA:9 a=W5N7_zpfHAqQy7-0n-MA:9 a=QEXdDO2ut3YA:10 a=ANvX6HFqYhe5F_WlREkA:9 a=NhY2vPstIVEVPN5L:21 a=_W_S_7VecoQA:10 X-Ziggo-Spam-Status: No X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.io gmane.comp.tex.context:108719 Archived-At: This is a multi-part message in MIME format. --===============0578789543044355510== Content-Type: multipart/alternative; boundary="------------AD1BE6778D0C82390348D0FE" Content-Language: en-US This is a multi-part message in MIME format. --------------AD1BE6778D0C82390348D0FE Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Hi, I'm trying to pass a string argument value to an MPgraphic but it doesn't seem to work: Tried the following: \startuseMPgraphic{name}{lbl}   pair a ; a := (3cm,3cm) ;label.top("\MPvariable{lbl}",a) ; \stopuseMPgraphic \starttext   \useMPgraphic{name}{lbl=1} \stoptext The above works as expected! But the following doesn't: \startuseMPgraphic{name}{lbl}   pair a ; a := (3cm,3cm) ;label.top("\MPvariable{lbl}",a) ; \stopuseMPgraphic \starttext   \useMPgraphic{name}{lbl=abc} \stoptext It yields:  1 \startuseMPgraphic{name}{lbl}  2       pair a ; a := (3cm,3cm) ;label.top("\MPvariable{lbl}",a) ;  3     \stopuseMPgraphic  4  5     %\startuseMPgraphic{name}fill fullcircle scaled 200pt withcolor .625yellow ;\stopuseMPgraphic  6  7     \starttext  8      Example:  9 >>    \useMPgraphic{name}{lbl=abc} 10     \stoptext 11 a \m_meta_current_variable a-a                             bc ... \hbox {\scratchdimen \m_meta_current_variable                                                   sp}\ifzeropt \wd \b_meta_v... \secondoftwoarguments #1#2b-#2 \9>>1 #1,2-\meta_prepare_instance_variable {#1} \syst_helpers_do_process_comm... \syst_helpers_do_process_comma_list ...rgument #1,                                                   ]\relax \global \advance \... ... l.9   \useMPgraphic{name}{lbl=abc} So it seems that only numbers can be passed not character strings! Why is that? Is there a possibility to achieve this functionality? Regards, Gerard --------------AD1BE6778D0C82390348D0FE Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

Hi,

I'm trying to pass a string argument value to an MPgraphic but it doesn't seem to work:

Tried the following:

\startuseMPgraphic{name}{lbl}
  pair a ; a := (3cm,3cm) ;label.top("\MPvariable{lbl}",a) ;
\stopuseMPgraphic

\starttext
  \useMPgraphic{name}{lbl=1}
\stoptext

The above works as expected!

But the following doesn't:

\startuseMPgraphic{name}{lbl}
  pair a ; a := (3cm,3cm) ;label.top("\MPvariable{lbl}",a) ;
\stopuseMPgraphic

\starttext
  \useMPgraphic{name}{lbl=abc}
\stoptext

It yields:

 1     \startuseMPgraphic{name}{lbl}
 2       pair a ; a := (3cm,3cm) ;label.top("\MPvariable{lbl}",a) ;
 3     \stopuseMPgraphic
 4    
 5     %\startuseMPgraphic{name}fill fullcircle scaled 200pt withcolor .625yellow ;\stopuseMPgraphic
 6    
 7     \starttext
 8      Example:
 9 >>    \useMPgraphic{name}{lbl=abc}
10     \stoptext
11    

<to be read again>
a
\m_meta_current_variable a-a
                            bc
<argument> ... \hbox {\scratchdimen \m_meta_current_variable
                                                  sp}\ifzeropt \wd \b_meta_v...
\secondoftwoarguments #1#2b-#2
                             
\9>>1 #1,2-\meta_prepare_instance_variable {#1}
                                               \syst_helpers_do_process_comm...
\syst_helpers_do_process_comma_list ...rgument #1,
                                                  ]\relax \global \advance \...
...
l.9   \useMPgraphic{name}{lbl=abc}

So it seems that only numbers can be passed not character strings! Why is that? Is there a possibility to achieve this functionality?

Regards,
Gerard

--------------AD1BE6778D0C82390348D0FE-- --===============0578789543044355510== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============0578789543044355510==--