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 p515kgiK005418 for ; Wed, 1 Jun 2011 07:46:43 +0200 Received: (qmail 32511 invoked by alias); 1 Jun 2011 05:46:37 -0000 Delivered-To: GMX delivery to rainer.schoepf@gmx.net Received: (qmail invoked by alias); 01 Jun 2011 05:46:37 -0000 Received: from relay.uni-heidelberg.de (EHLO relay.uni-heidelberg.de) [129.206.100.212] by mx0.gmx.net (mx059) with SMTP; 01 Jun 2011 07:46:37 +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 p515iTxH027455 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 1 Jun 2011 07:44:29 +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 p4VM2ZN3016556; Wed, 1 Jun 2011 07:44:29 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 1207809 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Wed, 1 Jun 2011 07:44:29 +0200 Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.210.211]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id p515iS1C014184 for ; Wed, 1 Jun 2011 07:44:29 +0200 Received: from anchor-post-1.mail.demon.net (anchor-post-1.mail.demon.net [195.173.77.132]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id p515iHLA026235 for ; Wed, 1 Jun 2011 07:44:21 +0200 Received: from cremornelane.demon.co.uk ([80.177.25.195] helo=palladium.local) by anchor-post-1.mail.demon.net with esmtp (Exim 4.69) id 1QReE5-0000W2-he; Wed, 01 Jun 2011 05:44:17 +0000 User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-GB; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 References: <4DE12DD9.9000805@morningstar2.co.uk> <4DE21D52.7060409@morningstar2.co.uk> X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <4DE5D1B1.6050709@morningstar2.co.uk> Date: Wed, 1 Jun 2011 06:44:17 +0100 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Joseph Wright Subject: Re: xparse, "while" argument type To: LATEX-L@listserv.uni-heidelberg.de In-Reply-To: Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-GMX-Antispam: 0 (eXpurgate); Detail=5D7Q89H36p5Xglyw75EiO2RwPv/SB5M64LoDbGRpENylQR9Jf7H9SQHSjEiBdEwTTKLwl 5G+Loa/H02cxGwbGD0eLawwZZx6s+ufW129PlaaQ0WMGPTsv8+CfePVhhERlG4ch5Ov5HSiZind7 U4L6ZspCr8QsnNZJ9iYiLQ6NVjDq+r4rI0z13J8Aue+BVKicRzi3bFioZaRKnG5kcETpw==V1; 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: 6777 On 31/05/2011 22:46, Bruno Le Floch wrote: > Note that verbatim input cannot be done reliably, while this one can. I realise the technical issues are very different. > Actually, I can see it used if someone wants the first word of each > paragraph bold (but who would?): > > \DeclareDocumentCommand { \bw } > { w { ! \token_if_letter_p:N } w { \token_if_letter_p:N } } > { #1 \textbf {#2} } > \toks_put_right:Nn \tex_everypar:D { \bw } > > (where \everypar should have a LaTeX3 interface). This grabs > everything before the first letter as #1, then all letters which > follow as #2, and puts that second argument in bold. It fails if there > is a space or brace between \bw and the following word. There are > probably better ways of doing that, though (I don't know). At an implementation level, I think a "u"-type would be easier here. However, more broadly my point is that I don't really like this input approach. TeX's input flexibility is great, but there is a need to try to have some structure, especially when dealing with things like conversion to other formats. I'd hope that this is one of the things LaTeX3 (as an input syntax) will improve on over LaTeX2e. Joseph