Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) by h1439878.stratoserver.net (8.14.4/8.14.4/Debian-2ubuntu2.1) with ESMTP id u34FjIqX001271 for ; Mon, 4 Apr 2016 17:45:20 +0200 Received: from relay2.uni-heidelberg.de ([129.206.119.212]) by mx-ha.gmx.net (mxgmx109) with ESMTPS (Nemesis) id 0M0KI5-1bhOlg0mnl-00ubbf for ; Mon, 04 Apr 2016 17:45:13 +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 u34Fhdgv012916 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 4 Apr 2016 17:43:39 +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 u34AtSSr007588; Mon, 4 Apr 2016 17:43:38 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 13536008 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Mon, 4 Apr 2016 17:43:38 +0200 Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id u34FhclD029702 for ; Mon, 4 Apr 2016 17:43:38 +0200 Received: from smtp4-g21.free.fr (smtp4-g21.free.fr [212.27.42.4]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id u34FhX2e001069 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 4 Apr 2016 17:43:36 +0200 Received: from [IPv6:2a01:e35:2e92:63f0:fa16:54ff:fef7:e1a8] (unknown [IPv6:2a01:e35:2e92:63f0:fa16:54ff:fef7:e1a8]) (Authenticated sender: frnchfrgg) by smtp4-g21.free.fr (Postfix) with ESMTPSA id 8E0F44C8029 for ; Mon, 4 Apr 2016 17:39:14 +0200 (CEST) References: <5701B0C1.9080407@free.fr> <57022D60.6050803@morningstar2.co.uk> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.6.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Message-ID: <57028BA4.7010102@free.fr> Date: Mon, 4 Apr 2016 17:43:32 +0200 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: "Julien RIVAUD (_FrnchFrgg_)" Subject: Re: Bug in xparse r, or R, or d or D argument specifiers To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: <57022D60.6050803@morningstar2.co.uk> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-MIME-Autoconverted: from 8bit to quoted-printable by relay2.uni-heidelberg.de id u34Fhdgv012916 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:iB/FwxavTjs=:OQyJi38XbzEQKmDMdLvKPGWJDw 7YVBSbqUvfoheoxqzfiHATu660D7fk952qM88bTOIaBUj/yMEU3JthZ5yi90Yu8DT/V8eMP6K goTD7Rw4mRswsoHJms5v6wgFmimvDtehv18UjZXX8GzDUM2wYzNi5IeJspwjarxqu6tyDjtBG /kQB+trtVJD7yBFYmsq67Sp/R2pYJcsrpaBjldlvYyDwjkee05p9c++W4aoLsfE39sLulrhX8 At4XOdH6QS9s/SJ32IO1gBWX4Tump0Kd5gFOd4lAtgz84rgCLIPrZnpJ/np6mkYRoScNi+JII wcanJ0bFwv4HZ4t//SBb6SKL13gwXVR/WGEbzJC/nLSez1rvY75kmqJzKFqHAHTnal3RKQaGV ZgvqvYle/r9HJiSz3o2eclu92Ki20uqO/Q9QLDLcxDl7UdQFfnc+Il4b9StxMsgPRWT2kzvQ1 vlavvCGLIPxFxZJrmn6GpQYd4h0esJ3SnU5Q7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sgJumYftO38N9/2gCF+zNguRP/yJTavIhXBWdEb28aPHZRPnVW6utuAn5oi8 B1O4JK+iFlEuHBERAltwbp0U/MhXZbjSDiFImJbUzIkI6dPqohdmMg== X-UI-Loop:V01:jqThV+qegRM=:lvlOorX9EkqS3xVLo3OhjtX3rKS0LLKJj7ddgNECHfw= X-UI-Out-Filterresults: notjunk:1;V01:K0:H72oWcv6+I4=:CfhTen7i6pe3GXTgMhMxU/ OPmWq5d8IZaYwgbKxsV0+wW6J/rWfqHuHf+gRU7CpCdsorAdE4gOEvEHGerTwyBGYERvqaQq5 yi/sVH2H6jJzD5AcuEej5KYMrY+0Y/wUnvNpoZnNaFS/3sQLtgDu0rNfzDK8XGZ084/v424yn iEBOs4HGnVa0Nu3VJi6ImxmB4ZdHgP1XPaoYzBcDN4IkQ6srnilH43s92Ta22gvmmQ/ea88Si tzJS4bfR4a2KKSgSXYkbTnLu27z+hydu5iOxV4RdxfwO0m1c3H4jsLJtwxyNDtppGczYsVrMa 6XLG6zpReVrbFeLyOxwAgVH5ytTIniDNGtdgzeECa+hfqyzx6spV/oFboKcFdsE0ck7oiUv9q SWvA5h3TCZnaSw//ymCC2cM9lg11T2x5meNmzYSYGa8akeby8sPvf1hPABkyBTP4QAn+qpzdB Olo3+cvkf+h8UH1QYIf/Bm24kT7yHvIifUfWZFlUouQiLbG/xSTDDSuUGHzwwGzM6dPyv9rMt TY6XGDztaH170RWsTxcjze7EKyhQOCX7gTeu1HdcCAB X-Scanned-By: MIMEDefang 2.71 on 85.214.41.38 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by h1439878.stratoserver.net id u34FjIqX001271 Status: R X-Status: X-Keywords: X-UID: 7921 Le 04/04/2016 11:01, Joseph Wright a écrit : > The intention of d/D/r/R was always as a generalisation of LaTeX2e's > optional arg/co-ordinate arg syntax. As such, my idea at least was that > the are intended for handling single character tokens (also true for > t-type args, etc.). Certainly xparse is meant to provide 'LaTeX2e-like > interfaces' not 'a completely general argument parser', so it's not > unreasonable to have a restriction here. I'll look to tighten up the > docs but will first wait to see if there are strong views that the > behaviour should change. Fair enough. If the behaviour doesn't change, I'll write my own grabber. (I have far simpler requirements, no brace conservation problem and no need to hide anything; I just wanted a cheap (as in work from me) way to get paired \IF/\ENDIF for rendering algorithms as AlgoBox[1] does) >> As a side note, I don't understand what this test is about: > > This was added by me in r4462 > (https://github.com/latex3/latex3/commit/5aa6ab78f1e035abd73daf41a92b30501bcd27a4). > As noted there, the case we are worrying about is the behaviour of the > two uses > > \foo[{bar}]{baz} > \foo[bar]{baz} Yes, I understood after my mail that you don't want to prevent brace removal at all times (then \use_none:n would be enough): you *want* to remove braces when encountering [{bar}] (e.g. for [{[}]), but a simpler approach could lead to space and braces removal in the [ {bar}] case (where you don't want it). >> \NewDocumentEnvironment {enumerate} { d{[<}{>]} o } would have been >> beautifully clean. > > Till's interface choice here is perhaps a bit unusual Of course, I don't really see why he didn't choose {d<> o} > but that doesn't mean xparse has to handle it directly. (As noted above, that's not > really what xparse is about.) I understand that you don't want too much complexity, but I don't agree with that statement: - either xparse is only about LaTeX2e (and it is far too much complicated already) - or it is about enabling the types of syntax found in the LaTeX 2e ecosystem (and thus the r() for pict2e, etc.) and I don't see where you draw the line (apart from the complexity argument). Beamer's default overlay specifications can be considered "common" (at least because beamer is the only presentation class I have seen used in the wild for quite a long time). Anyway, xparse is not my code, and more to the point not my maintenance burden, so that's not my call. >> P.S.: I also encountered a "quirk" in \NewDocumentEnvironment, in that >> the environment close is not align-safe (probably because of the >> retrieving of arguments, but I didn't check; or just because it is >> protected?): it starts a new row (and that's the least worry because >> then the closing stuff is in a box group and TeX frowns upon the >> \endgroup of \end). I didn't need closing args, so I just used >> \NewDocumentCommand. > > This looks like it needs a separate post with an example! Sure. I'll try and write an MWE. Cheers, Julien.