Argument of \startInvoice has an extra }.
Hi, How could I avoid that error here please: --8<---------------cut here---------------start------------->8--- \def\beginInvoice{\dosingleempty\dobeginInvoice} \def\dobeginInvoice[#1]{\grabbufferdata[myLetter][beginInvoice][endInvoice]} \def\startInvoice#1\stopInvoice{bla} \starttext \beginInvoice \startInvoice test \stopInvoice \endInvoice \stoptext --8<---------------cut here---------------end--------------->8--- TIA for any help, -- Peter
On Sat, 9 Nov 2013, Peter Münster wrote:
Hi,
How could I avoid that error here please:
--8<---------------cut here---------------start------------->8--- \def\beginInvoice{\dosingleempty\dobeginInvoice} \def\dobeginInvoice[#1]{\grabbufferdata[myLetter][beginInvoice][endInvoice]} \def\startInvoice#1\stopInvoice{bla} \starttext \beginInvoice \startInvoice test \stopInvoice \endInvoice \stoptext
One possibility is to restrict optional arguments to one line: \def\beginInvoice{\bgroup\obeylines\dosingleempty\dobeginInvoice} \def\dobeginInvoice[#1]{\egroup\grabbufferdata[myLetter][beginInvoice][endInvoice]} Aditya
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
participants (2)
-
Aditya Mahajan
-
Peter Münster