LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Joseph Wright <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Mon, 20 Oct 2008 09:30:18 +0200
Content-Type:
text/plain
Parts/Attachments:
text/plain (30 lines)
On Tue, 14 Oct 2008 13:04:20 +0100, Joseph Wright
<[log in to unmask]> 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

ATOM RSS1 RSS2