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