Received: from mail.proteosys.com ([213.139.130.197]) by nummer-3.proteosys with Microsoft SMTPSVC(6.0.3790.3959); Sun, 14 Sep 2008 09:24:35 +0200 Received: by mail.proteosys.com (8.13.8/8.13.8) with ESMTP id m8E7OS0F014956 for ; Sun, 14 Sep 2008 09:24: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 m8E7JUEW020033 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 14 Sep 2008 09:19:30 +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 m8DM1AvA031290; Sun, 14 Sep 2008 09:19:19 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 15.5) with spool id 29168 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Sun, 14 Sep 2008 09:19:19 +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 m8E7JIrf016568 for ; Sun, 14 Sep 2008 09:19:18 +0200 Received: from anchor-post-37.mail.demon.net (anchor-post-37.mail.demon.net [194.217.242.87]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id m8E7JB6L009600 for ; Sun, 14 Sep 2008 09:19:15 +0200 Received: from morningstar2.demon.co.uk ([80.176.134.7] helo=[192.168.0.3]) by anchor-post-37.mail.demon.net with esmtp (Exim 4.69) id 1Kelt0-0002Rc-OF for latex-l@listserv.uni-heidelberg.de; Sun, 14 Sep 2008 07:19:10 +0000 User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <48CCBAEE.60703@morningstar2.co.uk> Date: Sun, 14 Sep 2008 08:19:10 +0100 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Joseph Wright Subject: Generic quark test To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE 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 07:24:35.0300 (UTC) FILETIME=[F0584240:01C9163A] Status: R X-Status: X-Keywords: X-UID: 5313 Hello, It might be handy to have a check to see if a value is any quark, for "make safe" code. So far, I've ended up with: \def_new:Npn \if_quark:NT #1 { \exp_after:NN \exp_after:NN \exp_after:NN \if_quark:w \exp_after:NN \token_to_string:N #1 \q_stop } \def_new:Npn \if_quark:wT #1#2#3\q_stop { \int_compare:nNnT {\char_value_uccode:n{#2}} = {`Q} } which seems to work but I'm worried may not be suitable more generally. Any ideas? -- Joseph Wright