Received: from mx0.gmx.net (mx0.gmx.net [213.165.64.100]) by h1439878.stratoserver.net (8.14.2/8.14.2/Debian-2build1) with SMTP id o78CqnGp029955 for ; Sun, 8 Aug 2010 14:52:51 +0200 Received: (qmail 6412 invoked by alias); 8 Aug 2010 12:52:45 -0000 Delivered-To: GMX delivery to rainer.schoepf@gmx.net Received: (qmail invoked by alias); 08 Aug 2010 12:52:44 -0000 Received: from relay2.uni-heidelberg.de (EHLO relay2.uni-heidelberg.de) [129.206.210.211] by mx0.gmx.net (mx042) with SMTP; 08 Aug 2010 14:52:44 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id o78Cph17006702 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 8 Aug 2010 14:51:43 +0200 Received: from listserv.uni-heidelberg.de (localhost.localdomain [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id o77M14DQ016197; Sun, 8 Aug 2010 14:50:54 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 438656 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Sun, 8 Aug 2010 14:50:54 +0200 Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id o78CoscT026530 for ; Sun, 8 Aug 2010 14:50:54 +0200 Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.23]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with SMTP id o78CohOq000403 for ; Sun, 8 Aug 2010 14:50:46 +0200 Received: (qmail invoked by alias); 08 Aug 2010 12:50:42 -0000 Received: from HSI-KBW-091-089-055-034.hsi2.kabelbw.de (EHLO [192.168.0.197]) [91.89.55.34] by mail.gmx.net (mp045) with SMTP; 08 Aug 2010 14:50:42 +0200 X-Provags-ID: V01U2FsdGVkX18DXkV96f8DQmyMSVzuTfwCviAoCMq/Z6YpOXok1c r57GX5LK9DnH25 User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.7) Gecko/20100720 Lanikai/3.1.1 MIME-Version: 1.0 References: <4C5D662F.60101@gmx.de> <4C5DC2B7.9000004@morningstar2.co.uk> X-Enigmail-Version: 1.1.2 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig7A87E5B417968A7033765C66" Message-ID: <4C5EA81C.1010404@gmx.de> Date: Sun, 8 Aug 2010 14:50:36 +0200 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Arno Trautmann Subject: Re: optional (#1:#2) with xparse To: LATEX-L@listserv.uni-heidelberg.de In-Reply-To: <4C5DC2B7.9000004@morningstar2.co.uk> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-GMX-Antispam: 0 (Mail was not recognized as spam); Detail=5D7Q89H36p4WX0t+AtsdW/aoqQDaDNIQvIKofqzq248eFfwTZ+F4mgWf5ixaPSf+NWajL 73/GCMzvF90tEO9pyOjRRXplK5PBTHyp3pNowF44q4pJl/HRr64MECu4UmOgulS3vHYiKi9s8sbd g74KfWlKevz2arOV1; X-Resent-By: Forwarder X-Resent-For: rainer.schoepf@gmx.net X-Resent-To: rainer@rainer-schoepf.de Status: R X-Status: X-Keywords: X-UID: 6354 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig7A87E5B417968A7033765C66 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Joseph Wright wrote: > On 07/08/2010 14:57, Arno Trautmann wrote: >> Hi all, >> >> I am looking for a way to define an environment that takes a range as = an >> optional argument. This should be given in the following way: >> >> \begin{environment}(15:5.23) >> >> with a default value, say (1:3). The two limits should then be parsed = as >> single arguments which are separated by the colon. >> I am trying to do this with xparse and got some possible solutions wit= h >> the u and d argument type, but I didn=92t manage to get the parenthese= s >> optional. I guess what I need is some kind of an optional u argument =85= >> >> Does anyone have a suggestion how to easily implement these requests? >> >> cheers >> Arno >> > Parse the argument first as a 'd', then use \SplitArgument to do the > subsequent work: Nice, I totally forgot about the \SplitArgument =85 Thanks for your quick answer, that works fine. But unfortunately it does not solve my problem due to other reasons. cheers Arno --------------enig7A87E5B417968A7033765C66 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkxeqB0ACgkQcYXUw/rerZ6T6QCeJiiDsuye+QDkbOikpK53h2fZ FpMAoLuz7zJkhpr352AOslC9o2BMxdIk =XPHx -----END PGP SIGNATURE----- --------------enig7A87E5B417968A7033765C66--