Received: from mail.proteosys.com ([213.139.130.197]) by nummer-3.proteosys with Microsoft SMTPSVC(6.0.3790.3959); Sat, 25 Apr 2009 20:46:21 +0200 Received: by mail.proteosys.com (8.14.3/8.14.3) with ESMTP id n3PIkKTH032328 for ; Sat, 25 Apr 2009 20:46:20 +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 n3PIfAEk032528 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 25 Apr 2009 20:41:10 +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 n3PC04FS028540; Sat, 25 Apr 2009 20:41:04 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 15.5) with spool id 276319 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Sat, 25 Apr 2009 20:41:04 +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 n3PIf4NE021938 for ; Sat, 25 Apr 2009 20:41:04 +0200 Received: from atlas.informatik.uni-freiburg.de (atlas.informatik.uni-freiburg.de [132.230.150.3]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id n3PIeo4x028629 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Sat, 25 Apr 2009 20:40:54 +0200 Received: from remote239-25.home.uni-freiburg.de ([132.230.239.25] helo=irwin.vpn.uni-freiburg.de) by atlas.informatik.uni-freiburg.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1Lxmny-00026s-1r for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Sat, 25 Apr 2009 20:40:50 +0200 Received: by irwin.vpn.uni-freiburg.de (Postfix, from userid 500) id 03927184C9; Sat, 25 Apr 2009 20:37:04 +0200 (CEST) Mail-Followup-To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE References: <20090424092120.GA7843@irwin.vpn.uni-freiburg.de> <5.1.0.14.0.20090421122917.02f41830@pop3.web.de> <455691F1-21A4-4C65-A025-7855791829F7@gmail.com> <20090424092120.GA7843@irwin.vpn.uni-freiburg.de> <5.1.0.14.0.20090425151542.032a0ce0@pop3.web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit Message-ID: <20090425183703.GA2822@irwin.vpn.uni-freiburg.de> Date: Sat, 25 Apr 2009 20:37:04 +0200 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Heiko Oberdiek Subject: Re: \in@ wrong? To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: <5.1.0.14.0.20090425151542.032a0ce0@pop3.web.de> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-ProteoSys-SPAM-Score: -6.599 () BAYES_00,RCVD_IN_DNSWL_MED X-Scanned-By: MIMEDefang 2.65 on 213.139.130.197 Return-Path: owner-latex-l@LISTSERV.UNI-HEIDELBERG.DE X-OriginalArrivalTime: 25 Apr 2009 18:46:22.0021 (UTC) FILETIME=[20C4C750:01C9C5D6] Status: R X-Status: X-Keywords: X-UID: 5768 On Sat, Apr 25, 2009 at 06:24:08PM +0200, Uwe Lück wrote: > >On 24/04/2009, at 6:51 PM, Heiko Oberdiek wrote: > >>%%% begin of fixed definition %%% > >>\def\in@#1#2{% > >> \def\in@@##1#1##2\in@@{% > >> \def\in@@{##2}% > >> \ifx\in@@\@empty > >> \in@false > >> \else > >> \in@true > >> \fi > >> }% > >> \in@@#2\@nil#1\in@@ > >>} > >>%%% end of fixed definition %%% > > (This uses \@nil.) Putting the second split into a macro to test it against > \@empty is safe, but one might dislike it as "slow". I prefer "safe". > Other proposals need I haven't seen any so far. An expandable test could be used, e.g.: \ifx\\##2\\% or something else as \\ instead of \def\in@@{##2}% \ifx\in@@\@empty But the disadvantage is that an unmatched \if..., \else or \fi inside ##2 breaks the \if constructs of \in@@, thus it isn't safe. And because exandibility isn't neede here (the first definition destroys this property anyway), I have used the more safe test for emptiness in my proposal. > Heiko's proposal doesn't use \in@ in the last line that calls \in@@. This > would allow replacing \@nil by \in@, which wouldn't introduce a new control > word. It's ok with me. > My favourite tends to be replacing so-far-LaTeX's test against \in@ by a > test on emptiness (as Heiko proposed) in a way slightly similar to ifmtarg > (third line): > > \def\in@#1#2{% > \def\in@@##1#1##2\in@@{% > \ifx\in@@##2\in@@\in@false\else\in@true\fi}% > \in@@#2\in@#1\in@@} I isn't robust, if unmatched conditionals are inside ##2, see above. Yours sincerely Heiko