From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/60906 Path: news.gmane.org!not-for-mail From: Philipp Gesang Newsgroups: gmane.comp.tex.context Subject: Re: checking for module parameters Date: Fri, 13 Aug 2010 10:31:32 +0200 Message-ID: <20100813083132.GA28319@aides> References: <20100812222047.GB18623@aides> <4C64B918.8050504@googlemail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0951102561==" X-Trace: dough.gmane.org 1281688282 28761 80.91.229.12 (13 Aug 2010 08:31:22 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 13 Aug 2010 08:31:22 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Aug 13 10:31:21 2010 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 1Ojpfc-0002Qo-QZ for gctc-ntg-context-518@m.gmane.org; Fri, 13 Aug 2010 10:31:20 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 7DD01CA406; Fri, 13 Aug 2010 10:31:19 +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 SgZULJIhOMSl; Fri, 13 Aug 2010 10:31:16 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 62AC0CA400; Fri, 13 Aug 2010 10:31:16 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B7341CA400 for ; Fri, 13 Aug 2010 10:31:14 +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 ulgFc3-Er6+h for ; Fri, 13 Aug 2010 10:31:12 +0200 (CEST) Original-Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by balder.ntg.nl (Postfix) with ESMTP id 051ADCA3FA for ; Fri, 13 Aug 2010 10:31:11 +0200 (CEST) Original-Received: from ix.urz.uni-heidelberg.de (cyrus-portal.urz.uni-heidelberg.de [129.206.100.176]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id o7D8UkX2018832 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 13 Aug 2010 10:30:46 +0200 Original-Received: from extmail.urz.uni-heidelberg.de (extmail.urz.uni-heidelberg.de [129.206.100.140]) by ix.urz.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id o7D8VA7o022046 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 13 Aug 2010 10:31:10 +0200 Original-Received: from localhost (mnhm-4d0106ad.pool.mediaWays.net [77.1.6.173]) (authenticated bits=0) by extmail.urz.uni-heidelberg.de (8.13.4/8.13.1) with ESMTP id o7D8VSW7022670 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Fri, 13 Aug 2010 10:31:29 +0200 In-Reply-To: <4C64B918.8050504@googlemail.com> X-Operating-System: Linux aides 2.6.34-rc3 X-Polite-Request: "Please try to be nice, don't send html mail." User-Agent: Mutt/1.5.20 (2009-06-14) 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:60906 Archived-At: --===============0951102561== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="XsQoSWH+UP9D9v3l" Content-Disposition: inline --XsQoSWH+UP9D9v3l Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2010-08-13 <05:16:40>, Wolfgang Schuster wrote: > Am 13.08.10 00:20, schrieb Philipp Gesang: > >Hi, > > > >is there a way to check whether an option was specified through \usemodu= le? > >Couldn't find anything like that in core-fil.mkiv. > > > >I'd imagined some branching as with the system macros: > > > >=B7=B7=B7=B7=B7=B7 Wishful thinking =B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7= =B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7= =B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7 > > > >\doifmoduleparameter{modulename}{key} % in the modu= le code > > {\somecommand[\moduleparameter{modulename}{key}]} > > > >\usemodule % user code > > [modulename] > > [key=3Dval] > > > >=B7=B7=B7=B7=B7 /Wishful thinking =B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7= =B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7= =B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7=B7 > > > >Thanks for any suggestions, >=20 > You can set a empty value for the kay in your module and check if > the user has set a value with \usemodule: >=20 > \setupmodule[key=3D] >=20 > \doifsomething{\currentmoduleparameter{key}}{\setupsomething[key=3D\curre= ntmoduleparameter{key}]} >=20 > For a better answer i have to know for what purpose you need this > information. Hi Wolfgang, you don't have to look any further, this is exactly what I was looking for! (Note to self: maybe it is time to investigate the dozens of doif.* tests a bit more thoroughly.) Thanks, Philipp >=20 > Wolfgang >=20 > _________________________________________________________________________= __________ > If your question is of interest to others as well, please add an entry to= the Wiki! >=20 > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-co= ntext > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > _________________________________________________________________________= __________ --=20 () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments --XsQoSWH+UP9D9v3l Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAkxlAuQACgkQ02lYlJYWs9Ic1gCfUvOYqRkAfLJjAmKxr6O1qAh7 xB8AoIHPPLLKRUmltB1XKOGO90i4RxoL =KNat -----END PGP SIGNATURE----- --XsQoSWH+UP9D9v3l-- --===============0951102561== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --===============0951102561==--