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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________