Joseph Wright wrote:
> On 07/08/2010 14:57, Arno Trautmann wrote:
>> Hi all,
>>
>> I am looking for a way to define an environment that takes a range as an
>> optional argument. This should be given in the following way:
>>
>> \begin{environment}(15:5.23)
>>
>> with a default value, say (1:3). The two limits should then be parsed as
>> single arguments which are separated by the colon.
>> I am trying to do this with xparse and got some possible solutions with
>> the u and d argument type, but I didn’t manage to get the parentheses
>> optional. I guess what I need is some kind of an optional u argument …
>>
>> Does anyone have a suggestion how to easily implement these requests?
>>
>> cheers
>> Arno
>>
> Parse the argument first as a 'd', then use \SplitArgument to do the
> subsequent work:

Nice, I totally forgot about the \SplitArgument …
Thanks for your quick answer, that works fine. But unfortunately it does
not solve my problem due to other reasons.

cheers
Arno