28 Jul
2006
28 Jul
'06
2:34 p.m.
Bernd Militzer wrote:
Am 27.07.2006 um 07:54 schrieb Aditya Mahajan:
You can also do
\def\PID[#1]#2[#3]{\getparameters[PID#1][#3]} % #2 is to gobble spaces
thanks for that hint Aditya!
There is also this (more formal) solution: \def\PID{\dodoubleempty\doPID} \def\doPID[#1][#2]{\getparameters[PID#1][#2]} The core internal macro \dodoubleempty creates empty [] groups if they are not provided in the input. There is also \dosingleempty etc, upto \doseventupleempty Cheers, Taco