On Sat, Nov 09 2013, Aditya Mahajan wrote:
One possibility is to restrict optional arguments to one line:
\def\beginInvoice{\bgroup\obeylines\dosingleempty\dobeginInvoice} \def\dobeginInvoice[#1]{\egroup\grabbufferdata[myLetter][beginInvoice][endInvoice]}
Thanks. How did you find the reason for the error (and the solution)? Is there also a solution with support for multiple lines? Unfortunately this does not work: --8<---------------cut here---------------start------------->8--- \def\beginInvoice{\bgroup\obeylines\dosingleempty\dobeginInvoice} \def\dobeginInvoice[#1]{\egroup\getparameters[PRM][#1]% \grabbufferdata[myLetter][beginInvoice][endInvoice]} \def\endInvoice{\getbuffer[myLetter]} \def\startInvoice#1\stopInvoice{#1} \starttext \beginInvoice[bla=blub, blub=bla] \startInvoice test \PRMblub \stopInvoice \endInvoice \beginInvoice \startInvoice test \stopInvoice \endInvoice \stoptext --8<---------------cut here---------------end--------------->8--- TIA, -- Peter