On 14-7-2011 5:12, Jaroslav Hajtmar wrote:
To show what macros I want to convert, I mention these examples:
\def\opencsvfile{% \dosingleempty\doopencsvfile% }
\def\doopencsvfile[#1]{% \dosinglegroupempty\dodoopencsvfile }
\def\dodoopencsvfile#1{% \iffirstargument \ctxlua{thirddata.scancsv.opencsvfile("#1")} \else \ctxlua{thirddata.scancsv.opencsvfile()} \fi }
There is no support yet for optional {} (which is to be avoided anyway as [] is meant for optional arguments). Wolgangs example shows the regular optional argument. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------