From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/92618 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: escaping quotes in \ctxlua Date: Wed, 30 Sep 2015 17:20:54 +0200 Message-ID: <560BFDD6.40805@gmail.com> References: <560BFAC5.4030906@gmx.es> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1313146250==" X-Trace: ger.gmane.org 1443626531 26649 80.91.229.3 (30 Sep 2015 15:22:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 30 Sep 2015 15:22:11 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Sep 30 17:21:58 2015 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZhJCg-0007KB-Bv for gctc-ntg-context-518@m.gmane.org; Wed, 30 Sep 2015 17:21:58 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A0ACB10219 for ; Wed, 30 Sep 2015 17:21:57 +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 NLA24pVAKtyv for ; Wed, 30 Sep 2015 17:21:56 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id D2B9010232 for ; Wed, 30 Sep 2015 17:21:11 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 2C3AC101F6 for ; Wed, 30 Sep 2015 17:21:08 +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 Om3TLTzLIg3f for ; Wed, 30 Sep 2015 17:21:07 +0200 (CEST) Original-Received: from filter3-utr.mf.surf.net (filter3-utr.mf.surf.net [195.169.124.154]) by balder.ntg.nl (Postfix) with ESMTP id 22ED9101E8 for ; Wed, 30 Sep 2015 17:21:07 +0200 (CEST) Original-Received: from mail-wi0-x234.google.com (mail-wi0-x234.google.com [IPv6:2a00:1450:400c:c05::234]) by filter3-utr.mf.surf.net (8.14.4/8.14.4/Debian-4) with ESMTP id t8UFL1tX014603 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NOT) for ; Wed, 30 Sep 2015 17:21:06 +0200 Original-Received: by wiclk2 with SMTP id lk2so67251435wic.1 for ; Wed, 30 Sep 2015 08:21:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; bh=mwDNScAgi+6BGya0ObKYdRQNew7ZZyLwviuoWF/ya2g=; b=pO4PgBAVMwljWdy87Q7E+xSR0+affI+XI8C8hNjy8C9AkVF4ZW+Fmgd2CagW40UImM BBAAz1Y2tsWc2UmPDOw5D5UBXvPDx9sTQINwy8zNLcKiJbbgynakHveObcx5I05bokyR xdg3p20zU0ifbt/nm8/A1cBrkHeP981+0XOSh0W0WbLJE5PYFT53XwUtnsFi03SsTuOa pqbPrBNyJka1770EDFLodnOnjxx3ldrl8j7M6YP7eVssvDdk74dVO/ulVvQLNISlbq/b dIKjBBuN+StGXXv9en1fMcBOKh2M3lfLOE2qSEshN/UZOnRm1vDNNMq4fy0senoG0bR3 J5wg== X-Received: by 10.194.179.137 with SMTP id dg9mr4944936wjc.55.1443626460844; Wed, 30 Sep 2015 08:21:00 -0700 (PDT) Original-Received: from keima.localdomain (x2f2731e.dyn.telefonica.de. [2.242.115.30]) by smtp.googlemail.com with ESMTPSA id ki7sm1185929wjc.28.2015.09.30.08.20.59 for (version=TLSv1/SSLv3 cipher=OTHER); Wed, 30 Sep 2015 08:21:00 -0700 (PDT) User-Agent: Postbox 4.0.5 (Macintosh/20150923) In-Reply-To: <560BFAC5.4030906@gmx.es> X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=2a00:1450:400c:c05::234; country=BE; region=Brussels Capital; city=Brussels; latitude=50.8466; longitude=4.3528; http://maps.google.com/maps?q=50.8466,4.3528&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 08Pnrl1yP - 84bf8c902264 - 20150930 Received-SPF: pass (filter3-utr.mf.surf.net: domain of schuster.wolfgang@gmail.com designates 2a00:1450:400c:c05::234 as permitted sender) receiver=filter3-utr.mf.surf.net; client-ip=2a00:1450:400c:c05::234; envelope-from=; helo=mail-wi0-x234.google.com; identity=mailfrom X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 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.org gmane.comp.tex.context:92618 Archived-At: This is a multi-part message in MIME format. --===============1313146250== Content-Type: multipart/alternative; boundary="------------010204090507010307060702" This is a multi-part message in MIME format. --------------010204090507010307060702 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit > Pablo Rodriguez > 30. September 2015 um 17:07 > Dear list, > > I have the following sample: > > \starttext > \startluacode > tex.print(os.getenv("USER") > \stopluacode > > \ctxlua{tex.print(os.getenv("USER")} > \stoptext > > How can I escape the quotes in the \ctxlua command? You have to add a closing ) for tex.print in both Lua calls but you can replace the second version with \cldcontext{os.getenv("USER")}. Wolfgang --------------010204090507010307060702 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
30= .=20 September 2015 um 17:07
Dear list,

I hav= e=20 the following sample:

\starttext
\startluacode
=20 tex.print(os.getenv("USER")
\stopluacode

=20 \ctxlua{tex.print(os.getenv("USER")}
\stoptext

How can I=20 escape the quotes in the \ctxlua command?
You have to add a=C2=A0 closing ) for tex.print in both Lua calls but you= can replace the second version with \cldcontext{os.getenv("USER")}.

Wolfgang
--------------010204090507010307060702-- --===============1313146250== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============1313146250==--