[NTG-context] How to \processcommalist inside another commalist?

Hans Hagen pragma at wxs.nl
Tue Aug 22 10:13:40 CEST 2006

```nico wrote:
> On Mon, 21 Aug 2006 23:08:59 +0200, Hans Hagen <pragma at wxs.nl> wrote:
>
>
>>>> but after some thinking I realized that it would indeed be a better
>>>> idea (less to type?) to have
>>>>     \useGNUPLOTgraphic[name][1,3]
>>>> and
>>>>     \useGNUPLOTgraphic[name][1,3][width=.9\textwidth]
>>>>
>>>> At the beginning the main reason against it was that I didn't know how
>>>> to distinguish which kind of parameters are being used in the second
>>>> pair of brackets, but I guess that I can safely use \ifnumberelse as a
>>>> test on the first item to distinguish between the two.
>>>>
>>>>
>>> Maybe you could play only with the parameter count. The limitation is
>>> that
>>> an empty second argument is required when only options need to be
>>> passed.
>>>
>>>
>> why? in that case #3 is empty and #2 contains the options
>>
>
> Hm, I thought that the initial goal was to know if the parameter passed is
> a number list, or an option list. In the suggested code, the assumption is
> that the number list (if any) is always the second parameter.
>
> If not, how to handle those cases?
>
> \useGNUPLOTgraphic[name][2,3,5]
> \useGNUPLOTgraphic[name][width=2in]
>
> But I guess there are clever internal macros that could help :-)
>