Received: from mail.proteosys.com ([213.139.130.197]) by nummer-3.proteosys with Microsoft SMTPSVC(6.0.3790.3959); Mon, 20 Oct 2008 09:35:09 +0200 Received: by mail.proteosys.com (8.13.8/8.13.8) with ESMTP id m9K7Z2mV017699 for ; Mon, 20 Oct 2008 09:35:03 +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 m9K7UVBb002896 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 20 Oct 2008 09:30:31 +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 m9JM2BlX025410; Mon, 20 Oct 2008 09:30:18 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 15.5) with spool id 55941 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Mon, 20 Oct 2008 09:30:18 +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 m9JM2BlR025410 for ; Mon, 20 Oct 2008 09:30:18 +0200 Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by listserv.uni-heidelberg.de id m9K7UIWf030556 Message-ID: Date: Mon, 20 Oct 2008 09:30:18 +0200 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Joseph Wright Subject: Re: Tools for processing numbers 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: 20 Oct 2008 07:35:09.0488 (UTC) FILETIME=[6138AB00:01C93286] Status: R X-Status: X-Keywords: X-UID: 5400 On Tue, 14 Oct 2008 13:04:20 +0100, Joseph Wright wrote: >Will Robertson wrote: >> These ideas do sound good to me. >> Especially reliable detection methods like \ifinteger and so on. > >I need to see how this is done in etoolbox, as expansion could be an >issue. I'll see what I can do (while retaining generality). I suspect this will have to be non-expandable, even using the tricks from biblatex. What general tests do others think would be useful; at present, I'm planning (with variants): \numtest_if_dec:nTF % A decimal integer \numtest_if_bin:nTF % Binary integer \numtest_if_oct:nTF % Octal integer \numtest_if_hex:nTF % Hexidecimal integer \numtest_if_numeral:nTF % A numeral, so 0-9 plus roman numeral characters \numtest_if_range:nTF % A range of numbers, so in general any "numeral" plus % a selection of range characters This is essentially the tests from biblatex generalised a little. The range one will not be rigorous (content as a whole checked, not individual characters). However, I think that the second part of the idea (general number parsing) will cover that if more slowly. -- Joseph Wright