From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/78199 Path: news.gmane.org!not-for-mail From: Marco Patzer Newsgroups: gmane.comp.tex.context Subject: Re: Passing variables on invocation- and reading them in ConTEXt Date: Mon, 10 Sep 2012 13:12:08 +0200 Message-ID: <20120910131208.00a18efe@homerow> References: <404B9D75-2334-4B9A-B2F2-74F42CBB15BD@pobox.com> <73DCD031-6BBC-483D-9016-6BCF674C5F5A@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1347275547 3980 80.91.229.3 (10 Sep 2012 11:12:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 10 Sep 2012 11:12:27 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Mon Sep 10 13:12:28 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 1TB1um-0007k1-1R for gctc-ntg-context-518@m.gmane.org; Mon, 10 Sep 2012 13:12:28 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 1063E101E6; Mon, 10 Sep 2012 13:12: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 YBGKsr7hfe+b; Mon, 10 Sep 2012 13:12:22 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 4CA20101E8; Mon, 10 Sep 2012 13:12:22 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 0B828101E8 for ; Mon, 10 Sep 2012 13:12:21 +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 rSs9rGkQPO7l for ; Mon, 10 Sep 2012 13:12:16 +0200 (CEST) Original-Received: from filter1-utr.mf.surf.net (filter1-utr.mf.surf.net [195.169.124.152]) by balder.ntg.nl (Postfix) with ESMTP id 1E310101E6 for ; Mon, 10 Sep 2012 13:12:16 +0200 (CEST) Original-Received: from karen.lavabit.com (karen.lavabit.com [72.249.41.33]) by filter1-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q8ABCDPr028536 for ; Mon, 10 Sep 2012 13:12:14 +0200 Original-Received: from e.earth.lavabit.com (e.earth.lavabit.com [192.168.111.14]) by karen.lavabit.com (Postfix) with ESMTP id DDAB711BB89 for ; Mon, 10 Sep 2012 06:12:11 -0500 (CDT) Original-Received: from homerow (miun110-205.dynamic.miun.se [193.10.110.205]) by lavabit.com with ESMTP id T8M5D34QS4EL for ; Mon, 10 Sep 2012 06:12:11 -0500 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=lavabit; d=lavabit.com; b=KC63S5InQCQnJqGQuEYVGpmIGN+abmY4fcxnjHSE2ph26bhspLTN4S3WH+vnuDprWZSUZYofaeqpgaLFaTRjA+lOPGyv+NV5opFfYitIV1M48Atgu1ZQI/1gD8kDyM0z0ibUm2QuKbV0g+EvS/AmpaQhXP/8Od90I4BNpZr5BgQ=; h=Date:From:To:Subject:Message-ID:In-Reply-To:References:X-Mailer:Mime-Version:Content-Type:Content-Transfer-Encoding; In-Reply-To: <73DCD031-6BBC-483D-9016-6BCF674C5F5A@gmail.com> X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=72.249.41.33; country=US; region=TX; city=Dallas; postalcode=75206; latitude=32.8339; longitude=-96.7715; metrocode=623; areacode=214; http://maps.google.com/maps?q=32.8339,-96.7715&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 07HVncdaB - 2e2c4851dd7e - 20120910 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) 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:78199 Archived-At: On 2012-09-10 Ian Lawrence wrote: Hi Ian, > 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 context --number=8 --time=full-time test.tex > \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 \starttext This is \doifdocumentargument{number}{\getdocumentargument{number}} it. This is \doifdocumentargument{time}{\getdocumentargument{time}} it. \stoptext Marco ___________________________________________________________________________________ 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 ___________________________________________________________________________________