Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by h1439878.stratoserver.net (8.14.4/8.14.4/Debian-2ubuntu2.1) with ESMTP id u34GIZhO002309 for ; Mon, 4 Apr 2016 18:18:36 +0200 Received: from relay.uni-heidelberg.de ([129.206.100.212]) by mx-ha.gmx.net (mxgmx112) with ESMTPS (Nemesis) id 0MhdSZ-1b8t3131xT-00MtlV for ; Mon, 04 Apr 2016 18:18:29 +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 u34GGs5g022525 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 4 Apr 2016 18:16:54 +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 u34Asvcp004667; Mon, 4 Apr 2016 18:16:54 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 13536090 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Mon, 4 Apr 2016 18:16:54 +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 u34GGrj1031902 for ; Mon, 4 Apr 2016 18:16:53 +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 u34GGnjF022469 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 4 Apr 2016 18:16:51 +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 718094C8128 for ; Mon, 4 Apr 2016 18:12:30 +0200 (CEST) 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 Content-Transfer-Encoding: 7bit Message-ID: <57029370.4090909@free.fr> Date: Mon, 4 Apr 2016 18:16:48 +0200 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: "Julien RIVAUD (_FrnchFrgg_)" Subject: Bug in \NewDocumentEnvironment To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE 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:dGrUKqax/rk=:DGomRMLa9RK0xPAR0Rcnw6qsTX 4ZGzvlK2tvUN8fvvwXj9WmoBO+u9VsHnHqiHsrEf+VGblNoNOfcg2hPNW7cEGdKeAWNPU52HD 51YWUVEA2LmItrw3H5SvOk+nRVAY/1ifVxwrNkmLsVf0rx6AIAFo2T7r5LziBK8UbeeyM8yj3 DdPbxZfxHP5yfIN7IMLMeS4YSJjjUYdNsOXh+3ADZO0n5pxYHdY7qz4vKIMaSrdoaCP6i43Tn a9Ln1QRWF7iPW11kItDzvU+8jaXC7ITtl3cPq5/L3zxM48+Nw4+QEclowcTIDYcGL7y8oObOK 5vQMIPybwhshUrVZU+SYPwJ7LsR8VD5Belrd18tIpO7dSmRTjUfKIIKXkgsL6Mvr+TX1TisK1 b5GyoyLqLDw0K/nWeMu3H5rSb2aUYeYhezL3+bM7DxI0J46MueiYaIehMr5FHebKQ5h/FoX+T T46fMtKV7x2NHfU7xJsxHyf8V7RNTCW+J/CnxS0hUQZPffIV9lKgwZnFr/rsJMf4YTBSN2L1X CuPNaPcumKBNfDcKXPK/BPT4yhf4sG802Fhl1e2bWlCDBiWqbXJEp6vobf7iYNpFasy0tgXwW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IyZlqfA89iNtSyJQ== X-UI-Loop:V01:u9M/yvRZ9BU=:tfkc6dj9CBeZn9jqkaXAJYHBIY0KmhOmZFzIzfiq5A4= X-UI-Out-Filterresults: notjunk:1;V01:K0:TQxm7W4CspI=:V3wODwpbNNVNHLeukuDCyG Un9uNpd7GWd4phAr+bj8rkNUP6XdzVDSlqwY9fmGZd0erhE19SYbw/fSHzFhzhKOScRqq54xj CLWvn8hFr6xnBXmq72MTbW8GLze0RDo6i5U6GjCCnHlaIwz1HWw2XaLstvKU0ftMn1hgQ6qFc G2q1ZS1S4MSCnqHkxM1hWRe98o7U2Nb6J2itCLGCmxLmGRGGQKqTPYlDlbhfduQBWllyA0XLy S0GjBsdlSJDro9Et+tHS/0xqK0W+K9XaFvob6fzntLLghm21n1bz70T8/05E12HBd+hCqGQQH FTCC04YPs4UiW+FbzNtWKAowE9kvenqoa49mTXxWKYLE0FXeMAJR/wcz1DwnmsZlHKoyDb3DI cYAP8ybTmNtOGlK04N/kHRf8ElY1ZBTzToawhbOTbPJhOIICAfBGdrHI4Vp1V0gCHmxa4lzGb pRg7G//rMqeevkCywvx87IszAmWVHm6lK33LOVW4iktAm9UXKZjWghXpP7tWatZa3Kvz/gGI/ cGLrBNkcn0RMjgZ7kGi2yVAq9Hi2ewLzIRzI+Lfxmte X-Scanned-By: MIMEDefang 2.71 on 85.214.41.38 Status: R X-Status: X-Keywords: X-UID: 7922 Hello, Here is a MWE showing that xparse-created environments have unsafe closing code in alignments: \documentclass{book} \usepackage{xparse} \NewDocumentEnvironment{foo}{m}{% \begin{tabular}{#1}% }{% \end{tabular}% } \begin{document} \fbox{ \begin{foo}{ccc} \hline Test & a & b \\ \hline \end{foo} } \fbox{ \begin{tabular}{ccc} \hline Test & a & b \\ \hline \end{tabular} } \end{document} The first and second \fbox-es should produce the same output, but don't: the foo environment starts a second line at closing time, before the control is passed to the author-supplied closing code. This example compiles but the output is wrong; it is simple to produce an error by including an \hline before the \end{tabular} when closing the |foo| environment: \NewDocumentEnvironment{foo}{m}{% \begin{tabular}{#1}% \hline }{% \hline \end{tabular}% } breaks with a "misplaced \noalign" (probably a "misplaced \omit" with mdwtabs since it doesn't use \noalign{\hrule} to draw \hlines, because of "unboxed" tabulars IIRC) I remembered in error that the \endgroup of \end itself trigerred an error, but that's not the case (my belief was stupid anyway because tabular closes correctly tables with a missing \\ at the end). The fact remains that * we get a spurious line that's very hard to remove * the closing code of the environment is expanded in a cell, which is unexpected (even though tabular-enclosing authors should cope with unfinished lines IMHO) Cheers, Julien