Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) by h1439878.stratoserver.net (8.14.2/8.14.2/Debian-2build1) with ESMTP id s8F8C06C016065 for ; Mon, 15 Sep 2014 10:12:01 +0200 Received: from relay.uni-heidelberg.de ([129.206.100.212]) by mx-ha.gmx.net (mxgmx001) with ESMTPS (Nemesis) id 0M1F2u-1YMMO929Vo-00tESy for ; Mon, 15 Sep 2014 10:11:54 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id s8F89Ja1010441 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 15 Sep 2014 10:09:20 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id s8F7F79W031713; Mon, 15 Sep 2014 10:09:19 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 11291980 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Mon, 15 Sep 2014 10:09:19 +0200 Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.210.211]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id s8F89ItM005288 for ; Mon, 15 Sep 2014 10:09:18 +0200 Received: from smtp5.clear.net.nz (smtp5.clear.net.nz [203.97.33.68]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id s8F896TY025335 for ; Mon, 15 Sep 2014 10:09:10 +0200 Received: from mxin3-orange.clear.net.nz (lb2-srcnat.clear.net.nz [203.97.32.237]) by smtp5.clear.net.nz (CLEAR Net Mail) with ESMTP id <0NBX004XTNZ5IG00@smtp5.clear.net.nz> for LATEX-L@listserv.uni-heidelberg.de; Mon, 15 Sep 2014 20:09:05 +1200 (NZST) Received: from 121-74-47-253.telstraclear.net (HELO [127.0.0.1]) ([121.74.47.253]) by smtpin3.clear.net.nz with ESMTP; Mon, 15 Sep 2014 20:09:04 +1200 MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7bit X-Antivirus: avast! (VPS 140914-1, 15/09/2014), Outbound message X-Antivirus-Status: Clean References: <54167155.9070304@clear.net.nz> <541693B5.2000103@morningstar2.co.uk> User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 Message-ID: <54169EA1.6090104@clear.net.nz> Date: Mon, 15 Sep 2014 20:09:05 +1200 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: aparsloe Subject: Re: Generalising \cs_generate_variant To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: <541693B5.2000103@morningstar2.co.uk> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: Envelope-To: X-GMX-Antispam: 0 (Mail was not recognized as spam); Detail=V3; X-GMX-Antivirus: 0 (no virus found) X-UI-Filterresults: notjunk:1;V01:K0:iXw4knQRmwY=:+psy4wP+rII11vaAmjSiWJSngP wIOqYRBVNuCthYQ02kWnjLwSByeb0jdTldgm/q5fA6Igacel6WcNkh5zakPYg/D92tVm+2lSh hZQIW9/FK/zmXcosftTJRpDbropKAjPVctBtD2lNwb6PsEGnCIwyipYvXcQD9R8VEHe2iINwX IKu4KmXGwOLKiS7x/gc+DjHQ3/7dcpvyRwCa1BbVRa6nYqE7zANwdwWK/k8Tg0ftxlnqNjI9a vnZpzK8rsrnPT1Kp/+j1l5xOkR+fWv8IbVWXewvQgoCBQpU9pE72/dhLoWIEL8ev3LD53P8bm DixDxTsuXSmo232LxZCHQ8pEq3zEmXk/eQs27FBCnuruUR4KBhWqDRoeAy3gy3LUW+m3EnyAn OKQ9Sh0HCZxWK4Fi+SCtPwqcpMYFC/nvE1Ob1JguLR+WC72e2kdt7nJpUfUAuyMrZkdOktA4j h4xFgYYGdw3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-Loop:V01:O6qeTcijLoc=:zIXzXXyBmSF2lI9TODEATbvt2IdvhsXadDn7G2YujIA= X-UI-Out-Filterresults: notjunk:1; Status: R X-Status: X-Keywords: X-UID: 7595 On 15/09/2014 7:22 p.m., Joseph Wright wrote: > On 15/09/2014 05:55, aparsloe wrote: >> I have found a number of instances where I have wanted to generate a >> variant with varying degrees of branching, e.g. >> >> \cs_generate_variant:Nn \tl_case:Nn { No } >> \cs_generate_variant:Nn \tl_case:NnT { No } >> \cs_generate_variant:Nn \tl_case:NnF { No } >> >> I find myself envious of the functionality available with >> \prg_new_conditional:Npnn and its ilk where multiple degrees of >> branching can be coded in a single statement using a subset of { p, F, >> T, TF }. It would be nice to be able to write something similar, e.g. >> >> \cs_generate_variant:Nnn \tl_case:Nn { No } { , F, T } >> >> where the empty slot before the first comma denotes the nonbranching >> variant. >> >> I don't imagine I'm the first to have thought this, so presumably there >> is good (or at least some) reason for not providing the functionality. >> It would be good to know. >> >> Andrew > I don't remember any technical reasons for not doing this: I guess > primarily we've not needed it often enough. > > Probably this would go into \prg_... as it's only applicable to > conditionals (we have \prg_new_eq_conditional:NNn and > \prg_set_eq_conditional:NNn). I guess something like > \prg_generate_conditional_variant:Nnn would be an appropriate name. > > Thoughts? > -- > Joseph Wright Correction: I meant to write \cs_generate_variant:Nn \tl_case:Nn { o } etc., expanding the token list variable. Andrew