Received: from mail.proteosys.com ([213.139.130.197]) by nummer-3.proteosys with Microsoft SMTPSVC(6.0.3790.3959); Sun, 14 Sep 2008 12:12:24 +0200 Received: by mail.proteosys.com (8.13.8/8.13.8) with ESMTP id m8EACJWm018166 for ; Sun, 14 Sep 2008 12:12: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 m8EA731v021808 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 14 Sep 2008 12:07:03 +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 m8DM1A1K031290; Sun, 14 Sep 2008 12:06:59 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 15.5) with spool id 29697 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Sun, 14 Sep 2008 12:06:59 +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 m8E9uxcX025984 for ; Sun, 14 Sep 2008 11:56:59 +0200 Received: from pluto.open.ac.uk (pluto.open.ac.uk [137.108.145.32]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id m8E9ujOG010053 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 14 Sep 2008 11:56:49 +0200 Received: from fell.open.ac.uk ([137.108.10.119]) by pluto.open.ac.uk with esmtp (Exim 4.69) (envelope-from ) id 1KeoMR-0000XU-4y for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Sun, 14 Sep 2008 10:57:43 +0100 Received: (from car2@localhost) by fell.open.ac.uk (8.9.3+Sun/8.9.1) id KAA11314; Sun, 14 Sep 2008 10:17:09 +0100 (BST) X-Authentication-Warning: fell.open.ac.uk: car2 set sender to car2@fell.open.ac.uk using -f MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit References: <48CCBAEE.60703@morningstar2.co.uk> <97AFAC39-1BDF-4EEB-8498-011976315F19@gmail.com> X-Mailer: VM 6.76 under Emacs 20.7.1 Message-ID: <18636.54932.579497.162549@fell.open.ac.uk> Date: Sun, 14 Sep 2008 10:17:08 +0100 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Chris Rowley Subject: Re: Generic quark test To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: <97AFAC39-1BDF-4EEB-8498-011976315F19@gmail.com> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-ProteoSys-SPAM-Score: -2.599 () BAYES_00 X-Scanned-By: MIMEDefang 2.64 on 213.139.130.197 Return-Path: owner-latex-l@LISTSERV.UNI-HEIDELBERG.DE X-OriginalArrivalTime: 14 Sep 2008 10:12:24.0476 (UTC) FILETIME=[620A95C0:01C91652] Status: R X-Status: X-Keywords: X-UID: 5316 Will Some ideas in private as this is displacement activity for me this week (two papers to finish, plus the 'mathematical part' of the new Content MathML part of the spec) and so I do not want to get dragged into lengthy discussions on public lists. You are welcome to cut parts of this onto the list. > > \def_new:Npn \if_quark:wT #1#2#3\q_stop { > > \int_compare:nNnT {\char_value_uccode:n{#2}} = {`Q} > > } Assuming my detective faculties have not completely siezed up, what is being attempted here is to test with expansion only the first letter of the 'name of the quark'. One challenge, as I see it, is to build expandable tests for arbitrary (prefix) strings. This may not be a 5-star challenge with e-TeX? Then we could have a longer prefix such as your \q_quark for all quarks (and hope that no idiot uses the prefix for anything else). To better avoid such idiocy it could be arbitrarily wierd, eg: \q_Q__K_ ... > \def_new:Npn \quark_new:N #1{\tlp_new:Nn #1{\q_quark#1}} The creator then needs to be (in possibly correct, or possibly pseudo, code??): \def_new:Npn \quark_new:n #1{\tlp_new:cn {q_Q_K_#1}{\q_Q_K_#1}} Makes sense? ... maybe. chris