From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/78197 Path: news.gmane.org!not-for-mail From: Ian Lawrence Newsgroups: gmane.comp.tex.context Subject: Passing variables on invocation- and reading them in ConTEXt Date: Mon, 10 Sep 2012 11:53:20 +0100 Message-ID: <73DCD031-6BBC-483D-9016-6BCF674C5F5A@gmail.com> References: <404B9D75-2334-4B9A-B2F2-74F42CBB15BD@pobox.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (1.0) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1347274414 27098 80.91.229.3 (10 Sep 2012 10:53:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 10 Sep 2012 10:53:34 +0000 (UTC) To: "ntg-context@ntg.nl" Original-X-From: ntg-context-bounces@ntg.nl Mon Sep 10 12:53:34 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TB1cO-0003fA-MQ for gctc-ntg-context-518@m.gmane.org; Mon, 10 Sep 2012 12:53:28 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D6509101EC; Mon, 10 Sep 2012 12:53:24 +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 o4Yn0pByB2Oc; Mon, 10 Sep 2012 12:53:23 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id ECAEC101E8; Mon, 10 Sep 2012 12:53:22 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id E9DE2101E8 for ; Mon, 10 Sep 2012 12:53:20 +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 UEZZ62AaECTm for ; Mon, 10 Sep 2012 12:53:20 +0200 (CEST) Original-Received: from filter2-utr.mf.surf.net (filter2-utr.mf.surf.net [195.169.124.153]) by balder.ntg.nl (Postfix) with ESMTP id 57783101E6 for ; Mon, 10 Sep 2012 12:53:19 +0200 (CEST) Original-Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com [209.85.212.173]) by filter2-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q8AArG97031667 for ; Mon, 10 Sep 2012 12:53:16 +0200 Original-Received: by wibhm6 with SMTP id hm6so1566523wib.2 for ; Mon, 10 Sep 2012 03:53:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:references:from:content-type:x-mailer:message-id:date:to :content-transfer-encoding:mime-version; bh=tK1aJM+aMfQVq3oKS1dG+HtLpyyTci3gZh6ZhcKzM+g=; b=gLH5om8aKVN36q+fhxEb0ZHZq7zZmqvYPHz6XjsmgBn+dNIkjcr+AZBhrkDKA7fV5I F9UN1RFIymZkktHTU0G4V7P8F7PomAU5yAp6c4wsS3p1LQYe95F+Sufj0N1LQurjyJyY /gGijspyxwADj6qzbSLdOkgTP8kBApz+qJoTAsp0hlkrRfuQPT4qhZSG3ivywTCMea+D fEdnCKeM0vgFe9nepuvKjbZFQFwTpovkqfptVgE480Z025jJlXP45Zjh+6lbwq5zu4sI tE0t+PlKdSriLOhA9aJQtqmFCaaPKQT79uILqF80dVVmrE9PWDcb4H0y1GMvMmEbwUUN bvRQ== Original-Received: by 10.216.136.95 with SMTP id v73mr7370453wei.2.1347274396100; Mon, 10 Sep 2012 03:53:16 -0700 (PDT) Original-Received: from [192.168.0.2] ([84.93.187.216]) by mx.google.com with ESMTPS id eu4sm16620932wib.2.2012.09.10.03.53.14 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 10 Sep 2012 03:53:15 -0700 (PDT) X-Mailer: iPad Mail (9B206) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.212.173; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 04HVmRg0B - 749f7ebf6764 - 20120910 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.153 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 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-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:78197 Archived-At: A feeble request from me, again. I'd like to pass variables into context on invocation, just as you can do with setting modes So context --arguments="number=8", "time=full-time" --mode=trial test.tex And have the values of the variables show up in the body of the text, so: ---- \starttext Hello world % This is \getvariables{arguments}{number} it. % this does not work - what do I need here to write out the next line? This is 8. % This is \getvariables{arguments}{time} it. % Nor does this - what do I need here to write out the next line? This is full-time. \stoptext ---- As ever, I've trawled the manuals and wiki and archive emails (which is where the construct --arguments="number=8" came from.) Thanks in anticipation Ian ___________________________________________________________________________________ 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 ___________________________________________________________________________________